Methods

Method detail for: getGeoAttByPoly

This request requires you to submit a WKT-formatted polygon (with SRID). The API will spatially determine the number of objects that are wholly or partially within that area and returns a list of attributes for those objects. You may also specify which type of spatial search is performed (INTERSECT/WITHIN). The method defaults to WITHIN.

Valid Datasets

DatasetDataset DetailsMethod Parameters
Carrier RoutesClick To ViewClick To View

When calling this dataset using this method, use these parameters:

Carrier Route CentroidsClick To ViewClick To View

When calling this dataset using this method, use these parameters:

Maponics City PointsClick To ViewClick To View

When calling this dataset using this method, use these parameters:

Maponics Neighborhood Centroids North AmericaClick To ViewClick To View

When calling this dataset using this method, use these parameters:

Maponics Private SchoolsClick To ViewClick To View

When calling this dataset using this method, use these parameters:

Maponics Public SchoolsClick To ViewClick To View

When calling this dataset using this method, use these parameters:

ZIP Code CentroidsClick To ViewClick To View

When calling this dataset using this method, use these parameters:

Sample Request and Return Data

<?xml version="1.0" encoding="UTF-8" ?> <data> <auth> <loginname>your_username</loginname> <key>your_api_key</key> </auth> <request> <dataset>N</dataset> <method>getGeoListByGeom</method> <parameters> <geom>SRID=4326;MULTIPOLYGON(((-74.011683 40.719734,-74.00000 40.719734,-74.00000 40.713734, -74.011683 40.713734, -74.011683 40.719734)))<geom> <fields>neighborhd,nbr_type</fields> <searchType>INTERSECT</searchType> <submatch>N</submatch> </parameters> </request> </data>
{ "data":{ "auth":{ "loginname":"your_username", "key":"your_api_key" } }, "request":[ { "dataset":"CR", "method":"getGeoAttByPoly", "count":"false", "returnType":"json", "parameters":{ "geom":"SRID=4326;MULTIPOLYGON(((-74.011683 40.719734,-74.00000 40.719734,-74.00000 40.713734, -74.011683 40.713734, -74.011683 40.719734)))", "fields":"zipcrid,name", "submatch":"", "searchType":"" } } ] }
<?xml version="1.0" encoding="UTF-8" ?> <data> <request> <item> <neighborhd>Goose Island</neighborhd> <nbr_type>N</nbr_type> </item> <item> <neighborhd>Lincoln Park</neighborhd> <nbr_type>N</nbr_type> </item> <item> <neighborhd>Near North Side</neighborhd> <nbr_type>N</nbr_type> </item> </request> </data>
[ { "resultcode":0, "message":"Return OK", "requestid":"01-1456" }, [ { "zipcrid":"10007C001", "name":"NEW YORK" }, { "zipcrid":"10013C001", "name":"NEW YORK" }, { "zipcrid":"10013C007", "name":"NEW YORK" }, { "zipcrid":"10007C099", "name":"NEW YORK" }, { "zipcrid":"10278C003", "name":"NEW YORK" }, { "zipcrid":"10007C098", "name":"NEW YORK" }, { "zipcrid":"10013C022", "name":"NEW YORK" }, { "zipcrid":"10013C016", "name":"NEW YORK" }, { "zipcrid":"10013C013", "name":"NEW YORK" }, { "zipcrid":"10013C009", "name":"NEW YORK" }, { "zipcrid":"10007C008", "name":"NEW YORK" }, { "zipcrid":"10013C003", "name":"NEW YORK" }, { "zipcrid":"10013C036", "name":"NEW YORK" } ] ]