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
0
votes
0answers
22 views

How to convert multilinestring to linestring in WKT field of a CSV? [closed]

I previously developed a workflow in which I would digitize line segments in a shapefile that would ultimately be converted to a CSV, and the geometry stored in a WKT field. When this workflow was ...
-1
votes
1answer
34 views

Convert shapefile to WKT [closed]

I have this : poly1 = ogr.CreateGeometryFromWkt(polygons) and error : Traceback (most recent call last): File "C:\PROGRA~1\QGIS3~1.6\apps\Python37\lib\code.py", line 90, in runcode exec(code, ...
3
votes
2answers
67 views

Adding field with geometry WKT in QGIS

I have a shapefile with polygons and want to add an attribute field with the WKT in QGIS 3.4. The function geom_to_wkt in the Field Calculator isn't working and I don't know how to do it. Any ideas?
6
votes
3answers
8k 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
1answer
20 views

Calculate feature extent OpenLayers?

I have a feature created from Well Known Text as following: var feature = format.readFeature(wkt , { dataProjection: 'EPSG:25830', featureProjection: 'EPSG:25830' }); When I add it to a ...
0
votes
0answers
12 views

Converting feature from draw interaction to WKT string

I've problems with converting the feature which I'm getting in draw interaction into the WKT string. I saw multiple examples which looks like it should be simple but I'm always getting the following ...
1
vote
2answers
89 views

Need to zoom into a vector Layer of a multipolygon

I am getting a multipolygon coordinates from DB in WKT format. I am able show the same on the map. But the problem I am facing is while zooming to center of the Multipolygon. Is there any way to zoom ...
0
votes
1answer
221 views

GeoTools and GDAL: CRS WKT

I would like to achieve the same output as for GDAL using the GeoTools library: CoordinateReferenceSystem crs = CRS.decode("EPSG:32632"); String wkt = crs.toWKT(); System.out.println(wkt);...
1
vote
1answer
35 views

Multipolygon in Los Angeles County Parcels Tax Roll

I downloaded the Los Angeles Parcels Tax Roll data into QGIS. I copied the information for a single parcel results in QGIS: wkt_geom OBJECTID_1 AIN Roll_Year AssessorID TaxRateArea ...
2
votes
1answer
39 views

Converting tabular data with multiline string field using FME?

I have data in a table. One of the fields has pairs of coordinates. The coordinate pairs represent a point and the points joined in order to represent a line. The number of coordinate pairs varies. ...
1
vote
0answers
64 views

What could be a proper and simple invalid WKT/WKB geometry?

We are converting a geometry table to another one and we would like to convert every invalid geometry to a single one easily identifiable by users in WKB or WKT form and not breaking the processing or ...
2
votes
1answer
53 views

Convert WKT to image [closed]

Is there any way to convert WKT like MULTILINESTRING ((48.8744070530328 34.71707055692468, 49.127092599907755 34.72892221300337, 48.89363312725153 34.70987407974113, 48.93002533916562 34....
4
votes
1answer
2k views

WKT precision/rounding using shapely? [closed]

I am using Shapely's wkt.dumps function to get WKT from geometry objects. How do I limit the precision of the coordinates?
2
votes
2answers
106 views

PostGIS `COPY` geometry with SRID?

Is it possible to use COPY on a file full of WKT POINTs without dropping the explicit SRID on the destination column? I'm trying to insert several million rows of WGS84 points and am using COPY for ...
2
votes
1answer
31 views

Shapefile export of holes geometries in QGIS with wrong type MultiPolygon

I want to export a layer with holed geometries in it. But when I save my features to shapefile in QGIS 3 it creates a file with MultiPolygon as geometry type. The fact is that a holed polygon isn't a ...
0
votes
1answer
384 views

including SRID in WKBWriter in Shapely doesn't work

I want to encode coordinates of LineString in WKB with the SRID included wkbwriter = shapely.geos.WKBWriter(shapely.geos.lgeos, big_endian=False, include_srid=True) geo = wkbwriter.write_hex(...
1
vote
1answer
844 views

Creating path based on waypoints using QGIS?

I am trying to map flight paths and compare historic paths with current ones (so I later need to perform some calculations as distances between them). For this task I am using QGIS on OSX 10.9.1 As ...
1
vote
0answers
63 views

Why coordinates are saved like “0101000020110F00003CDBA337DCC351C06D37C1374D374840” in db? [closed]

On my DB, the data looks like this: In the DAO I am executing a query: public Object login(UserEntity user) { StringBuffer sb = new StringBuffer(); sb.append("SELECT user FROM ...
2
votes
0answers
291 views

Change Axis Order when transferring data from WFS to PostGIS DB

I am using GeoKettle to transfer data from a WFS service to a PostGIS database. The projection of the geometries is EPSG:4326 : GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID[...
1
vote
1answer
49 views

Custom projection in GeoServer

I am trying to create a custom projection in GeoServer, but I see nothing (from the logs, neither in the SRS_list) coming out. The projection I'm trying to create is a Mercator for Mercury. I start ...
2
votes
2answers
476 views

ProjNet. Coordinate reference system transformation deviation

I have a project with C# that contains a CEFSharp viewer showing a webpage with a map that I've created.I'm trying to add a marker in the map sending the parameters from C# to a function in the ...
1
vote
1answer
93 views

Sending geographic data from Postman?

I am trying to create a GIS app using Java, Spring and Hibernate. I send a JSON from Postman like this: { "pointName":"any location", "geom":"POINT(-71.060316 48.432044), 3857" } The JSON ...
0
votes
1answer
201 views

Displaying CSV with WKT in ArcMap?

I have been given a CSV which has a mixture of point and polygon data. I am trying to open this up in ArcMap 10.5.1 I have no idea what I should be doing! I have tried to look for answers online ...
4
votes
3answers
907 views

Getting correct WKT result to 4 decimal places using PostGIS?

I'm using PostGIS version 2.3. I want to get the SW and NE corners of a bounding box, corrected to 4 decimal places. Right now I have this to retrieve the SW and NE corners from my geometry column: ...
31
votes
8answers
64k 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 ...
2
votes
1answer
115 views

Creating geom object from list of lat, long coordinates

I have this geometry key that looks like this from which I want to create a Geom object so something like this MultiPolygon(((-xx.73833882299999 yy.41161324700006, -xx.73826573899998 yy.41172750400005....
62
votes
4answers
35k 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 ...
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 ...
3
votes
4answers
304 views

Plain geometry editor for QGIS 3.0?

In QGIS 2.18, I had been using the plugin "Plain Geometry Editor" to view, copy and paste the WKT geometry of features (as a solution to this question). However, this plugin is not available for QGIS ...
0
votes
1answer
102 views

Get GeoJSON or simple WKT from a GPFeatureRecordSetLayer ArcGIS js API

Is it possible to get the GeoJson representation of a GPFeatureRecordSetLayer that is returned from GPServer task? I am able to draw the feature on the map (using the ArcGIS js API) with code like ...
12
votes
2answers
21k 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 ...
1
vote
0answers
99 views

Reducing coordinate precision in MSSQL WKT using C#? [closed]

When you use the AsText() function on geometry objects in MSSQL Server 2008+ you get something like this: "LINESTRING (8.8446177236171337 47.721989356913951, 8.844617919281065 47.721977134398223, 8....
3
votes
2answers
6k views

How to return WKT of entire polygon with shapely?

Im learning to use shapely and have two shapefiles--forest, and basins. The two shapefiles clearly intersect (basins is completely within forest). But the way I've gone about it only gets the feature ...
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 ...
2
votes
0answers
298 views

Implicitly convert Geometry to WKT string in PostGIS

Suppose I have a table defined as follows: CREATE TABLE gtest (name varchar, geom geometry); To insert, I am able to simply do this: INSERT INTO gtest VALUES ( 'Polygon', 'SRID=4326;POLYGON(...
0
votes
2answers
143 views

ST_GeomFromText fails on syntax error inside tuple of coordinates?

I am receiving the following error when trying to execute ST_GeomFromText(wkt) psycopg2.ProgrammingError: syntax error at or near "1187780.76" LINE 1: ...0822.05,(ST_GeomFromTEXT(POLYGON ((...
1
vote
0answers
431 views

Write WKT/WKB to File Geodatabase using FGDB API

Is there a way to set the geometry of a row using either WKT or WKB with the File Geodatabase API? Is there any other way to write spatial data to the file gdb using the fgdb api without having to go ...
1
vote
1answer
453 views

Athena: querying GeoJSON

Let's say I have a dataset with one column being GeoJSONs encoded as string. AWS Athena supports ESRI and hence geo queries on geometries: https://docs.aws.amazon.com/athena/latest/ug/geospatial-...
1
vote
1answer
142 views

Export MultiPolygon data as WKT from QGIS 3

I have the polygon data for the city of Kamloops in QGIS 3. When I try to copy features of this polygon and try to paste it over here: https://arthur-e.github.io/Wicket/sandbox-gmaps3.html I don't get ...
5
votes
2answers
279 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 ...
2
votes
1answer
434 views

PyQGIS - Syntax for importing WKT file

I couldn't find any proper example of how to import a .csv with WKT coordinates (Polygon) in PyQGIS. Here are more details on my .csv. I am working with polygons. The delimiter is a semi colum, and ...
1
vote
2answers
713 views

Finding SRID from WKT out of GRIB file?

I have a grib2 file which I'm trying to import into PostGIS 2.0 Raster and process. Trouble is, I can't figure out what the SRID is supposed to be, or one close enough for government work. Running ...
2
votes
1answer
4k views

Using WKT.writeGeometry for 'Circle' Geometry in OpenLayers?

In my application which I'm building using OpenLayers3, I'm trying to extract the geometry of a feature to WKT using var format = new ol.format.WKT(); console.log(format.writeGeometry(geometry)); by ...
3
votes
1answer
719 views

SQL WKT draws well with geometry, but not with geography data type

I have a following piece of code DECLARE @g geometry; DECLARE @borders geography; SET @g = geometry::STGeomFromText('SOME WKT', 0); SET @borders = GEOGRAPHY::STGeomFromText(@g.MakeValid()....
2
votes
2answers
187 views

Seeking for a solution to convert GeoTIFF to 3d WKT

I am trying to convert some DEM in .tif image to polygon geometries representing 3 dimensional triangles that is Well-known text (WKT) - 3D (x, y, z) I was able to use SAGA to convert my GeoTIFF ...
2
votes
3answers
1k views

geography, geometry, distance, and wkt - PostGIS

I'm trying to understand the data conversions that happen in PostGIS when calculating distances in SRID 4326. Why is it that when I run on my marin_jobs points table: select cast (the_geom as ...
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 ...
1
vote
1answer
213 views

How to obtain a WKT from a DotSpatial IFeature geometry?

I am using DotSpatial 1.9 and I have a feature (sourced from a shapefile). According to the docs, I should be able to call: ToString() on IFeature. // // Summary: // Returns the Well-...
1
vote
1answer
71 views

State Plane Scale Factor in WKT

I need to convert an old-style projection file (created with Global Mapper) to a WKT format for use in my GIS program (ArcMap or GDAL or whatever). The problem is that my old-style projection file ...
2
votes
1answer
117 views

What is the history behind WKT and proj.4? [closed]

What is the history behind WKT and proj.4 formats for defining coordinate systems? Does one have advantages over the other? Why do both exist? I'm guessing they were developed independently for ...