Last active
September 27, 2019 08:21
-
-
Save svenvarkel/72946468cbb2482bf0be7ee92b82fc3a to your computer and use it in GitHub Desktop.
This gist contains GeoJSON to illustrate center and centroid differences on a rectangular polygon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "FeatureCollection", | |
"features": [ | |
{ | |
"type": "Feature", | |
"properties": { | |
"stroke": "#555555", | |
"stroke-width": 2, | |
"stroke-opacity": 1, | |
"fill": "#555555", | |
"fill-opacity": 0.3 | |
}, | |
"geometry": { | |
"type": "Polygon", | |
"coordinates": [ | |
[ | |
[ | |
-116.89764209999407, | |
34.43966909255738 | |
], | |
[ | |
-113.38201709999477, | |
34.43966909255738 | |
], | |
[ | |
-113.38201709999477, | |
37.862840316787185 | |
], | |
[ | |
-116.89764209999407, | |
37.862840316787185 | |
], | |
[ | |
-116.89764209999407, | |
34.43966909255738 | |
] | |
] | |
] | |
} | |
}, | |
{ | |
"type": "Feature", | |
"properties": { | |
"marker-color": "#ff0000", | |
"marker-size": "small", | |
"marker-symbol": "circle", | |
"name": "centroid" | |
}, | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
-115.49139209999434, | |
35.8089375822493 | |
] | |
} | |
}, | |
{ | |
"type": "Feature", | |
"properties": { | |
"marker-color": "#00ff00", | |
"marker-size": "small", | |
"marker-symbol": "star", | |
"name": "center-of-request" | |
}, | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
-115.13982959999441, | |
36.15125470467228 | |
] | |
} | |
}, | |
{ | |
"type": "Feature", | |
"properties": { | |
"name": "center-of-mass", | |
"marker-color": "#0000ff", | |
"marker-size": "large", | |
"marker-symbol": "cross" | |
}, | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
-115.13982959999441, | |
36.15125470467228 | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment