Questions tagged [well-known-text]

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

QGIS: spatialite incorrect string concatenation when loading layers

I am trying to draw some polygons in spatialite using the DB Manager in QGIS. However select 1 as id, st_geomfromtext('POLYGON((0 0,0 '||random()||','||random()||' '||random()||','||random()||' 0,0 0))...
2
votes
1answer
66 views

Lat/Long data to shapefile with many values in CSV dataset

I have my polygon spatial data in a format of CSV with the column of lat/long delimited by comma. Is there any way to upload this csv and got polygon shapefiles (or any other visualisable format)? My ...
3
votes
1answer
2k views

Converting CSV file of WKT data to shapefile using QGIS 2.01

Is it possible to create a shapefile directly from a CSV WKT file in QGIS 2.01? WKT POLYGON(...) POLYGON(...) Save as shapefile doesn't seem to work.
0
votes
2answers
597 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(...
5
votes
3answers
210 views

Is there an alternative to prj2epsg.org?

In the past, we used prj2espg.org to find the srid/espg code from .prj file of shapefiles in order to import them in PostgreSQL. Unfortunately, the website seems to be down since November 2019 (...
1
vote
1answer
56 views

Export/convert Points to Polygon

I have to convert a .shp into a .csv file and upload it to the SQL Server, for a program that only supports Polygon format and can not render Points. Is there a way to convert Points to Polygon or is ...
3
votes
1answer
249 views

Is there a DWG geometry type that cannot be expressed using WKT?

Is there a geometry type (both 2D and 3D) that is supported by DWG and cannot (lossless-ly) be expressed using Well-Known Text? If there is, please provide an example.
4
votes
1answer
87 views

lat, lng to lng, lat in polygon WKT - axis flip

I have a sheet with the column with polygon information in WKT format. However, the data taken are from web mapping (OSM or google maps) and in the order of lat, lng. When I am using the solution from ...
0
votes
1answer
23 views

R: ggplotting st_cast(“MULTILINESTRING”) lines: ends points connected to starts, undesirably, why?

I have the lat-lon positions of various individuals. When I plot multiple individuals at the same time, I see odd lines over land, and have been investigating why. It transpires that plotting ...
0
votes
1answer
349 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

Polygons with WKT extension load extremely slow

I am quite new to QGIS. I have temporal data per month for the period of 8 years for all Indian districts (+/- 650 districts). This means I have approx. 65.000 objects in my attributes table. Once I ...
0
votes
1answer
18 views

Trouble working with a .TSV containing WKT

I'm working with a .TSV file that represents district boundaries in a portion of a country in Carto. The polygon data is represented in a string column of Well-Known Text lat/long vertices, which I'm ...
1
vote
2answers
124 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 ...
5
votes
1answer
60 views

Maximum character length in Well Known Text for QGIS

Is there a maximum limit of characters in an Well Known Text (WKT) that allowed by QGIS Desktop?
4
votes
2answers
1k 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?
1
vote
0answers
29 views

Converting a description of polygon with arcs to WKT

A document that I am trying to digitize contains descriptions of polygons (see below). The descriptions are converted to WKT for a backend. However, I get stuck at the "along (counter)clockwise ...
4
votes
2answers
88 views

Why is a vertical polygon defined by WKT PolygonZ invalid?

Can you tell me, why this PolygonZ is invalid? PolygonZ ((409662 5317369 285, 409662 5317377 285, 409662 5317377 302, 409662 5317369 302, 409662 5317369 285)) The polygon is completely vertical, but ...
3
votes
3answers
1k views

Understanding geography, geometry, distance and wkt in 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 ...
1
vote
1answer
43 views

WKT coordinate inner order (long,lat)

In an open-source tracking project that uses WKT in its API, we have a debate about what is the correct order for representing geographical coordinates. Lat and then Long or Long and than Lat. In most ...
3
votes
1answer
173 views

.prj files from ESRI aren't WKT

We are seeing .prj files from our users that don't look like the normal WKT formatted ones we've seen up to this point, instead, they match the format illustrated at "Esri Grid format". When we ...
36
votes
9answers
83k 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 ...
1
vote
2answers
1k 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-...
4
votes
2answers
653 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
1answer
40 views

OpenLayers: Incorrect rendering of WKT

I'm using the draw function of OpenLayers for draw a polygon. I need the wkt from the drawn geometry because I need to send it to PostGIS. <textarea name="name" rows="20" cols="80" ...
1
vote
1answer
889 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 ...
2
votes
3answers
1k 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
73 views

Convert points to line segment

In MySQL, I have two tables to store GPS trackpoint and second table to store chainage values. Lines can have more than one condition. I wish to generate line segments by using both tables above. ...
3
votes
3answers
4k 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 ...
0
votes
0answers
84 views

Convert list of GML coordinates into WKT

I am working with a NetCDF file. One of the attributes of the file is its footprint given as just a list of GML coordinates e.g. #ncds is a netCDF dataset >>> ncds['METADATA/EOP_METADATA/om:...
69
votes
4answers
41k 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 ...
0
votes
2answers
50 views

Coordinates of WKT in PostgreSQL

I have a table in PostgreSQL. And it has no X and Y coordinates. But, it has a geom column with the WKT. Also, I have created an empty column called LAT and other called LONG. So, what I want is to ...
1
vote
1answer
245 views

Create an ESRI Shapefile from WKT with OGR

I want to create an ESRI Shapefile layer from a CSV file. In my CSV I have several attributes (text, numeric) and geometry in WKT style. I have a problem with the geometry field wich is truncated to a ...
1
vote
0answers
101 views

Write GeoPandas df to PostGIS - Linestring Z geometry

I am trying to write a geodataframe with Linestring Z geometry to a PostGIS table. This rise the error: ProgrammingError: (psycopg2.ProgrammingError) can't adapt type 'LineString' [SQL: INSERT INTO ...
2
votes
1answer
1k views

WKT for local mine grid

I have been trying to create a WKT entry to use in gdalwarp etc. I need an affine transform from coordinates in MGA94 Zone 54 to our local mine grid. All efforts have so far failed, including using ...
3
votes
1answer
327 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[...
4
votes
2answers
2k views

WKT: What is the reasoning behind the concept of a POINT EMPTY?

In data formats like WKT and WKB, we have ways of representing "empty" geometries. That all pretty much makes sense: a "LINESTRING EMPTY" is a LINESTRING type with 0 vertices. Same with a MULTIPOINT, ...
3
votes
1answer
249 views

How to define a Topocentric CRS in OGC WKT form?

I'm trying to construct a DerivedCRS in OGC WKT form that describes a 3D local rectangular coordinate system that is sometimes referred to as an LSR or ENU or Topocentric. It has an origin described ...
1
vote
0answers
55 views

Generate custom WKT Coordinate System definition from local / WGS84 pairs of coordinates [closed]

I am wondering if it possible to create a custom WKT for coordinate transformations based on pairs of WGS84 lat/lon and the corresponding local N/E values. So like a minimum 2 pairs? If so is it ...
2
votes
1answer
129 views

Check if shapefile Polygon has a valid number of points - Python [closed]

I'm trying to create a polygon from ShapefileReader.shapes() object in python using the shapely.wkt library. But I'm having the followeing error: IllegalArgumentException: Invalid number of points in ...
2
votes
1answer
72 views

How can I determine if a transformation between two CRS is simply scaling/translating or more complex?

We are using pyproj to transform between coordinate reference systems. What is a good way to check if the transformation is simply scale/translate/units? Basically, I want to know if a grid in the ...
4
votes
2answers
1k views

gdalwarp cutline without using a shapefile

I'm currently working with gdalwarp to split some tiffs. gdalwarp -cutline file.shp -dstalpha -of GTiff image.tif split_image.tif I wanted to know if I can use an other source rather than use a ...
3
votes
1answer
111 views

Pasting more than one geometry at a time in Quick WKT plugin for QGIS

I have a CSV of WKBs that I need to convert to WKT. Can I paste them all into Quick WKT at the same time? How do you break the spaces between geometries? Page break, comma, semicolon, etc. do not ...
1
vote
2answers
310 views

Converting SDE.ST_GEOMETRY polyline to SDO_GEOMETRY with SQL: Why are there so many nulls?

I have a SDE.ST_GEOMETRY polyline FC in an Oracle 18c/10.7.1 geodatabase. I want to convert the SDE.ST_GEOMETRY shape column to SDO_GEOMETRY using SQL. Reason: So that I can do linear referencing ...
1
vote
2answers
291 views

Axis order in user Shapefile

I have a shapefile which has the following PRJ GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], ...
8
votes
2answers
11k 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 ...
3
votes
1answer
276 views

Passing a WKT Polygon with interior rings to a QgsRubberBand's Geometry with PyQGIS

Starting point is that I select a geometry with the following query in QGIS DB Manager: SELECT 1 AS myid, st_buffer(st_union(wkb_geometry), 5) FROM ax_strassenverkehr WHERE unverschluesselt ILIKE '%...
0
votes
1answer
174 views

Use PHP form to insert geometry from WKT into SQL Server 2017

I have a PHP 7.3 form that asks the user for a Name, a WKT and an SRID. I would like to upload the WKT and SRID to SQL Server 2017 so that it creates a geometric object in Upload_WKT_Test using ...
0
votes
1answer
92 views

Lat/Long WKT field to line geometry

I'm working with data containing multiple lat/long entries within a single row. I am using PostGreSQL to process the data. Is there a way to take the WKT lat/long field and convert it into a line geom ...
0
votes
1answer
110 views

Using geometry stored in SQL Server table instead of WKT as input to function

I am new to SQL Server, I have a function called STVectorize that takes a geometry and breaks it down into its constituent vectors: SELECT e.[id], e.[element_id], e.[subelement_id], e.[vector_id], ...
1
vote
0answers
109 views

Can't import WKT polygon to SNAP

I have big size Sentinel-1 image and I would like to clip it to smaller size. For that i'm trying to import shapefile but I get errors all the time: This is my polygon WKT: PolygonZ ((102....

1
2 3 4 5
7