Solved

Hello! Is it possible to extract coordinate pairs (lat/lon) that are within an actual shapefile boundary as opposed to using a bounding box of a shapefile? When I use the BoundsExtractor transformer I'm getting more points than warranted. Thanks.


Hello! Is it possible to extract coordinate pairs (lat/lon) that are within an actual shapefile boundary as opposed to using a bounding box of a shapefile? When I use the BoundsExtractor transformer I'm getting more points than warranted. Thanks.
icon

Best answer by rahulsharma 9 April 2021, 23:18

View original

3 replies

Badge +8

Hi @robeesafe​, To clarify what I understood from the question is that you want just get all the lat/long pairing of the features in the Shape file.

 

Use GeometryExtractortransformer, to convert the geometry in OGCWKT

This will create an attributes (_geometry) which should contain Lat/long values for shape polygon

 The value should be stored for each feature.

Hello Rahul, the coordinate pairs are in a large SQL database. I just would like to extract the pairs that fall within the extent of the shapefile. The coordinate pairs are not in a shapefile and do not intend to convert them into a shapefile. I hope the clarification helps.

 

Badge +8

Hello Rahul, the coordinate pairs are in a large SQL database. I just would like to extract the pairs that fall within the extent of the shapefile. The coordinate pairs are not in a shapefile and do not intend to convert them into a shapefile. I hope the clarification helps.

 

Ok in that case, you can use the following steps

Read SQL Data (assuming its non-spatial)

Convert the Lat\\Long to Point using VertexCreator

Use transformers such as Clipper or SpatialFilter (or others suchas PointOnAreaOverlayer)

Clipper will be best option and just look under Inside port.

Hope this helps

Reply