Hi all,
I'm new to using the rest API so this might be a stupid question but i just can't figure it out...
i'm using postman to make get request to the below url. my parameter is f=json
https://maps.gov.bc.ca/arcgis/rest/services/mpcm/bcgwpub/MapServer/3
i keep on getting the service directory has been disabled error when i add "query" to the above url string. i know the capabilities supported include query...and if add this service to AGOL's web mapping application it can be used in the query widget...
what i'm hoping to achieve here, is to write python code to do spatial queries against this map service layer.
any help is appreciated!!!
jenny
Solved! Go to Solution.
Jenny,
Because the service directory is disabled that means you have to know how to formulate your queries manually. For example:
Now you were specifically asking about doing a spatial query you need these parameters
Jenny,
Because the service directory is disabled that means you have to know how to formulate your queries manually. For example:
Now you were specifically asking about doing a spatial query you need these parameters
Thanks so much for the quick response, Robert! It's working now
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.
Hi Robert,
any idea on how to run the query with polygons that have multiple rings? right now i'm thinking of either run the query for each ring geometry (using search cursor) or combine all rings into a multipart polygon. not sure if there's an alternative to these?
thanks very much!
Jenny
Spatial Queries are only expecting one geometry not an array. So as you have said you will have to create a multipart polygon or run the query on each polygon. I normally use a Geometry service merge to get one multipart polygon.
thanks a lot Robert! i'll look into geometry services
May i reignite this thread to ask whether it's possible to add a bounding box geomtery to a feature service?
Im have a service that i'd like to constrain and though this would be the url:
but it's not working