GeoConverter: Unterschied zwischen den Versionen
Tbinna (Diskussion | Beiträge) (→FAQ) |
Tbinna (Diskussion | Beiträge) (→CSV source format used in GeoConverter) |
||
Zeile 82: | Zeile 82: | ||
* The column header must contain one of two possibilities as column names: | * The column header must contain one of two possibilities as column names: | ||
** "LON" followed by "LAT" and a "NAME" attribute. LON/LAT are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses. | ** "LON" followed by "LAT" and a "NAME" attribute. LON/LAT are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses. | ||
+ | ** "LAT" followed by "LON" and a "NAME" attribute. LAT/LON are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses. | ||
+ | ** "longitude" followed by "latitude" and a "NAME" attribute. longitude/latitude are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses. | ||
+ | ** "latitude" followed by "longitude" and a "NAME" attribute. latitude /longitude are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses. | ||
** "ID, NAME, THEGEOM". THEGEOM attributes (alternate name 'OGR_GEOM_WKT') have to be formatted as [[WKT]], i.e. with no comma but including the parantheses. | ** "ID, NAME, THEGEOM". THEGEOM attributes (alternate name 'OGR_GEOM_WKT') have to be formatted as [[WKT]], i.e. with no comma but including the parantheses. | ||
* There can be more attributes than these three. | * There can be more attributes than these three. |
Version vom 29. Januar 2008, 08:32 Uhr
GeoConverter - Free Online Geospatial Data Converter. Reads and writes several GIS vector file formats based on the famous OGR tools.
Homepage: http://geoconverter.hsr.ch
Look also at alternatives here at GIS-Konverter (de), especially at OpenLayers-Online and GPS-Software.
Inhaltsverzeichnis
Documentation
GeoConverter is a static ('1:1') format converter. Possible source GIS vector file formats are mostly the same as the target file formats (see the FAQ below).
The conversion maintains the coordinate reference system, so there is no coordinate transformation happening (yet) except for KML, which always defaults to WGS84 (EPSG 4326, the GPS system).
GeoConverter is based on the FWTools (GDAL 1.5.0b1, FWTools 2.0.2, released 2007/12/05), especially on OGR2OGR documented in the OGR page.
Rules for uploading files
This section explains the rules for uploading files to GeoConverter:
- Let 'source file format' be the file(s) to be uploaded and let 'target file format' be the file you will download. We assume that you deliver only one dataset at a time.
- There are formats, like Shapefile, Mapinfo or INTERLIS 2, which consist of more than one file. Before uploading, they must be packed into a zip file (use e.g. gzip or PKZIP).
- You may zip your file before uploading for those formats which consist of a single file, like GPX and KML.
- If you choose CSV as source file format to upload follow the special formatting described below.
- If you convert data to INTERLIS 2 (.xml), make sure you provide also an INTERLIS (target) model file (.ili).
FAQ
These are Frequently Asked Questions (FAQ) for the GeoConverter documentation Wiki.
- What to do when the conversion fails?
- Check the log file provided with the error.
- Check, if your input file is not bigger than 100 MB. If you have not uploaded a zip file, zip it and try again.
- Read the FAQ and check the rules given here.
- Try out some sample files (see below)
- Finally, if the problem persists consider dropping us a mail.
- What is a layer and a dataset?
- An OGR feature object encapsulates the values of a whole feature, that is a geometry and a set of attributes. A layer object is a collection of features (objects) of the same feature class. A data source represents a file or a database containing one or more layer objects. Note that 'layer' definition and 'feature class' definition are essentially the same. Layers have a reference to a spatial coordinate reference system (CRS). See also OGR for an explanation in german.
- What is WKT?
- Well Known Text, i.e. geometry values in string representation. Typical examples are POINT(1 1), LINESTRING(1 1, 2 2, 3 3) and POLYGON((1 1, 2 2), (2 2, 3 3), (1 1)). See WKT for more information.
- Which file formats are supported by this webapplication?
- These formats are supported for writing and also for reading, except KML (which is write-only). Try them out with the sample data below:
- Comma Separated Value (.csv/(.csvt))
- GPX (.gpx)
- Geographic Markup Language (.gml)
- INTERLIS 1-Transfer Format (.itf/.ili)
- INTERLIS 2-XML Transfer Format (.xml/.ili)
- Keyhole Markup Language (.kml)
- Mapinfo File (.mif/.mid)
- Shapefile (.shp/.dbf/.shx)
- How do I create an INTERLIS file (.ili) when converting to INTERLIS 2?
- See documentation and/or contact us. Future INTERLIS 2 drivers won’t need this parameter for simple cases whereas professional conversion will need a full-fledged and configurable converter (see documentation page).
- I see GPX but can't find any other GPS file formats?
- GPS file formats like NMEA or Garmin (.gdb) are converted best through existing software. See GPS-Software for more information about this topic.
- KML, GML or GPX fail to convert, what to do?
- These formats are XML file formats. XML is a human readable ASCII format with a very rigid structure and encoding. There are readers which validate the input and even complain about the character encoding. Often when there is an encoding called 'UTF-8' but the file comes as Windows 'ANSI'; so you have to look for an editor or a tool which writes a proper UTF-8 encoded file.
- I miss DXF and other CAD file formats?
- Microstation's DGN (up to version 7) is supported by OGR but not implemeted yet in GeoConverter. DXF unfortunately does not yet exist as a suitable driver for OGR altough some free libraries exist - so, sponsors are welcome!
- Why do I have to register before using this service? What are you doing with my personal information like my e-mail?
- We ask for your e-mail and name mainly because of the tedious fight against spam! As a side effect you become part of the GISpunkt HSR community where we send information mails sometimes. These mails are currently sent every other month and will never exceed once a week. Your e-mail will never be used for other purposes whatsoever and we will never give away your personal data.
- What to do when registering fails?
- Check that your user name always begins with Uppercase (e.g. Jdean) even if you provided it in lowercase when registering (that's a MediaWiki 'feature').
- What does GeoConverter mean?
- GeoConverter means "Online Geospatial Data Format Converter".
- Is this webapplication service free?
- Yes, GeoConverter is a free webapplication and it will remain free as long as this service is not abused by daily business cases (e.g. as long as bandwidth remains low).
- Is GeoConverter a competitor to other converter software?
- There are quite some professional products around like FME, igtools or InterlisStudio. These products offer more than a straight forward and static 1:1 conversion. They can be manually configured and often support more file formats. So: No! GeoConverter is meant as an enabler of GIS and geospatial data, nothing more!
- Who runs this webapplication?
- This service is brought to you by GISpunkt HSR. It is an experimental project without any warranty.
- What are the Terms of Service of the GeoConverter?
- See here.
- Where can one submit Bugs and Feature Requests?
- Here in the 'Diskussion' page.
- Can these conversions also be run on a local PC?
- Yes: We use OGR2OGR which is delivered among others as FWTools and you can run it locally as it was designed for initially. See OGR for more information about this.
CSV source format used in GeoConverter
GeoConverter uses the 'Comma Separated Values' (CSV) reader/writer from OGR. The OGR CSV reader/writer allows to encode geometry by using WKT as attribute values. Unfortunately, CSV leaves many descisions open and most annoying is that the (german) MS Excel is a non-conformant CSV writer. When trying to upload CSV from MS Excel some re-formatting is needed before hand, e.g. replacing semi-colons with colons, removing double quotes etc.
These are the rules in order to successfully upload CSV file with geometry:
- Use commas as fiels separators/delimiters
- The first line must be a column header (upper or lower case).
- The column header must contain one of two possibilities as column names:
- "LON" followed by "LAT" and a "NAME" attribute. LON/LAT are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses.
- "LAT" followed by "LON" and a "NAME" attribute. LAT/LON are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses.
- "longitude" followed by "latitude" and a "NAME" attribute. longitude/latitude are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses.
- "latitude" followed by "longitude" and a "NAME" attribute. latitude /longitude are floating point values (e.g. 47.355). Attribute values may (but must not) be enclosed in paratheses.
- "ID, NAME, THEGEOM". THEGEOM attributes (alternate name 'OGR_GEOM_WKT') have to be formatted as WKT, i.e. with no comma but including the parantheses.
- There can be more attributes than these three.
Examples (see HowTo_OGR2OGR for more):
lon, lat, name 12.375, 49.618, Wert 1 16.198, 50.431, Wert 2 19.628, 51.389, Wert 3
ID, NAME, OGR_GEOM_WKT 1, Wert 1, "POINT(12.375 49.618)" 2, Wert 2, "POINT(16.198 50.431)" 3, Wert 3, "POINT(19.628 51.389)"
Download sample files
Get your sample files by clicking to the links below. The data is about Swiss train stations and its of geometry type POINT (see WKT).