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
1
vote
0answers
44 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
51 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
69 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
23 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
346 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
827 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
61 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
289 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
42 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
396 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
68 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 ...
1
vote
2answers
74 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
187 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 ...
0
votes
1answer
194 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);...
4
votes
3answers
798 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
61k 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
109 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
34k 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
295 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
78 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
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 ...
1
vote
0answers
88 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
5k 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
250 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
118 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
413 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
371 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
120 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
239 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
419 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
700 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
621 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
164 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
188 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
65 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
97 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 ...
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 ...
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 ...
4
votes
1answer
101 views

Pretty-printing WKT strings?

Is there a tool that will pretty-print well-known-text strings? One that would accept for instance MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 45 20, 30 5, 20 35))) and output something ...
2
votes
1answer
146 views

Getting SRID Well Known Text (WKT) metadata from PostgreSQL?

The SRID metadata is showed by, e.g., this web page: Definition: Well Known Text (WKT) PROJCS["UTM Zone 24, Northern Hemisphere", GEOGCS["GRS 1980(IUGG, 1980)", DATUM["...
2
votes
1answer
836 views

Create geometry from WKT in FME

How to create geoemtry from WKT in FME? We have a csv file in WKT format: "ID";"GEOM" "1";"LINESTRING ( 15, 20 16, 20 21, 12)" "2";"LINESTRING ( 15, 20 16, 20 21, 12)" "3";"LINESTRING ( 15, 20 16, ...
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 ...
0
votes
0answers
138 views

Getting well known text from varchar in redshift.

As you know, redshift does not support geometry types. There is a column in a dataset on my redshift db that has varchar column and the format looks like: ...
1
vote
1answer
108 views

Visualising multiple points using QuickWKT plugin in QGIS?

Using the QuickWKT plugin in QGIS, a command of the form POINT (30 10) draws a point at the desired location. However, how can I achieve to draw multiple points in one go? I am looking for something ...