Giter Club home page Giter Club logo

Comments (10)

cleder avatar cleder commented on July 29, 2024

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.

steko avatar steko commented on July 29, 2024

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.

jzmiller1 avatar jzmiller1 commented on July 29, 2024

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#L33

This 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.

steko avatar steko commented on July 29, 2024

Yes, it's only allowed for Feature objects (my wording was not clear in the previous message).

from pygeoif.

jzmiller1 avatar jzmiller1 commented on July 29, 2024

I made a PR ---> #10

Does this work for your use case?

from pygeoif.

steko avatar steko commented on July 29, 2024

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.

jzmiller1 avatar jzmiller1 commented on July 29, 2024

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.

steko avatar steko commented on July 29, 2024

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.

jzmiller1 avatar jzmiller1 commented on July 29, 2024

I updated #10 based on this discussion.

from pygeoif.

steko avatar steko commented on July 29, 2024

Looks OK.

from pygeoif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.