Skip to content

Instantly share code, notes, and snippets.

@lossyrob
Created December 8, 2015 22:01
Show Gist options
  • Save lossyrob/df261af1a9a02e088686 to your computer and use it in GitHub Desktop.
Save lossyrob/df261af1a9a02e088686 to your computer and use it in GitHub Desktop.
GeoJson Polygons with fill colors
Display the source blob
Display the rendered blob
Raw
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"stroke": "#555555",
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#00aa22",
"fill-opacity": 0.5
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-76.97021484375,
40.17887331434696
],
[-74.02587890625,
39.842286020743394
],
[-73.4326171875,
41.713930073371294
],
[-76.79443359375,
41.94314874732696
],
[-76.97021484375,
40.17887331434696
]
]
]
}
}, {
"type": "Feature",
"properties": {
"stroke": "#555555",
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#7987ff",
"fill-opacity": 0.5
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-76.21931112358585,
39.25758398551838
],
[-76.21931112358585,
41.38400286314079
],
[-73.48073470415997,
41.38400286314079
],
[-73.48073470415997,
39.25758398551838
],
[-76.21931112358585,
39.25758398551838
]
]
]
}
}, {
"type": "Feature",
"properties": {
"stroke": "#555555",
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#ff7b7e",
"fill-opacity": 0.5
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-76.21931112358585,
41.38400286314079
],
[-73.53719539697788,
41.38400286314079
],
[-74.02587890625,
39.842286020743394
],
[-76.21931112358585,
40.09303234501059
],
[-76.21931112358585,
41.38400286314079
]
]
]
}
}]
}
@neelesh47
Copy link

both polygons are wrong and don't follow the right hand rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment