MapPoints
MapPoints assigns a unique code to every square foot on the surface of the earth, which map to X-Y points for use in databases that support two-dimensional geometries. Cubic-foot sized areas in 3-D space are also supported. To decode a location code, enter it following the "http://MapPoints.com/" in the address bar - for example: http://MapPoints.com/2esioc15ilsd
How it works:
- Every location is given a unique alphanumeric location code. Locations at ground level get a 12-character code representing a one-square foot area in a first-quadrant 2-dimensional coordinate system. Locations not on the surface of the Earth, such as the location of an airplane or submarine, are given a longer code representing a one-cubic foot area in a 3-D coordinate system. One use of a location code is as a short URL for a location, identifying a location with a one-foot resolution.
- An (x y) or (x y z) coordinate (Simpson coordinate) can be easily extracted from the location code.
- Conversion between location codes and Simpson coordinates can be easily implemented in various languages such as Java (incl. Android), Objective-C (for iOS devices: iPhone, iPad, iPod), PHP, etc.
- Distance calculations on the Simpson coordinates will return results in feet. Some databases even facilitate this. In MySQL you can store an (x y) coordinate representing the location as a POINT and retrieve data based on the distance from another point, such as the user's current location. For example, to retrieve places in a one-mile diameter area centered on a user's location of "(24382700 47611100)" you would use: select round(GLength(LineStringFromWKB(LineString(asWKB(p.SimpsonCoord), asWKB(GeomFromText('POINT(24382700 47611100)')))))) Feet, asText(p.SimpsonCoord) from Places p where MBRWithin(p.SimpsonCoord, GeomFromText('POLYGON((24380000 47608400, 24380000 47613800, 24385400 47613800, 24385400 47608400, 24380000 47608400))')); (It may not look so simple, but to the database, it really is!)
Examples
1 MapPoints Location Op: DECODE
Location code: |
2esioc15ilsd |
Simpson coordinate: |
(32507407 47586690) |
MySQL spatial point: |
GeomFromText('POINT(32507407 47586690)') |
Latitude: |
40.44132 |
Longitude: |
-79.9947 |
Elevation: |
766 ft. above sea level |
Ground level: |
766 ft. above sea level |
Altitude: |
0 (ground level) |
Name: |
U.S. Steel Tower |
Ingress portals: | View this location on the Ingress intel map |
|