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?
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
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....
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 ...
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 ...
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 ...
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 ...
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
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 ...
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
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
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 ...
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 ...
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 ...
2
votes
1answer
168 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
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 ...
4
votes
1answer
107 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
1k 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, ...
0
votes
0answers
153 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: ...
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
118 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 ...
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()....
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-...
2
votes
0answers
261 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 ...
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);...
4
votes
0answers
916 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 ...
0
votes
0answers
140 views

Get coordinates from web mercator projection to Lan & Lot (JavaScript/ node.js) [duplicate]

I have the WKT coordinates like below. LINESTRING (16139582.976129573 -4541142.959679384,16139974.715899538 -4540837.211566243) How can I get the Longitude and Latitude from that. I am using ...
1
vote
1answer
239 views

Converting coordinates in metres to Longitude & Latitude (CRS conversion) in OGC WKT format?

I have two tools that produce output in OGC WKT format. But they look different. Could you please explain this(I am very new to GIS). For my project I want the coordinates in the second format. Is ...
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....
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-...
2
votes
1answer
230 views

PyShp error: Object does not implement __geo_interface__

I'd like to convert geometry to WKT with pyshp and pygeoif using this suggestion, but pyshp throws a following error: Traceback (most recent call last): File "E:/!Projects/imScrape/...
0
votes
1answer
151 views

Converting CRS?

I am trying to convert an N-triple RDF file which has geometries with WKT which use EPSG/3857 and I need to convert all WKTs to EPSG/4326 (I think it is the same as WGS84). As a first step, I tried ...
1
vote
1answer
151 views

fromWKT - how to pull all info from source data?

I have a CSV storing addresses, reference numbers, etc... and also a WKT string of boundary coordinates for each property: The script (ammended from another user's post in 2012) sccessfully converts ...
2
votes
1answer
346 views

PyQGIS - How to import WKT string from a CSV to a polygon shapefile? [duplicate]

In QGIS, I can add WKT data stored in a CSV by clicking the 'Add Delimited Text Layer' tool and setting it to 'WKT'. This works fine: But how can I do it as a python script? Ideally I'd like a ...
1
vote
0answers
41 views

Getting information on geo file projection in Python?

I have many geo files with different extensions, from different sources (mid/mif, shape, geojson, dat). I'd like to get information on their projection (i've no access to epsg code). Maybe, I search ...
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 ...
2
votes
1answer
1k views

is it possible to open a geotiff file in python without using gdal?

Trying to get gdal and whichever associated python bindings installed with the oldish OS my company uses is extremely painful, especially so in ci/cd and testing situations. I keep coming across ...
0
votes
1answer
251 views

WKT to shapefile using arcpy

I'm trying to convert WKT from an API to a shapefile via arcpy (there is a requirement to use the ArcGIS GUI) and am unable to get arcpy to create the shapefile. My code: def create_shapefile(self, ...
0
votes
1answer
200 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 ...
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....
2
votes
1answer
502 views

Is MULTICURVE geometry in WKT valid according to the standard and open source community?

We are using Oracle function (SDO_UTIL.TO_WKTGEOMETRY) for exporting geometry to WKT. Some geometries have MULTICURVE in WKT, like this one: MULTICURVE (COMPOUNDCURVE (LINESTRING (3451418.006 5481808....