8000 Handling of simple style properties · Issue #15 · tmcw/geojson.net · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Handling of simple style properties #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rowanwins opened this issue May 26, 2018 · 7 comments
Open

Handling of simple style properties #15

rowanwins opened this issue May 26, 2018 · 7 comments

Comments

@rowanwins
Copy link
Collaborator

Would be great if we could look into this issue around handling of the simple style properties that get added to features.

@stevage has offered me 4 brownie points to get this issue resolved, 4 can you believe it, it's so worth it!

I'm happy to take a preliminary look at it

@tmcw
Copy link
Owner
tmcw commented May 28, 2018

I'm not sure if we should port over simplestyle support at all in the first revision; Mapbox abandoned it, no other organizations adopted it. It was a nice and semi-standardized way to style features, but without future support (zero GL compatibility, for example), it's kind of hosed.

@sgillies
Copy link
sgillies commented May 28, 2018

I was not happy with how simplestyle polluted the properties object of a feature. What would you think about keeping this kind of styling, but moving the styling properties to their own object such as Feature.style?

@tmcw
Copy link
Owner
tmcw commented May 28, 2018

High-level wise, it's far out of scope for this project to be the first implementation of a new style spec. In terms of the specific proposal: per previous discussions, I still think that keeping data anywhere other than properties means risking it being botched in a round-trip. It would require some field research to discover whether that is still true. I would bet it is, and it'd be even worse in stuff like the rust-geo project, where all GeoJSON objects are very strictly typed. Adding a new top-level key seems like trading a pretty minor issue (property conflicts?) for an ongoing, major issue (data loss, implementation pain).

@stevage
Copy link
stevage commented May 28, 2018 via email

@sgillies
Copy link

Round-tripping of GeoJSON extensions is supported by GDAL since version 2.1 (https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr) which means, to a first approximation, that it is supported everywhere.

I don't especially like simplestyle, and think that geojson.net could do the web a big favor by supporting better extensions (that have yet to prove their worth, I admit), but removing it will catch users off-guard, I think.

@tmcw
Copy link
Owner
tmcw commented May 28, 2018

Okay, well - my position is that I'll implement an "improved / better-liked style spec" if one exists. But probably won't write another spec of that sort, or throw a lot of time into being the reference implementation, because there's enough work involved in this project just to get the basics solid, and I don't have a dog in the race of geospatial standards anymore.

@rowanwins
Copy link
Collaborator Author

Bit of a tough space because there are so few options, and the ones that do exist have limited like-ability and adoption.

In lieu of implementing a simplestyle I wonder if you/we could have a button to allocate random colours to features (eg a colorbrewer palette) and use the leafletjs style options rather than any properties on the geojson itself. In 90% of cases that would suffice for my use cases where I'm just trying to visually differentiate between different features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0