Geometry Visualizer

Geometry format :
Geometry text :

ESRI JSON samples

    Point
  • {"geometry":{"x" : -10.40, "y" : 33.80}}
  • {"geometry":{"x" : -10.40, "y" : 33.80}, "symbol" : {"type": "esriSMS", "style": "esriSMSSquare", "color": [76,115,0,255], "size": 8, "angle": 0, "xoffset": 0, "yoffset": 0, "outline":{ "color": [152,230,0,255], "width": 1 }}, "spatialReference" : {"wkid" : 3857}}
    Multipoint
  • {"geometry":{"points" : [ [10, 20], [10,40], [20,40], [30,30] ]}}
    Polyline
  • {"geometry":{"paths" : [[ [10, 20], [10,40], [20,40], [30,30] ], [[50,50], [60,70]]]}}
  • {"geometry":{"paths" : [[ [10, 20], [10,40], [20,40], [30,30] ], [[50,50], [60,70]]]}, "symbol": {"type": "esriSLS", "style": "esriSLSDot", "color": [115,76,0,255], "width": 1 }}
    Polygon
  • {"geometry":{"rings" : [[ [10, 20], [10,40], [20,40], [30,30], [10,20] ], [[50,50], [60,70], [60,50], [50,50]]]}}
  • {"geometry":{"rings" : [[ [10, 20], [10,40], [20,40], [30,30], [10,20] ], [[50,50], [60,70], [60,50], [50,50]]]}, "symbol":{"type": "esriSFSCross", "style": "esriSFSSolid", "color": [115,76,0,255], "outline": { "type": "esriSLS", "style": "esriSLSSolid", "color": [110,110,110,255], "width": 1 }}}
    Envelope
  • {"geometry":{"xmin" : -109.55, "ymin" : 25.76, "xmax" : -86.39, "ymax" : 49.94},"spatialReference" : {"wkid" : 3857}}

For more info on the ESRI JSON geometry types and symbols go to:

http://resources.esri.com/help/9.3/arcgisserver/apis/rest/geometry.html http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/symbol.html

WKT samples

Most samples where found on the Wikipedia article Well-known text.
    Point
  • POINT (30 10)
  • POINT (-10.40 33.80)
    Multipoint
  • MULTIPOINT ((10 40), (40 30), (20 20), (30 10))
  • MULTIPOINT (10 40, 40 30, 20 20, 30 10)
    Linestring
  • LINESTRING (30 10, 10 30, 40 40)
    Multilinestring
  • MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))
    Polygon
  • POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))
  • POLYGON ((35 10, 10 20, 15 40, 45 45, 35 10),(20 30, 35 35, 30 20, 20 30))
    Multipolygon
  • MULTIPOLYGON (((30 20, 10 40, 45 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))
  • MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 45 20, 30 5, 10 10, 10 30, 20 35),(30 20, 20 25, 20 15, 30 20)))

GeoJSON samples

Most samples where found in Appendix A of the GeoJSON Format Specification.
    Point
  • { "geometry": { "type": "Point", "coordinates": [100.0, 0.0] } }
    MultiPoint
  • { "geometry": { "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } }
    LineString
  • { "geometry": { "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } }
    MultiLineString
  • { "geometry": { "type": "MultiLineString", "coordinates": [ [ [100.0, 0.0], [101.0, 1.0] ], [ [102.0, 2.0], [103.0, 3.0] ] ] } }
    Polygon
  • { "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] } }
  • { "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ] ] } }
    MultiPolygon
  • { "geometry": { "type": "MultiPolygon", "coordinates": [ [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]], [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]], [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]] ] } }

Extra info

Used technologies:

OpenLayers

ESRI javascript api

Dojo (extensively used by the ESRI javascript API)

JSON2 library from Douglas Crockford. Minified at http://fmarcia.info/jsmin/test.html

The map service that was used to initialize the map is served by ESRI and can be found at ArcGIS Online. The spatialreference of this service is Web Mercator (ESRI:102100). Which is the ESRI replacement for EPSG:3857.

All feedback is welcome on my gmail (gissolved at ...) or on Twitter (@gissolved).