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
29 views

Importing WKT in QGIS? [on hold]

When I import to QGIS 3.4 or to QGIS 2.18 a file with 50000 geometries some of the geometries are bigger than they actually are (in purple in the picture). Since this is not correct I select one of ...
0
votes
1answer
317 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
807 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
59 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
37 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
370 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
56 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
72 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
173 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
176 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
751 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
60k 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
102 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
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 ...
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
287 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
70 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
84 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
230 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
107 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
405 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
334 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
111 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
213 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
414 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
694 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
569 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
148 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
177 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
88 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
97 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
127 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["...
1
vote
1answer
765 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
130 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
105 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 ...
4
votes
0answers
779 views

When does WKT orientation matter for polygon and multipolygon in geography spatial (left/right hand rule, counter-clockwise, clockwise)

I've decide to use sql server on Azure for my gis database. I'll be dealing with spatial Geography not Geometry. While inserting some country boundaries using the spatial data in SQL Server, some ...
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 ...
2
votes
0answers
232 views

Storing Shapely polygons in MySQL

I have to store some polygons in a MySQL database. The polygons are in Plate Carrée (ESPG 32662) projection, but I also tried to first converting them to the usual latitude-longitude projection (ESPG ...
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 ...