Skip to main content
Question

How to filter the data that enters through an API when it arrives in several formats?


edward_skanska
Participant
Forum|alt.badge.img+1

I am downloading data through an API from OS open source. The connection is set up correctly and the data is downloading when ran but it downloads several versions of the data in several formats such as SHP file, GML and Geotiff. For my project im working on I only need the shapefiles but I cannot figure out what tool to use to filter the rest of the unwanted data types out correctly. Or maybe its not a tool and its done in the JSONfeature parametres?

I have attatched some photos below so I hope it helps clear up any questions.

imageimage

17 replies

featuremichael
Supporter
Forum|alt.badge.img+8

1.)Add a tester behind it or

2.)can u set the query of data what you need in the parameter settings ?


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

1.)Add a tester behind it or

2.)can u set the query of data what you need in the parameter settings ?

You can find it under "Schema Scan Mode" -> "Auto" is default - "JSON Query" is an option- when u set the reader.


edward_skanska
Participant
Forum|alt.badge.img+1
featuremichael wrote:

1.)Add a tester behind it or

2.)can u set the query of data what you need in the parameter settings ?

The tester works great thank you! Not sure how I had not come across this before. Now all I need to do is expand these files which the API have downloaded so I can see their geometry and clip them. image


featuremichael
Supporter
Forum|alt.badge.img+8

Clipper is the Transformer you need :)


edward_skanska
Participant
Forum|alt.badge.img+1
featuremichael wrote:

Clipper is the Transformer you need :)

Is the clipper able to expand this files?


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

Clipper is the Transformer you need :)

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.


edward_skanska
Participant
Forum|alt.badge.img+1
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

Upon having a look I still think ive missed a step, in a test run where the data was in my own system the clipper worked fine and I could see the geometery but with the api data this time I cant view the geometry or clip it. Im not sure if i have exposed the shpfiles within the areas on the screen shot above


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

JSON Data and Clipper Area are in the same CoordinateSystem ?

Can you see through the Data in the Data Inspector ?


featuremichael
Supporter
Forum|alt.badge.img+8
edward_skanska wrote:

Is the clipper able to expand this files?

try the GeometryExtraktor - Option JSON


edward_skanska
Participant
Forum|alt.badge.img+1
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

Thats a good point they probably are not. I cant seem to see what the API's coordinate system is anywhere


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

https://osdatahub.os.uk/ ? i think you get ur api from here ?


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

or try EPSG: 3857 or EPSG: 27700 for UK Data ;)


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

OS Maps API is available as EPSG:27700 (British National Grid which is applicable just for GB) and EPSG:3857 (Web Mercator which is a global coordinate system)


edward_skanska
Participant
Forum|alt.badge.img+1
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

Before i respond i just wanna say thank you for all this help!

 

If thats the case with the API then it shoukd appear within the geometry but it still want display oddly

 

image


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

Try the Esri json reader - i think this is the right way to go ?


featuremichael
Supporter
Forum|alt.badge.img+8
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/esrijson/esrijson.htm?


edward_skanska
Participant
Forum|alt.badge.img+1
featuremichael wrote:

or you use the "Search Envelope" in the Parameter Settings for your JSON Reader - for the Area you need.

Ill give it a try! :)


Reply


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