Giter VIP home page Giter VIP logo

Comments (4)

liuhao0826 avatar liuhao0826 commented on June 4, 2024

generate old file path is ./linestring/北京市-202403010505.dgb
and it is generate sucess with
1715680518718

and append the same path failed;

from geopandas.

liuhao0826 avatar liuhao0826 commented on June 4, 2024

I'm not very familiar with the GDB file format, and I also want to ask why the directory I generated is a directory that contains sub files. shouldn't it have only one main file?

from geopandas.

brendan-ward avatar brendan-ward commented on June 4, 2024

ESRI File GDB is structured as a directory containing a lot of files. That is entirely expected here.

I'm not sure about why Fiona is failing here (probably an error to report there instead), as you are passing the same dataset each time, but this should be possible using engine='pyogrio' if you have that installed; it worked for me with the latest version of pyogrio / GDAL 3.8.3.

from geopandas.

liuhao0826 avatar liuhao0826 commented on June 4, 2024

ESRI File GDB is structured as a directory containing a lot of files. That is entirely expected here.

I'm not sure about why Fiona is failing here (probably an error to report there instead), as you are passing the same dataset each time, but this should be possible using engine='pyogrio' if you have that installed; it worked for me with the latest version of pyogrio / GDAL 3.8.3.

Although the geometry in my geopandas df is a linestring and polygon, when it is written to gdb and read out again, it shows that the geometry is a multilining and multipolygon, which causes the prompt format to not match and results in failure. Therefore, my current solution is to convert the linestring and polygon of the geometry in my df to multi (xx)
with the code:

gpd_convex_Hull_df = gpd.GeoDataFrame(pd_polygon_df, geometry="geometry", crs="EPSG:4326")
gpd_convex_Hull_df['geometry'] = gpd_convex_Hull_df['geometry'].apply(
lambda x: MultiPolygon([x]) if isinstance(x, Polygon) else x)
gpd_linestring_df = gpd.GeoDataFrame(pd_linestring_df, geometry="geometry", crs="EPSG:4326")
gpd_linestring_df['geometry'] = gpd_linestring_df['geometry'].apply(
lambda x: MultiLineString([x]) if isinstance(x, LineString) else x)

from geopandas.

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.