Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wkt]

Well-known text (WKT) is a text markup language for representing vector geometry objects on a map, spatial reference systems of spatial objects and transformations between spatial reference systems.

61
votes
4answers
33k views

Visualising WKT geometry string in QGIS

A very simple question: Is there a simple tool in QGIS to graphically visualise geometry formatted as text? Example geometry: "POLYGON((571178 6337246,571178 6402217,598061 6402217,598061 ...
30
votes
8answers
58k views

Online WKT and GeoJSON viewer

I once found a great but simple webpage that has a drop down with several text-based GIS formats such as GeoJSON and WKT, and a text box to copy/paste your data. The feature is then drawn on a world ...
19
votes
1answer
8k views

Where can I find the WKT standard or reference?

I had a little confusion about the representation of a geometry as well-known-text (WKT). I was searching for the WKT Specs to search for the exact representation, but I did not find the Standard. Is ...
17
votes
6answers
11k views

Converting between Esri Geometry and WKT using ArcObjects?

It seems like there is no means of converting an ArcObjects geometry to the Well-Known Text representation (and vice versa) in ArcGIS ArcObjects API. The only thing I was able to find is conversion to ...
13
votes
4answers
4k views

Looking for a pythonic way to calculate the length of a WKT linestring

I was quite unsatisfied with Calculating Length of Linestrings in WGS84 in Miles. It kept me wondering if there is a more convenient, Pythonic way to calculate the length of a WKT linestring according ...
13
votes
2answers
17k views

Seeking online WKT editor?

We need to do are very simple administrative boundary drawings over a (insert fav map here) via some website. Our requirements are: click to create points which then form a polygon drag existing ...
13
votes
4answers
6k views

What is the best way to programmatically convert between WKT and Proj4 string?

Some shapefiles have a .prj file associated with it, and the .prj file contains the projection info of the shapefile in the format of WKT. Sometimes I need to convert WKT to proj4 string, and ...
12
votes
4answers
10k views

Converting geometry to WKT using ArcPy?

I would like to be able to convert a single feature (or potentially many features) in an ArcGIS layer into Well Known Text (WKT) format during a geoprocessing operation using Python and ArcPy (no non-...
12
votes
2answers
20k views

Creating CSV with geometry as WKT in QGIS (with choosing field delimiter)

Is there a way to choose the field delimiter when exporting a CSV with geometry as wkt in QGIS? I have a shapefile with donut holes and I'd like to export it as a CSV. It's for a partner whose DB ...
12
votes
2answers
21k views

How to convert a shapefile to WKT?

I'm trying to convert a shapefile into the simple Well Known Text (WKT) format in the example below (from http://en.wikipedia.org/wiki/Well-known_text). MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), (...
10
votes
1answer
4k views

Help with PostGIS polygon geometry - non-closed rings

I've picked up a copy of the super-wicked book 'Python Geospatial Development' by Erik Westra (Amazon link), and I'm working through it. Currently, it's teaching me to load GSHHS coastline data from a ...
10
votes
1answer
681 views

Differences between OGC and ISO WKT/WKB specification?

Are the OGC-Simple feature access and the ISO (ISO/IEC 13249-3:2011 "Information technology - Database languages - SQL multimedia and application packages - Part 3: Spatial") significantly different (...
9
votes
6answers
4k views

WKB to WKT JavaScript function

Turns out json isn't so good at transporting binary data. But with HTML5, XHR2 is now capable of transferring blobs cleanly. I'm looking to transfer binary geometry (to save bandwidth) and decode it ...
9
votes
2answers
7k views

Is there any efficient way to convert Geojson to WKT?

I want to use ST_GeomFromText() to load vector data to PostGIS. However, I don't know how to convert from Geojson type to WKT. N.B. I know I can use OGR2OGR to upload the geojson directly, but I just ...
9
votes
4answers
4k views

How are ESRI WKT projections different from OGC WKT projections?

Does anyone know the precise list of differences between ESRI WKT and OGC WKT projection format strings? I know there are various tools to help convert from ESRI WKT to OGC WKT, including GDAL ...
8
votes
5answers
889 views

Is there a way in QGIS 3 to get a selected feature WKT?

In QGIS 2.x, I used the getWkt plugin: https://github.com/hugoledoux/QGIS-getWKT to get a WKT of a selected feature. But that plugin isn't present in QGIS 3.x. Was that capability built into core ...
8
votes
1answer
10k views

Understanding the format: WKB from WKT and how to convert the first into the latter [closed]

I don't understand which kind of format I have my data. The column name is wkb_geom, so I supposed that data were in WKB format, but then I was checking around and I couldn't find example of it. Data ...
8
votes
2answers
7k views

Converting KML files for use with Python library Shapely

I am trying to get a KML-file (wijken.kml) into Shapely. The KML-file is validated against the proper XML schema, so I guess the input is correct. Routes I have tried: 1) Converting to WKT or WKB ...
8
votes
1answer
2k views

PostGis vs Oracle Spatial 11g performance

I am having a performance issue updating a table in Oracle Spatial 11G while converting 63,000,000 points to WKT format. I also made a comparison with Postgres. Both Postgres and Oracle run in two ...
7
votes
1answer
7k views

Loading WKT polygons into QGIS

I have downloaded a file showing the status of the National Broadband Network. The CSV file contains a field "Development Shape", which contains "POLYGON ((153.101112401 -27.797998206, 153.097860177 ...
7
votes
1answer
16k views

What's the proper format for WKT linestrings when importing into QGIS?

I'm trying to run the following test CSV through the Delimited Text plugin as WKT data: oid,Line 1,LINESTRING((45.554194 -122.686101, 45.433001 -122.762632)) 2,LINESTRING((45.432505 -122.598327, 45....
7
votes
1answer
791 views

Export geography field from SQL for use in GIS

I currently have a table in SQL server management studio (2012) with a geography column. It definitely has valid spatial data, as I can view it in SSMS: What I want is to export the data as a ...
7
votes
3answers
2k views

.NET library to convert KML to WKT?

Anyone know of a free OpenSource .NET library i could use to convert KML to WKT? I know i can use openlayers and there are many JavaScript possibilities, but i need to do this on the back-end.
7
votes
2answers
5k views

How to read csv with WKT geometry in Arcmap?

I have found several parcels I need on a county map viewer. However, the only option to download any of the data is found on a click context menu to "Copy selection as csv" which gives me this: HGID,...
7
votes
1answer
2k views

projection/pyproj puzzle, and understanding SRS format

I have a shapefile that has a .prj file, with the following wkt contents: PROJCS["NAD_1927_StatePlane_New_York_West_FIPS_3103",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["...
7
votes
1answer
13k views

Parameter values to create a vector grid with 1km x 1km cells?

I created a shapefile from WKT in QGIS using the values from this link. I want to create a vector grid with 1kmx1km cells but I can't figure out what values need to be set for the X and Y parameters. ...
7
votes
1answer
648 views

Is there a limit to the number of polygon points you can export to CSV in QGIS 2.4?

Using QGIS 2.4 I am currently importing a csv file with ~30,000 polygons (polygons in WKT format). I also have a United States shapefile. I have used the Clip function to get only the polygons that ...
6
votes
5answers
16k views

How to convert WKB to WKT?

how can i convert wkb to wkt form ... i stored coordinates in wkb but now can it will display to use in wkt form
6
votes
3answers
3k views

Determine if a polygon intersects itself in OpenLayers

I let the users draw polygons and then I try to save them out to the SQL Server 2008 SQLGeography field, but it is giving me an error: Error 24200: The specified input does not represent a valid ...
6
votes
2answers
171 views

Odd behaviour with MULTIPOINT layer in QGIS using delimited files and WKT

I'm writing some python to create grid lines, either as a series of densified LINESTRINGs or a set of MULTIPOINTs. The code uses shapely, and I'm writing WKT to a CSV and importing into QGIS(2.18.3) ...
6
votes
1answer
125 views

Is there a common standard for how GIS information is displayed?

New to GIS programming so this might be a silly question. Is there a standard way to store/transmit how a GIS feature is to be displayed? So I can see there's loads of standard ways of storing tha ...
6
votes
1answer
300 views

Working with ESRI WKT Spatial Reference in ArcGIS API for JavaScript?

I have been practising ArcGIS in JavaScript (for WMS layers ) and have always faced numerical values of SpatialReference like wkid: 102100, but now I faced in this format: 'PROJCS["...
6
votes
1answer
376 views

What is the definition for a geographic coordinate system with east/west bounds of 0 to 360

I need the coordinate system reference or a projection definition that uses geographic (i.e. lat/lon) coordinates but instead of east/west bounds being defined as 180 to -180, I need them to be ...
6
votes
1answer
1k views

How to find the actual projection name (code) in a PROJCS text data?

Given a PROJCS data PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223560493, AUTHORITY["EPSG","7030"]], ...
5
votes
3answers
2k views

How to get WKT for various Spatial Reference Systems?

I need to provide WKTs of spatial reference systems in the APIs provided by GDAL/OGR. Is there some specific place where I can look for WKTs of the spatial reference systems that I'm working with? Or ...
5
votes
1answer
1k views

How do you represent text in WKT

I need to label the simple-features/shapes in a Well-known text file. Is there some best practice on how to achieve this? Should I just keep the labels as separate entities linked to the WKT or is it ...
5
votes
5answers
1k views

WKT for EPSG:4326 with LON 0 to +360 instead of -180 to +180

I have GRIB2 files that seem to be in a projection similar to EPSG: 4326, except that instead of longitude between -180 and +180 it is between 0 and 360. My intention is to get these files into ...
5
votes
1answer
489 views

PostGis and datatypes WKT

I dont't have any experience with the geographics databases so I hope that you be patiente with me, the thing is: I know that the datatype geography is used if all you care about is measuring ...
5
votes
1answer
1k views

What's this PROJ4 string in WKT?

I have this projection in PROJ4: +proj=tmerc +lat_0=41.836944 +lon_0=-87.684722 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs What's the WKT translation? I saw this site: http://cfconventions.org/...
5
votes
2answers
192 views

Convert WKT coordinate reference system to PROJ4

I'm currently working on a better support of LAS 1.4 file format in the rlas R package. In LAS 1.4 format the CRS of the point cloud can be stored as a WKT string. For example this is what I read from ...
5
votes
1answer
5k views

Well-known text (wkt) validator

Is there anything like http://jsonlint.com or http://geojsonlint.com for WKT? How can I validate a complex WKT string, say e.g. a Multipolygon?
5
votes
1answer
3k views

Detecting invalid WKT in text column in SQL Server

I've got a whole load of WKT data in a SQL Server table, of which I'm trying to detect the validity. I'm currently doing a query like this: UPDATE f SET f."CurrentGeomValid" = geometry::...
5
votes
3answers
5k views

How to unproject WKT to WKT in .NET?

I have WKT in this format: GEOMETRYCOLLECTION(POLYGON((491990.250718 6212873.59755,491492.160493 6212904.94117,491265.64715 6212790.54445,491319.517251 6212550.36334,491579.624164 6212637.87553,...
5
votes
1answer
745 views

Preserving Curve Geometries in Leaflet

Is there any way to represent a polygon geometry that contains a curve accurately in Leaflet (from WKT)? GeoJSON conversion from WKT is insufficient as it digitizes the points of a curve out to an ...
5
votes
1answer
2k views

What is the best way to convert WKT String to GML String

What is the best way to programatically convert WKT String to GML String? Every reasonable library (at best available in some Maven repository) can be used. Till now I came up with this solution ...
5
votes
0answers
1k views

What traits identify 2D, 2.5D, 3D geometries, and how can you convert downward, such as from 2.5D to 2D? [closed]

In answering OGR - Weird GeomType -2147483645 on polygon shapefile, posed by @Burton449, I came to realize I don't have a definitive grasp on what distinguishes 2D, 2.5D, and 3D geometries. I ...
4
votes
5answers
5k views

Converting WKT to SHP?

I have a text file containing exactly this: POLYGON ((6.2973716 48.98613 1772.1, ... many other Long Lat Altitude values ... )) And only this. It seems to be just like a WKT geometry of a polygon. ...
4
votes
1answer
615 views

Adding a WKT specified coordinate system to ArcGIS?

I've got a WKT specified coordinate system, how do I add this to ArcGIS?
4
votes
3answers
256 views

Does a projection's WKT reflect the computer's locale?

This should be quick - we're trying to determine if there are problems parsing some WKT text because the system locale considers the decimal separator to be a comma instead of a period. Anyone know? ...
4
votes
3answers
255 views

Are nested parenthesis allowed in MultiPoint WKT?

I'm writing a basic parser for common WKT. The Wikipedia entry for Well-known text says that both of these are equivalent. MULTIPOINT (10 40, 40 30, 20 20, 30 10) MULTIPOINT ((10 40), (40 30), (20 ...