OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
823 stars 302 forks source link

[Bug] Attribute tables vector layers in Natural Earth sample dataset not readable #4172

Open ecodiv opened 1 month ago

ecodiv commented 1 month ago

Describe the bug

The attribute tables of the vector layers that come with the Natural Earth Sample dataset that you can install from within GRASS GIS are not readable. Trying to open gives an error message (see screenshot below). After dismissing the error message, an empty attribute table opens. The same is true if you download (presumably the same) dataset from the website and for the full world dataset.

To reproduce

  1. Open GRASS GIS, go to the data panel
  2. Select the Download Sample Project option
  3. Select the Natural Earth sample dataset and download
  4. Open any of the vector layers
  5. Open the attribute table of the vector layer

Screenshots

image

System description

Additional context

Reporting here because it influences the experience of grass gis, but perhaps better to report in the grass-website repository?

ecodiv commented 1 month ago

The problem might be with a dbf backend being used. I have created a sample data set with the same layers as the Natural Earth full data set, using sqlite as backend, and that works without problem for me (you can download it from https://ecodiv.earth/share/natural_earth_dataset.zip). Not sure if the problem is with my setup, but irrespectively, is there a reason to use a dbf backend instead of sqlite?

veroandreo commented 1 month ago

The problem might be with a dbf backend being used. I have created a sample data set with the same layers as the Natural Earth full data set, using sqlite as backend, and that works without problem for me (you can download it from https://ecodiv.earth/share/natural_earth_dataset.zip). Not sure if the problem is with my setup, but irrespectively, is there a reason to use a dbf backend instead of sqlite?

Yes, the issue is dbf as the default backend in that project, it's an old one. Can we use your modified version to upload to the website? @neteler what do you think?

neteler commented 1 month ago

Since the procedure (https://grasswiki.osgeo.org/wiki/Convert_all_GRASS_6_vector_maps_to_GRASS_7) is quite some work, using the donated updated version by @ecodiv would be very welcome! Was this procedure used?

In wxgui, the URL is stored here: https://github.com/OSGeo/grass/blob/cb013cccc40978c7db9f1c4ace7924263d00a6db/gui/wxpython/startup/locdownload.py#L75

which points to https://zenodo.org/record/3968936/files/natural-earth-dataset.tar.gz

In my view, the correct way to update would be

ecodiv commented 1 month ago

Since the procedure (https://grasswiki.osgeo.org/wiki/Convert_all_GRASS_6_vector_maps_to_GRASS_7) is quite some work, using the donated updated version by @ecodiv would be very welcome! Was this procedure used?

Hi @neteler no, I downloaded the data anew. However, I have now created an updated dataset using the steps as outlined in the link you provided.

ecodiv commented 1 month ago

@neteler @veroandreo @baharmon And below the link to the updated global_dataset dataset. Note that I replaced two data layers, roads and railroads with newly downloaded and imported Natural Earth layers, because the one in the original global data set did not contain attribute tables.

neteler commented 1 month ago

I like it much better to have the dataset updated, too :-) Thanks @ecodiv .

neteler commented 1 month ago

However, I have now created an updated dataset using the steps as outlined in the link you provided.

* https://ecodiv.earth/share/natural_earth_dataset.zip

* https://ecodiv.earth/share/natural-earth-dataset.tar.xz

May I suggest to add a version into the file names to avoid confusion which one is based on the old data and which one contains fresh Natural Earth data?

ecodiv commented 1 month ago

OK, let me create for both datasets new versions with all data layers based on what is currently available on Natural Earth, that makes it less confusing. Will do that today or tomorrow. @baharmon, as this would be a new version, would it be OK if I add one or two extra layers to the global data set?

ecodiv commented 1 month ago

@baharmon @veroandreo @neteler I recreated the data sets (global data set and natural_earth_dataset) with the latest layers, and with the following changes:

The links to the data sets:

baharmon commented 2 weeks ago

@neteler @veroandreo @ecodiv I have uploaded both datasets to Zenodo and added @ecodiv as a contributor, but have not yet published them. Please let me know if you would like to review entries. Perhaps we should add GRASS Development team as a contributor too? Here are drafts of the 2.0.0 versions of the Natural Earth Dataset and the Global Dataset.

ecodiv commented 2 weeks ago

@neteler @veroandreo Perhaps we should add GRASS Development team as a contributor too?

Good idea

baharmon commented 2 weeks ago

@neteler @veroandreo @ecodiv Published. Here are the DOIs. Theses are the DOIs for all records which will resolve to the latest release. Will open an issue on grass-website to update the global dataset links.