Skip to main content
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.

Best answer by rahulsharma

robeesafe wrote:

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

View original
Did this help you find an answer to your question?

3 replies

rahulsharma
Safer
Forum|alt.badge.img+10

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.


  • Author
  • April 9, 2021

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.

 


rahulsharma
Safer
Forum|alt.badge.img+10
  • Safer
  • Best Answer
  • April 9, 2021
robeesafe wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings