fossgis / osmdata

Scripts for creating OSM data derived data sets
GNU General Public License v3.0
28 stars 5 forks source link

Read 'land-polygons-complete-4326?zip' #24

Closed brunie-laurent closed 11 months ago

brunie-laurent commented 11 months ago

I have downlaod the package 'land-polygons-complete-4326.zip' on your site : https://osmdata.openstreetmap.de/data/land-polygons.html. I would like to read the .shp file to access to the polygon of the land. I try why GDAL, ok to open th file but no layer in it ??? Do you have a small part of C or CC example to read the polygone of this package Thanks a lot.

joto commented 11 months ago

If you tell us exactly what you did and what you are trying to achieve, then maybe we can help you.

brunie-laurent commented 11 months ago

Hello,

thank you in advance for your help and sorry for my bad English.

I am looking to create a small application under Linux which allows me to display on a base map, ships identified by their AIS and some other data.

I made a prototype of the application that uses data for polygons land that is old and not very accurate.

I would like to replace this old data with the more precise 'land-polygons-complete-4326' data that I retrieved from your site.

I'm looking for a C or C++ example of reading this file to acquire the polygons and try to display them on my application.

Can you help me ?

I tried to open the file with GDAL, it works and it finds a layer, but I don't know how to read the polygons in the file.

With my sincere thanks for your help.

Sincerely,

Laurent.

Note: Attached is a dump of the small application I am making.

De : Jochen Topf @. @.> > Envoyé : vendredi 1 décembre 2023 10:05 À : fossgis/osmdata @. @.> > Cc : brunie-laurent @. @.> >; Author @. @.> > Objet : Re: [fossgis/osmdata] Read 'land-polygons-complete-4326?zip' (Issue #24)

If you tell us exactly what you did and what you are trying to achieve, then maybe we can help you.

— Reply to this email directly, view it on GitHub https://github.com/fossgis/osmdata/issues/24#issuecomment-1835725641 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BELVH3WY5DQY736SFOXAFPDYHGMUZAVCNFSM6AAAAABABQ3HQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVG4ZDKNRUGE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BELVH3X44UAUIMFJ42N6IE3YHGMUZA5CNFSM6AAAAABABQ3HQ6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTNNLZUS.gif Message ID: @. @.> >

joto commented 11 months ago

Sorry, I can't help you with that. The files are Shapefiles like millions of others out there, your questions are much too broad and, more importantly, not related to anything specific to the files in question here. I suggest you read the GDAL docs, maybe look at https://gis.stackexchange.com/ , read some books, watch some Youtube videos, there is plenty of information out there, but you'll have to do some work to find it.