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.

3
votes
1answer
497 views

Get EPSG code or CRS name from Proj4 WKT

I am trying to get the EPSG code from a proj4 WKT. :“+proj=lcc +lat_1=46.183333333 +lat_2=47.483333333 +lat_0=45.666666667 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs” But I ...
1
vote
1answer
991 views

Convert OL3 drawn polygon to WKT for inserting to PostGIS

Essentially what I am trying to accomplish is to have a map where the user can draw a geometry, fill in a form and have the record, along with the geometry, saved to PostGIS. I'm new to Javascript (...
0
votes
2answers
529 views

Arcpy Create Polygon Geometry or Shapefile/FeatureLayer from WKT

I have a polygon feature class that i am looping through row by row. I want to take each row/record and create it into its own Polygon Geometry or Shapefile/FeatureLayer using WKT PolygonGeometry ...
1
vote
1answer
254 views

Arcpy to PostgreSQL using psycopg2 with MULTIPOLYGON using WKT

I am trying to create a MULTIPOLGYON in PostgreSQL from WKT format using arcpy.da module and psycopg2. I have had success creating point and multi point shapes this way however I cannot seem to get ...
2
votes
2answers
83 views

Preparing geometry for psycopg2 using ArcPy without SHAPE@WKT?

Trying to print out a polygon shapefile in WKT format in a standalone script. I am using ArcGIS 10.1 and use the da modules all the time. I have seen this post Converting geometry to WKT using ArcPy? ...
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. ...
3
votes
1answer
215 views

Information on WKT definition file

In a well known text definition file of a geolocated image (or whatever else it does) we find this: PROJCS["UTM_Zone_19_Northern_Hemisphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS84",SPHEROID["WGS84",...
0
votes
1answer
165 views

ST_Intersects with EWKB

I am working in a Django and have done a query to get a list of geometries from a table. I want to iterate through that list and insert them into my new query. My notional polygon is: ...
3
votes
1answer
103 views

Converting WKT to ASCII art?

I often end up writing basic geometries in unit tests, looking much like the following: a = "POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"; b = "POLYGON ((0 0, 9 0, 9 9, 0 9, 0 0))"; If I'm feeling ...
0
votes
1answer
432 views

Converting points from MySql database to WKT lines using PHP?

In MySql database I have points (pairs of latitudes and longitudes represented as doubles) like this: LATITUDE | LONGITUDE ---------|---------- 45.045664| 46.084528 26.938933| 60.903848 ..... ...
1
vote
1answer
1k views

Openlayers 3: Plotting WKT format polygons on single layer from array

I am trying to plot polygons in WKT format I have in an array onto a single layer and add it to my map. I can post 1 polygon by referencing an entry in the entry (array[0]) and I have managed to plot ...
4
votes
2answers
2k views

How to get WKT from a QgsGeometry object?

How can I get the wkt from a geometry object in python? I'd like to be able to do something like the following: from qgis.core import * import qgis.utils layer = qgis.utils.iface.activeLayer() for ...
1
vote
1answer
605 views

How to calculate cell tower polygon and get the coordinates in wkt format

I have an use-case where I have to calculate the polygon of cell tower and store the polygon information in wkt format. I have got the following information regarding a cell tower. latitude longitude ...
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"]], ...
0
votes
1answer
105 views

Showing WKT multipolygon in Mapserver results msGEOSError?

I have multipolygon WKT and I want to show it as a layer in Mapserver, I followed Mapserver as in this link http://mapserver.org/mapfile/feature.html but I can see it didn't mention MULTIPOLYGON as ...
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 ...
4
votes
1answer
2k views

Export geometry to WKT using pyshp

Is there a straight method to export shapefile geometry (polygon) to WKT using pyshp module for python? I was looking for something similar to OGR's .ExportToWkt() method, but it seems like there's ...
1
vote
1answer
937 views

Set background color and opacity for a WKT layer vector in OpenLayers3

I have this function: function drawLayer(wktRegion, name,colour = "transparent"){ var format = new ol.format.WKT(); var feature = format.readFeature(wktRegion); feature.getGeometry()...
0
votes
1answer
137 views

PostGIS Unknown Coordinates Format

I've turned a shapefile into a postgis table using shp2pgsql-gui. Then, i wanted to get the coordinates of geom column, for that i converted geom to WTK throught ST_AsText(geom) function. The ...
0
votes
1answer
106 views

Add WKT to OpenLayers 3 map

I recently converted from ESRI products, and I am trying to get a grip on adding a vector layer to OL3 from features returned from the server as WKT. Here is some example code. Why I am not seeing a ...
4
votes
3answers
256 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 ...
3
votes
3answers
3k views

How do I convert WKT geometry from 3D to 2D

I'm working with kml files using Python gdal.ogr module. When I extract feature's geometry using feature.GetGeometryRef(), I get: POLYGON ((44.184069865521963 41.971859752507207 0,44.355248797385123 ...
0
votes
2answers
447 views

Verify with WKT point is in a polygon SQL

I'm using SQL Server and WKT to deal with geographic data. What I'd like to do is have something like : SELECT pt FROM point_table, polygon_table where pt.point_table WITHIN ply.polygon_table Here ...
1
vote
1answer
354 views

ST_Transform error

I am getting an error from ST_Tranform while using ST_Intersection: No function matches the given name and argument types. You might need to add explicit type casts. select ST_Intersection(...
1
vote
1answer
561 views

Finding all polygons inside of a polygon

How to find all the polygons inside of a polygon? I tried ST_Intersects and ST_Contains but they are booleans variables. I have a list of polygons in WKT format, so I am trying to pull all the ...
1
vote
0answers
354 views

Getting H2GIS functions to work in Spherical Space?

I've been playing around with H2GIS (http://www.h2gis.org/) for a project at work and am struggling to get the H2 functions to operate in spherical space (lat/ lon), rather than cartesian space. The ...
1
vote
1answer
675 views

QGIS How to draw lines from two points in a CSV?

I have a largely identical query to How to draw lines from two points in a CSV?, however the solution listed isnt working for me. My original text format is PID, Start Northing, Start Easting, End ...
2
votes
1answer
328 views

How to copy the geometry WKT from a temporary scratch layer in QGIS?

It seems in the 2.14.2 version of QGIS the ability to copy the WKT from the geometry of a temporary scratch layer has been removed. Previously you could create, for example, a new polygon feature in ...
5
votes
3answers
3k 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 ...
3
votes
1answer
197 views

PostGIS: floating point representation problem with ST_AsText

I have a table with geometries, all with about 13 digits of accuracy. While trying to represent them with ST_AsText though, most vertices come out in decimal notation, but some come out in scientific ...
2
votes
0answers
147 views

GDAL c# API returned different WKT from gdalinfo

I've found completely different results in WKT strings while using gdalinfo utility and method from c# API GetProjectionRef(). In the first case the result was: PROJCS["WGS 84 / Pseudo-Mercator", ...
1
vote
0answers
197 views

Proj4 WKT - Cartesian with origin to EPSG900913

I'm converting wgs84 to cartesian with origin using simple function in c# public static double[] LL_TO_XY(double latitude, double longitude, double originLatitude, double originLongitude) { ...
1
vote
2answers
170 views

What is the format for OSM lat/lon in .osm/.osh files and how to import correctly into PostGIS?

I've been having issues converting OpenStreetMap geometries to valid points in PostGIS. MY PostGIS table has the this definition for the geom column: SELECT AddGeometryColumn('node','geom',900913,'...
1
vote
0answers
126 views

Converting image type into WKT? [closed]

I’m working with a GIS that uses SQL Server as its DBMS. So I have to insert some data into a column called dbo.CidadesGeo, but before do that I have to understand how the geometry (geometria) column ...
3
votes
1answer
937 views

Visualize WKT polygon on a map

Is there any tool that will let me visualize a WKT polygon on a world map such as google maps?
1
vote
1answer
226 views

Axis order in user Shapefile

I have a shapefile which has the following PRJ GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], ...
2
votes
0answers
351 views

What does EMPTY mean in WKT? [duplicate]

The OGC Simple Features standard (OGC 06-103r4, Version: 1.2.1), section 7, defines the formal grammar of Well Known Text (WKT) representation. A small excerpt (omitting a large subset of geometry ...
4
votes
1answer
511 views

From featureclass (or shp) to WKT e GeoJSON

I use ArcGIS 10.1 without Data Interoperability extension and I want to convert some feature classes (point, lines and polygons) contained in an .mdb. I read some posts but can't convert my file. ...
1
vote
0answers
215 views

QGIS Copy Attribute Table To Excel - where does the new lines come from?

I have an attribute table with 3100 lines. I selected the whole table and pressed the button 'copy selected rows to clipboard', afterwards I pasted them into an excel-table. Now I have 27 lines ...
4
votes
2answers
7k views

Convert WKT to GeoJSON with leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a leaflet map on my website. I've found plenty of tutorials to doing this on ...
0
votes
3answers
374 views

How do I go from the WKT results of Calculate UTM Zone (Cartography) to a spatial reference object?

Calculate UTM Zone (Cartography) assigns a UTM zone to each feature within a feature class as a field value. The value returned is a 'UTM spatial reference string', which is a long string that looks ...
1
vote
1answer
211 views

Does SQL Server Data Need to be Spatial

In reference to my previous question. I am looking for the benefits of telling SQL Server your data is spatial. For instance, I have a duplicate of that table generated by the Shape2SQL tool (see ...
3
votes
1answer
725 views

Converting a CSV with a WKT column to a Shapefile

Using ogr2ogr in Python, I am trying to convert a CSV to a shapefile. One column in the CSV, named "Polygon", contains WKT like this: POLYGON((long lat, long lat, long lat, etc.)) Currently, I can ...
1
vote
1answer
3k views

Converting polygon feature class to WKT for ArcGIS [duplicate]

I am currently trying to export the geodata from a series of polygons in several .lyr files within my geodatabase in ArcGIS 10.2. I want to export the series of polygons within my layer as WKT (well ...
1
vote
1answer
282 views

Valid shapely dumps WKT becomes None when used as input to QgsGeometry

I'm trying to produce a multipolygon feature in QGIS. I am producing filled contours with Matplotlib, taking the multipolygons representing each contour level, using shapely to produce WKT, and then ...
1
vote
1answer
1k views

What is the difference between ST_GEOMETRY and WKT?

What is the difference between ST_GEOMETRY and WKT? Is ST_GEOMETRY just a database type and WKT (well-known text) is a textual representation of the data?
0
votes
1answer
810 views

How do I generate 3d WKT FROM A Sql Server geometry or geography types

If I have the point POINT (-75.45454 25.12345 1024 ) in a geometry or geography column in SQL Server, but render it with STAsText() I lose the Z dimension. SELECT geography::STGeomFromText('POINT (-...
0
votes
1answer
2k views

Adding a column of WKT format in the table (postgreSQL)

I want to include this column of data that are in WKT format (they are mostly straight lines). What data type should I use? I need to create this database for mapping. There are about 30000 features ...
3
votes
0answers
238 views

Differences beetween proj4 string and WKT

What are the differences between proj4 strings and well-known text in terms of the ability to represent a projection, other than for WKT being more human readable?
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 ...