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.

Filter by
Sorted by
Tagged with
3
votes
1answer
630 views

PostGIS linestring to shapefile error with shapely/fiona

I have a PostGIS layer with linestring and I am trying to write the layer to shapefile using fiona and shapely. Here is what I have so far: from shapely.geometry import mapping,LineString from ...
1
vote
0answers
551 views

Convert WKT to EWKB/WKB using GDAL/OGR? [closed]

How do I convert WKT geometry to EWKB/WKB? Here's my WKT: POLYGON ((113.749421064162419 62.38697568386327,113.754636282390067 62.386872575140529,113.755323673085357 62.334314115202005,113....
3
votes
1answer
521 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
1k 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
544 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 ...
2
votes
2answers
86 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? ...
1
vote
1answer
260 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 ...
13
votes
4answers
11k 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-...
3
votes
1answer
234 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",...
7
votes
1answer
668 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 ...
0
votes
1answer
178 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: ...
0
votes
1answer
108 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 ...
0
votes
1answer
464 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 ..... ...
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 ...
1
vote
1answer
630 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"]], ...
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
997 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()...
2
votes
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
142 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 ...
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 ...
0
votes
2answers
236 views

How to convert this geometry location format to a qgis usable format?

I am a beginner with regard to dealing with gis information, so please bear with me. I would be obliged if someone could help. I have data on asssembly constituencies of Delhi, with these ...
1
vote
5answers
6k views

Fix Self Intersecting Polygons Manually [closed]

I are looking to implement a method to fix self-intersecting polygons by editing the vertex order. We want to take the polygon rings and re-arrange/add in vertices to make a valid polygon. This is ...
0
votes
2answers
475 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 ...
4
votes
3answers
269 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 ...
2
votes
3answers
2k views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from accumulation;")...
1
vote
1answer
601 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
1answer
386 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
0answers
370 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
731 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 ...
4
votes
1answer
2k views

Converting wkt to geojson with OpenLayers

I am trying to convert wkt to geojson wiht OpenLayers. I wrote my code based on this question (geojson to wkt). That's what I have so far, but it is not working. Any ideas? var = '...
2
votes
1answer
349 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
199 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 ...
3
votes
1answer
285 views

Problem with precision when convert from WKT to shapefile

I have a problem with converting from WKT to shapefile in pygdal. In wkt I have fields with precision (for example real 7.2). When I create a shapefile I have field numeric with no precision (numeric ...
2
votes
0answers
150 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", ...
19
votes
1answer
9k 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 ...
2
votes
1answer
808 views

Geoserver projection recognize problem

I'm publishing shape files in geoserver through curl,my problem is that geoserver didn't recognizing the projection which is in ESRI WKT format(layer was publishing).I searched for this problem i ...
1
vote
0answers
216 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
180 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,'...
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....
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 ...
3
votes
1answer
983 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
4k views

OpenLayers create marker (feature with icon) from WKT

I have a point object WKT. Like this: POINT (25.04568 48.221548). Also I have an icon in my project folder. My goal is to show on a map an icon that represents a feature. Can it be just a normal ...
4
votes
1answer
639 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
5answers
851 views

How do you generate WKT from a graphic drawn on a map?

All, In order to do some quick analysis using SQL spatial, I'd like to generate spatial objects using the STGeomFromText / ST_GeomFromText function. With point data, I can do this by geocoding an ...
2
votes
0answers
408 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 ...
0
votes
3answers
388 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
0answers
219 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 ...