Coder Social home page Coder Social logo

Comments (8)

jorisvandenbossche avatar jorisvandenbossche commented on September 18, 2024 2

I think this is the recommended approach, because this is the easiest way to get data from a shapefile into spatialpandas. A shapefile is a custom format for which you need a (nontrivial) reader, and that isn't included in spatialpandas.
One way is thus to use geopandas (actually fiona or pyogrio, wrapping GDAL). Another way could be to use pyshp if you want to avoid a GDAL dependency, but then you will still have to do the conversion from the pyshp output to what spatialpandas needs yourself.

from spatialpandas.

brl0 avatar brl0 commented on September 18, 2024 2

@jbednar, Your timing in mentioning Awkward is well timed, I literally just clicked to this notification coming from dask-awkward. It is exciting to see you guys moving that forward. :)

Coincidences aside, I really appreciate the efforts, both voluntary and involuntary, you and your team put in to supporting the community, and the same goes for @jorisvandenbossche and the geopandas team. It's amazing how much work and effort goes into building up this ecosystem.

from spatialpandas.

jbednar avatar jbednar commented on September 18, 2024 1

We definitely do not want to try to make SpatialPandas compete with GeoPandas for what GeoPandas already does!

from spatialpandas.

brl0 avatar brl0 commented on September 18, 2024 1

@rrpelgrim,

I think issue #1 is a great reference from the original author of the package on the topic. Specifically:

Non-goals

spatialpandas will be focused on geometry only, not geography. As such:

  • No built-in support for loading data from geography-specific file formats
  • No dependency on GDAL/fiona
  • No coordinate reference frame logic

I do wonder if some projects like pyshp, which was previously mentioned, would benefit from offering spatialpandas as an output option.

I think spatialpandas is great for us, particularly for distributed workloads, but considering some of the great work they have been doing on dask-geopandas, so I'm not sure how much additional value it offers the ecosystem to add many more features here. That said, I think if other lightweight geospatial packages were interoperable with it, it could be very beneficial for users looking to avoid the heavier and occasionally fragile stack of dependencies geopandas is built on top of. But it is hard to imagine ever approaching feature parity, considering the amazing depth of functionality that stack provides.

It should also be noted, that ultimately this project is under the holoviz team organization, who potentially, and justifiably, may be somewhat sensitive to adding features that would become future maintainability challenges.

from spatialpandas.

jbednar avatar jbednar commented on September 18, 2024 1

We at HoloViz would never complain about other packages like pyshp generating spatialpandas compatible output. 🙂

The original author of issue 1 has moved on from our group, so it's up to me now, I guess. BTW, we will soon be looking at whether Awkward arrays could work as a basis for spatialpandas, and if so the task would then be to connect pyshp with Awkward. Can't really look at that until June, though!

from spatialpandas.

jbednar avatar jbednar commented on September 18, 2024

Spatialpandas objects have a from_shapely classmethod (see e.g. https://github.com/holoviz/spatialpandas/blob/master/spatialpandas/geometry/ring.py), which looks like it would work if you use Shapely to read it.

from spatialpandas.

brl0 avatar brl0 commented on September 18, 2024

@andhuang-CLGX, I would definitely suggest reading shapefiles with geopandas and then converting that to a spatialpandas dataframe.

from spatialpandas.

avriiil avatar avriiil commented on September 18, 2024

@brl0 - could you say something about why this is the recommended approach? Are there plans to add an equivalent of geopandas.read_file('file.shp')?

from spatialpandas.

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.