Supported import and export formats for spatial data

The following table lists the data and file formats supported by SQL Anywhere for importing and exporting spatial data:

Data format Import Export Description

Well Known Text (WKT)

Yes Yes

Geographic data expressed in ASCII text. This format is maintained by the Open Geospatial Consortium (OGC) as part of the Simple Features defined for the OpenGIS Implementation Specification for Geographic Information. See [external link] www.opengeospatial.org/standards/sfa.

Here is an example of how a point might be represented in WKT:

'POINT(1 1)'

Well Known Binary (WKB)

Yes Yes

Geographic data expressed as binary streams. This format is maintained by the OGC as part of the Simple Features defined for the OpenGIS Implementation Specification for Geographic Information. See [external link] www.opengeospatial.org/standards/sfa.

Here is an example of how a point might be represented in WKB:

'0101000000000000000000F03F000000000000F03F'

Extended Well Known Text (EWKT)

Yes Yes

WKT format, but with SRID information embedded. This format is maintained as part of PostGIS, the spatial database extension for PostgreSQL. See [external link] postgis.refractions.net/.

Here is an example of how a point might be represented in EWKT:

'srid=101;POINT(1 1)'

Extended Well Known Binary (EWKB)

Yes Yes

WKB format, but with SRID information embedded. This format is maintained as part of PostGIS, the spatial database extension for PostgreSQL. See [external link] postgis.refractions.net/.

Here is an example of how a point might be represented in EWKB:

'010100000200400000000000000000F03F000000000000F03F'

Geographic Markup Language (GML)

No Yes

XML grammar used to represent geographic spatial data. This standard is maintained by the Open Geospatial Consortium (OGC), and is intended for the exchange of geographic data over the internet. See [external link] www.opengeospatial.org/standards/gml.

Here is an example of how a point might be represented in GML:

<gml:Point> <gml:coordinates>1,1</gml:coordinates> </gml:Point>

KML

No Yes

Formerly Google Keyhole Markup Language, this XML grammar is used to represent geographic data including visualization and navigation aids and the ability to annotate maps and images. Google proposed this standard to the OGC. The OGC accepted it as an open standard which it now calls KML. See [external link] www.opengeospatial.org/standards/kml.

Here is an example of how a point might be represented in KML:

<Point> <coordinates>1,0</coordinates> </Point>

ESRI shapefiles

Yes No

A popular geospatial vector data format for representing spatial objects in the form of shapefiles (several files that are used together to define the shape). For more information about ESRI shapefile support, see Support for ESRI shapefiles.

GeoJSON No Yes

Text format that uses name/value pairs, ordered lists of values, and conventions similar to those used in common programming languages such as C, C++, C#, Java, JavaScript, Perl, and Python.

GeoJSON is a subset of the JSON standard and is used to encode geographic information. SQL Anywhere supports the GeoJSON standard and provides the ST_AsGeoJSON method for converting SQL output to the GeoJSON format. See ST_AsGeoJSON method for type ST_Geometry.

Here is an example of how a point might be represented in GeoJSON:

{"x" : 1, "y" : 1, "spatialReference" : {"wkid" : 4326}} 

For more information about the GeoJSON specification, see [external link] geojson.org/geojson-spec.html.

Scalable Vector Graphic (SVG) files

No Yes

XML-based format used to represent two-dimensional geometries. The SVG format is maintained by the World Wide Web Consortium (W3C). See [external link] www.w3.org/Graphics/SVG/.

Here is an example of how a point might be represented in SVG:

<rect width="1" height="1" fill="deepskyblue" stroke="black" stroke-width="1" x="1" y="-1"/>