From: Manfred S. <man...@gm...> - 2020-03-07 10:22:39
|
Am 07.03.20 um 00:58 schrieb Ethan A Merritt: > On Wednesday, 4 March 2020 12:34:45 PST Allin Cottrell wrote: >> On Wed, 4 Mar 2020, Manfred Schwarb wrote: >> >>> More to the topic, I think the shape format is proprietary, >>> complicated, spread over multiple files, limited (number of >>> fields, length of field names, file size,...), so in one word: >>> "legacy". >>> >>> So I don't think it is an appropriate format for interfacing with >>> gnuplot. I made positive experiences with GeoJSON, it is a simple, >>> very versatile format, and I think most GIS programs can read and >>> write this format, so why not use some geojson routine and put it >>> into gnuplot? >> >> I'm all in favor of nicer and non-proprietary formats, but what's >> the comparison in terms of availability of files representing >> polygons one might want (US states, counties or commuting zones, EU >> countries or regions, etc.)? It's my impression that you can easily >> pick up shapefiles for any/all of these -- nasty as the format may >> be -- but what about GeoJSON files? >> >> Allin Cottrell Allin, of course you are right, I guess there are almost no public GeoJSON polygon files available. GeoJSON is more of a intermediate format to transfer data from one application to another one. For me the choice of a pure shapefile solution simply sounds a bit wierd, either a very slim solution supporting some simple format or a full-fledged solution using libgdal (which supports ~50 different formats) would make sense. > > Good call. Geojson looks quite promising. > A real parser should be easy, but even a quick pass through sed > or a text editor makes it usable. > I have posted a proof-of-principle example using US state boundary > data from a sample file on the geojson development site: > > http://skuld.bmsc.washington.edu/people/merritt/gnuplot/ > Thanks for the example. Often the issue is, that the provided shapefiles are a complete mess and you have to extract some polygons from it. With geojson, at least with the variant that gdal writes, this is very simple: Each polygon is on its own line. So, assuming the polygons are annotated, you can grep for a polygon and re-add header and footer afterwards. > Ethan > > > > > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > |