Comments (10)
Sorry for answering so late, I have not noticed it.
It is designed after https://gist.github.com/sgillies/2217756 which does not mention the crs.
If you'd like to add it and it does not break anything that would be fine with me. Thanks for bringing this up :-)
from pygeoif.
If I may join the conversation on this, I wrote a slightly nonstandard Feature class for Total Open Station: https://github.com/steko/totalopenstation/blob/3d61f426278b867c5845e92056861c94ab635772/totalopenstation/formats/__init__.py#L33
This was even before pygeoif had a Feature class of its own (actually, both were done on 4th March, go figure! 😀 ). Now I'd like to stick with the pygeoif version, but can we discuss the possibility of having a top-level key id
that is not nested in properties, in line with the the GeoJSON spec for Feature objects? If there is agreement on this, I could submit a pull request. Otherwise I will happily subclass from pygeoif.Feature.
Thanks for creating pygeoif and for keeping it alive with contributions from others.
from pygeoif.
I searched through the GeoJSON spec at GeoJSON.org and the Feature seems to
be the only object with this top level ID as an option. Did you notice it
anywhere else?
On Aug 1, 2015 5:27 AM, "Stefano Costa" [email protected] wrote:
If I may join the conversation on this, I wrote a slightly nonstandard
Feature class for Total Open Station:
https://github.com/steko/totalopenstation/blob/3d61f426278b867c5845e92056861c94ab635772/totalopenstation/formats/__init__.py#L33This was even before pygeoif had a Feature class of its own (actually,
both were done on 4th March, go figure! [image: 😀] ). Now I'd
like to stick with the pygeoif version, but can we discuss the possibility
of having a top-level key id that is not nested in properties, in line
with the the GeoJSON spec for Feature objects? If there is agreement on
this, I could submit a pull request. Otherwise I will happily subclass from
pygeoif.Feature.Thanks for creating pygeoif and for keeping it alive with contributions
from others.—
Reply to this email directly or view it on GitHub
#4 (comment).
from pygeoif.
Yes, it's only allowed for Feature objects (my wording was not clear in the previous message).
from pygeoif.
I made a PR ---> #10
Does this work for your use case?
from pygeoif.
Yes, that's what I was thinking of, thanks!
I only have one question: why did you make _feature_id
private instead of choosing feature_id
? Alternatively, the shorter fid
could have been used, too (not saying this short would be the best, just asking).
from pygeoif.
I made _feature_id private because _geometry and _properties have been private since before I started looking at this project. I just wanted to blend in with what was already going on. I should have added a _feature_id = None to the class to match the _properties and _geometry but I just noticed that I missed it.
I preferred to use just id as the variable name but that collides with some python built in stuff as far as I can tell. I used feature_id over fid as it makes the code more readable to me.
from pygeoif.
Right, I see the rationale and I agree. As you say, there should be a _feature_id = None
and, I think, also a @property
as for _properties and _geometry.
from pygeoif.
I updated #10 based on this discussion.
from pygeoif.
Looks OK.
from pygeoif.
Related Issues (20)
- Wrong Multipolygon HOT 5
- Initial Update
- Simplify line HOT 3
- add pre-commit
- Configure Dependabot version updates for actions
- use math.isclose not == for float comparrisions HOT 2
- Can't run test_factories.py HOT 1
- Add Sphinx Documentation
- Geometries should be immutable and hashable
- Pip 23.1 deprecation warning HOT 1
- Modernize packaging
- Add Hypothesis tests HOT 10
- Add force_2d and force_3d HOT 1
- Improve documentation HOT 2
- Graham Scan as an alternative convex hull algorithm.
- from_wkt does not handle nested GeometryCollections correctly
- Add WKT generation based on hypothesis[lark] HOT 1
- Improve performance of the hypothesis strategies
- Hypothesis strategy geometry_collections should be recursive
- Add Hypothesis tests for Feature and FeatureCollection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygeoif.