Searching for EPSG codes
Programmers interested in using prj2EPSG as a web service can perform a GET request against http://prj2epsg.azimap.com/search.<type>
with the following parameters:
- terms: the search terms, which can be a set of keywords, or a full WKT representation (e.g., the contents of a prj file)
- mode: possible values are auto, wkt and keywords, with auto being the default if the parameter is not specified. In keywords mode the terms will be interpreted as a set of keywords to be searched for, in wkt mode the system will parse the representation and look for a match, in auto mode the server will automatically figure out the appropriate mode by checking if terms is a valid WKT representation.
If <type> is html the usual HTML response will be provided, if json is used the response will be a JSON document with the following fields:
- exact: true if the provided WKT could be matched exactly to one entry in the EPSG database, false otherwise
- totalHits: total amount of potential results found in the database. The actual codes list is always capped to 20
- error: reports WKT parsing errors, if any
- codes: a list of EPSG code objects, each one containg:
- code: the EPSG code
- name: the coordinate reference system name
- url: the full url to the EPSG code description page
Examples
Try out the following requests against prj2EPSG:
- Searching for EPSG codes in Italy:
http://prj2epsg.azimap.com/search.json?terms=Italy{ "codes" : [ { "code" : "3003", "name" : "Monte Mario / Italy zone 1", "url" : "http://prj2epsg.azimap.com/epsg/3003.json" }, { "code" : "3004", "name" : "Monte Mario / Italy zone 2", "url" : "http://prj2epsg.azimap.com/epsg/3004.json" }, { "code" : "26591", "name" : "Monte Mario (Rome) / Italy zone 1", "url" : "http://prj2epsg.azimap.com/epsg/26591.json" }, { "code" : "26592", "name" : "Monte Mario (Rome) / Italy zone 2", "url" : "http://prj2epsg.azimap.com/epsg/26592.json" } ], "exact" : false, "totalHits" : 4 }
- Searching for EPSG codes related to "New York West" (mind the quotes):
http://prj2epsg.azimap.com/search.json?terms=%22New York West%22{ "codes" : [ { "code" : "2262", "name" : "NAD83 / New York West (ftUS)", "url" : "http://prj2epsg.azimap.com/epsg/2262.json" }, { "code" : "2830", "name" : "NAD83(HARN) / New York West", "url" : "http://prj2epsg.azimap.com/epsg/2830.json" }, { "code" : "2907", "name" : "NAD83(HARN) / New York West (ftUS)", "url" : "http://prj2epsg.azimap.com/epsg/2907.json" }, { "code" : "3629", "name" : "NAD83(NSRS2007) / New York West", "url" : "http://prj2epsg.azimap.com/epsg/3629.json" }, { "code" : "3630", "name" : "NAD83(NSRS2007) / New York West (ftUS)", "url" : "http://prj2epsg.azimap.com/epsg/3630.json" }, { "code" : "32017", "name" : "NAD27 / New York West", "url" : "http://prj2epsg.azimap.com/epsg/32017.json" }, { "code" : "32117", "name" : "NAD83 / New York West", "url" : "http://prj2epsg.azimap.com/epsg/32117.json" } ], "exact" : false, "totalHits" : 7 }
- Searching for the Finland Uniform Coordinate System with a WKT representation:
http://prj2epsg.azimap.com/search.json?mode=wkt&terms=PROJCS[%22KKJ+%2F+Finland+Uniform+Coordinate+System%22%2CGE...{ "codes" : [ { "code" : "2393", "name" : "KKJ / Finland Uniform Coordinate System", "url" : "http://prj2epsg.azimap.com/epsg/2393.json" } ], "exact" : true }