GeoCSV: Unterschied zwischen den Versionen
Aus Geoinformation HSR
Stefan (Diskussion | Beiträge) K |
Stefan (Diskussion | Beiträge) K |
||
Zeile 1: | Zeile 1: | ||
− | Specification of a 'modern' CSV with a geometry extension of either two | + | Specification of a 'modern' CSV with a geometry extension of either two easting/northing colums or one WKT column! |
=== CSV file format specification === | === CSV file format specification === | ||
* Encoding is UTF-8 by default. | * Encoding is UTF-8 by default. | ||
− | * First row contains | + | * First row contains attribute names separated by a => delimiter. |
− | * | + | * Following rows are contains values separated by a => delimiter. |
− | * Strings are enclosed by parantheses, to allow delimiters inside (e.g. "string") | + | * Delimiter is semicolon (;) by default. |
− | * . | + | * Strings are enclosed by parantheses, to allow delimiters inside (e.g. "string"). |
+ | * Data types (if supported from source or target system): See CSVT file format specification. | ||
+ | * Coordinate system is WGS84 (EPSG:4326) by default. | ||
− | + | === GeoCSV file format specification === | |
+ | GeoCSV is based on CSV. The extension comes with two variants: Options easting/northing and Options WKT | ||
− | + | Options "easting/northing" (similar to x/y in mathematics): | |
+ | * Geometry Point type as two neighboring columns: one containing the easting coordinate, and one containing northing coordinate separated by the common delimiter. | ||
+ | * Example for the two easting/northing columnts "47.2274;8.8249". | ||
+ | * This option supports only Points. | ||
+ | |||
+ | Options WKT: | ||
+ | * [WKT] ("Well Known Text") is originally defined by the Open Geospatial Consortium (OGC) and described in their Simple Feature Access specification (also ISO SQL/MM). | ||
+ | * Its a String containing a constructor, like for example: "POINT (47.2274,8.8249)". | ||
+ | * This option supports POINT, | ||
+ | * See e.g. http://en.wikipedia.org/wiki/Well-known_text | ||
− | |||
=== CSVT file format specification === | === CSVT file format specification === | ||
− | Field/column types | + | Field/column types (if supported from source or target system): |
* Integer | * Integer | ||
* Real | * Real |
Version vom 30. April 2015, 15:12 Uhr
Specification of a 'modern' CSV with a geometry extension of either two easting/northing colums or one WKT column!
CSV file format specification
- Encoding is UTF-8 by default.
- First row contains attribute names separated by a => delimiter.
- Following rows are contains values separated by a => delimiter.
- Delimiter is semicolon (;) by default.
- Strings are enclosed by parantheses, to allow delimiters inside (e.g. "string").
- Data types (if supported from source or target system): See CSVT file format specification.
- Coordinate system is WGS84 (EPSG:4326) by default.
GeoCSV file format specification
GeoCSV is based on CSV. The extension comes with two variants: Options easting/northing and Options WKT
Options "easting/northing" (similar to x/y in mathematics):
- Geometry Point type as two neighboring columns: one containing the easting coordinate, and one containing northing coordinate separated by the common delimiter.
- Example for the two easting/northing columnts "47.2274;8.8249".
- This option supports only Points.
Options WKT:
- [WKT] ("Well Known Text") is originally defined by the Open Geospatial Consortium (OGC) and described in their Simple Feature Access specification (also ISO SQL/MM).
- Its a String containing a constructor, like for example: "POINT (47.2274,8.8249)".
- This option supports POINT,
- See e.g. http://en.wikipedia.org/wiki/Well-known_text
CSVT file format specification
Field/column types (if supported from source or target system):
- Integer
- Real
- String
- Date ("YYYY-MM-DD"), Time ("HH:MM:SS+nn") and DateTime (YYYY-MM-DD HH:MM:SS+nn)
See also http://www.gdal.org/drv_csv.html section with .csvt extension.