Rest API returns No Results When Should Intersect

06-24-2019 11:22 AM
New Contributor

I can download statewide NY senate districts using ...

When I query lat/lng against the api... I get zero results.

But when I map the statewide dataset and map the lat/lng I can see I should have an intersect.  Can someone tell me why this intersect returns no results when the point falls within zone on the map??? 

0 Kudos
1 Reply
MVP Regular Contributor

Hi Noah Huntington,

Yeah, got it: you forgot to specify the Input Spatial reference.

The Spatial Reference of the TIGERweb data is 102100  (3857), which is Web Mercator, and the Input Geometry, your point, is in WGS84 (4326). When the input spatial reference differs from the one of the dataset being queried, you have to specify it.

So, with the addition of inSR=4326 your query should (and does) work. The query below returns one polygon with the name "State Senate District 44".  

Does this solve your issue?



0 Kudos