Shapefile: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K
K (7 reasons not to use Shapefiles: Reordered SHP limitations)
 
(20 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
   #TheShapefileChallenge
+
   #TheShapefileChallenge - Revealed that [[GeoPackage]] is the Shapefile of the future (other candidates have been [[GeoJSON]], [[GeoCSV]], [[Geobuf]] 2015-05-01).
  
 
We (GIS) deserve a better desktop/mobile exchange format than Shapefiles! See the "7 reasons not to use Shapefiles".
 
We (GIS) deserve a better desktop/mobile exchange format than Shapefiles! See the "7 reasons not to use Shapefiles".
  
 
Help finding the "Shapefile of the future" within one year. It will be presented at next [[Spirgarten-Treffen]] March 24, 2016.  
 
Help finding the "Shapefile of the future" within one year. It will be presented at next [[Spirgarten-Treffen]] March 24, 2016.  
 
Current candidates are: [[GeoJSON]], [[Geobuf]], [[GeoPackage]]. Other propositions are welcome.
 
  
 
== 7 reasons not to use Shapefiles ==
 
== 7 reasons not to use Shapefiles ==
  
# attribute names are restricted to 8 chars (dbf)
+
# Attribute name lengths are restricted to 10 chars (dbf).
# max. file size is restricted to 2GB (dbf)
+
# Three (or more) cluttered files (.shp, .dbf, .shx, .prj, etc.) and incompatible indexes.
# dozens of cluttered files (.shp, .dbf., .prj, .shx, etc.) and incompatible indexes
+
# No string type >255 chars (no arcs, no topology).
# only one geometry per table
+
# Max. file size is restricted to 2GB (dbf).
# no Multi Geometries and no Geometry Collection
+
# No Multi LineString/Multi Polygon (and no Geometry Collection).
# no arcs, no topology
+
# Only one geometry per table.
# no schema (reference)
+
# No schema (reference) and the layer name has to be derived from the filename.
  
 
''For german see [[#7 Gründe, die gegen Shapefiles sprechen|below]].''
 
''For german see [[#7 Gründe, die gegen Shapefiles sprechen|below]].''
 +
 +
== 7 Gründe, die gegen Shapefiles sprechen ==
 +
 +
# Attributnamen beschränkt auf 10 Zeichen (DBF)
 +
# Max. Dateigrösse beschränkt auf 2 GB (DBF)
 +
# Drei (oder mehr) separate Dateien (.shp, .dbf, .shx, plus .prj, .cpg, etc.), sowie inkompatible Indexe
 +
# Nur eine Geometrie pro Tabelle
 +
# Keine MultiLineString/MultiPolygon und keine Collection-Geometrien
 +
# Keine Strings >255 Zeichen, keine Kreisbogen, keine Topologie
 +
# Kein Schema (oder Referenz) und der Tabellenname muss vom Filenamen hergeleitet werden
 +
 +
Die Kandidaten waren: siehe oben.
  
 
== Notes in German ==
 
== Notes in German ==
Zeile 32: Zeile 42:
 
** .shp: Shapefile geometry data  
 
** .shp: Shapefile geometry data  
 
** .dbf: database data, siehe [[DBF]]
 
** .dbf: database data, siehe [[DBF]]
 +
** .shx: shapefile index (internal). Falls .shx fehlt, kann es mit Tools neu aus .shp generiert werden.
 
* "important":
 
* "important":
 
** .prj: projection file with coordinate reference system info, siehe [[PRJ]]
 
** .prj: projection file with coordinate reference system info, siehe [[PRJ]]
* "derivable":
+
* "other":
** .shx: shapefile index (internal), falls .shx fehlt, kann es mit Tools neu aus .shp generiert werden.
 
* other:
 
 
** .sbn: shapefile (internal)
 
** .sbn: shapefile (internal)
 
** .sbx: shapefile (internal)
 
** .sbx: shapefile (internal)
 
** .avl: ArcView legend file
 
** .avl: ArcView legend file
 
** .rtf: data dictionary (rich text document)
 
** .rtf: data dictionary (rich text document)
 
== 7 Gründe, die gegen Shapefiles sprechen ==
 
 
# Attributnamen beschränkt auf 8 Zeichen (DBF)
 
# Max. Dateigrösse beschränkt auf 2 GB (DBF)
 
# Dutzende Dateien .shp, .dbf., .prj, .shx, etc…, inkompatible Indexe
 
# Nur eine Geometrie pro Tabelle
 
# Keine Multi- und keine Collection-Geometrien
 
# Keine Kreisbogen, keine Topologie
 
# Keine Schema-Referenz
 
 
  #TheShapefileChallenge
 
 
Helft mit bis in einem Jahr das "Shapefile der Zukunft" zu finden. Es wird am nächsten [[Spirgarten-Treffen]] vom 24. März 2016 - also Gründonnerstag - vorgestellt.
 
 
Aktuelle Kandidaten sind: [[GeoJSON]], [[Geobuf]], [[GeoPackage]]. Weitere Vorschläge sind willkommen.
 
  
 
== Dokumentation ==
 
== Dokumentation ==

Aktuelle Version vom 8. September 2017, 08:25 Uhr

 #TheShapefileChallenge - Revealed that GeoPackage is the Shapefile of the future (other candidates have been GeoJSON, GeoCSV, Geobuf 2015-05-01). 

We (GIS) deserve a better desktop/mobile exchange format than Shapefiles! See the "7 reasons not to use Shapefiles".

Help finding the "Shapefile of the future" within one year. It will be presented at next Spirgarten-Treffen March 24, 2016.

7 reasons not to use Shapefiles

  1. Attribute name lengths are restricted to 10 chars (dbf).
  2. Three (or more) cluttered files (.shp, .dbf, .shx, .prj, etc.) and incompatible indexes.
  3. No string type >255 chars (no arcs, no topology).
  4. Max. file size is restricted to 2GB (dbf).
  5. No Multi LineString/Multi Polygon (and no Geometry Collection).
  6. Only one geometry per table.
  7. No schema (reference) and the layer name has to be derived from the filename.

For german see below.

7 Gründe, die gegen Shapefiles sprechen

  1. Attributnamen beschränkt auf 10 Zeichen (DBF)
  2. Max. Dateigrösse beschränkt auf 2 GB (DBF)
  3. Drei (oder mehr) separate Dateien (.shp, .dbf, .shx, plus .prj, .cpg, etc.), sowie inkompatible Indexe
  4. Nur eine Geometrie pro Tabelle
  5. Keine MultiLineString/MultiPolygon und keine Collection-Geometrien
  6. Keine Strings >255 Zeichen, keine Kreisbogen, keine Topologie
  7. Kein Schema (oder Referenz) und der Tabellenname muss vom Filenamen hergeleitet werden

Die Kandidaten waren: siehe oben.

Notes in German

Vektorformat mit Zusatzdateien. Für ArcView entwickelt.

Siehe auch:

Spezifikation:

Ein Shapefile besteht aus einem zwingenden Paar mit Endung .shp und .dbf. Dazu können weitere Dateien kommen:

  • "essential":
    • .shp: Shapefile geometry data
    • .dbf: database data, siehe DBF
    • .shx: shapefile index (internal). Falls .shx fehlt, kann es mit Tools neu aus .shp generiert werden.
  • "important":
    • .prj: projection file with coordinate reference system info, siehe PRJ
  • "other":
    • .sbn: shapefile (internal)
    • .sbx: shapefile (internal)
    • .avl: ArcView legend file
    • .rtf: data dictionary (rich text document)

Dokumentation

Software

  • Shapefile reader/writer von GeoTools (Java)
  • shapelib - Shapefile C Library
  • JShape, frei aber ohne Source code