@@ -21,7 +21,6 @@ import au.org.ala.spatial.intersect.Grid
2121import au.org.ala.spatial.dto.LayerFilter
2222import au.org.ala.spatial.util.SpatialConversionUtils
2323import au.org.ala.spatial.util.SpatialUtils
24- import grails.converters.JSON
2524import groovy.sql.GroovyResultSet
2625import groovy.sql.Sql
2726import groovy.util.logging.Slf4j
@@ -41,7 +40,6 @@ import org.locationtech.jts.io.WKTReader
4140import org.opengis.feature.simple.SimpleFeature
4241import org.opengis.feature.simple.SimpleFeatureType
4342import org.springframework.dao.DataAccessException
44- import org.springframework.scheduling.annotation.Async
4543import org.springframework.transaction.annotation.Transactional
4644
4745import java.nio.charset.StandardCharsets
@@ -90,7 +88,7 @@ class SpatialObjectsService {
9088
9189 }
9290
93- LayerIntersectService layerIntersectDao
91+ LayerIntersectService layerIntersectService
9492 LayerService layerService
9593 def Holders
9694 def dataSource
@@ -142,7 +140,7 @@ class SpatialObjectsService {
142140 if (pageSize == -1 || (pos >= start && pos - start < pageSize)) {
143141 SpatialObjects o = new SpatialObjects ()
144142 o. setPid(f. getLayerPid() + ' :' + c. getKey())
145- o. setId(f. getLayerPid() + ' : ' + c . getKey( ))
143+ o. setId(Long . valueOf( f. getLayerPid()))
146144 o. setName(c. getValue(). getName())
147145 o. setFid(f. getFieldId())
148146 o. setFieldname(f. getFieldName())
@@ -509,7 +507,7 @@ class SpatialObjectsService {
509507 l = new ArrayList<SpatialObjects > ()
510508 IntersectionFile f = layerService. getIntersectionFile(fid)
511509 if (f != null && f. getClasses() != null ) {
512- Vector v = layerIntersectDao . samplingFull(fid, lng, lat)
510+ Vector v = layerIntersectService . samplingFull(fid, lng, lat)
513511 if (v != null && v. size() > 0 && v. get(0 ) != null ) {
514512 Map m = (Map ) v. get(0 )
515513 int key = (int ) Double . parseDouble(((String ) m. get(" pid" )). split(' :' )[1 ])
@@ -669,7 +667,7 @@ class SpatialObjectsService {
669667 }
670668
671669 // sampling
672- ArrayList<String > sample = layerIntersectDao . sampling(new String []{layerFilter. getLayername()}, points)
670+ ArrayList<String > sample = layerIntersectService . sampling(new String []{layerFilter. getLayername()}, points)
673671
674672 // filter
675673 List<SpatialObjects > matched = new ArrayList<SpatialObjects > ()
0 commit comments