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.

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. A binary equivalent, known as well-known binary (WKB) is used to transfer and store the same information on databases, such as PostGIS, Microsoft SQL Server and DB2.

The formats were originally defined by the Open Geospatial Consortium (OGC) and described in their Simple Feature Access and Coordinate Transformation Service specifications. The current standard definition is in the ISO/IEC 13249-3:2011 standard, "Information technology -- Database languages -- SQL multimedia and application packages -- Part 3: Spatial" (SQL/MM).

http://en.wikipedia.org/wiki/Well-known_text

185 questions
1
vote
0 answers

geopandas shapefile wkt column not visible

I have a dataset like the image below. I want to save it as shp file. enter image description here I tried with this code. df['geometry'] = geopandas.GeoSeries.from_wkt(df['geometry']) gdf = geopandas.GeoDataFrame(df, geometry='geometry') gdf =…
datasever
  • 37
  • 4
1
vote
1 answer

Extracting Shapely Polygon Geometries as WKT list from Geopandas GeoDataFrame

Having no luck extracting shapefile Polygon geometries in a Geopandas Geodatabase. Variable keeps displaying as Not as the WKT displayed when printing out the GeoDataFrame. Geopandas…
Rose
  • 205
  • 3
  • 12
1
vote
1 answer

A faster way of loading shapely.wkt geometries into a pandas dataframe from a dataframe of WKT strings

How it's currently done is as follows: geoms = df["wkt"].apply(shapely.wkt.loads).values Here df["wkt"] has rows with data like: "MULTIPOLYGON (((24.2401805 70.8385222,24.2402333 70.83850555,24.2402166 70.83848885,24.24015 70.83848885,24.2401277…
Laende
  • 167
  • 2
  • 13
1
vote
3 answers

convert csv to shp in r where geometry is in single column

I have a csv file that contains the point geometry information in a single column. Is there a straight forward way to convert from csv to a spatial data file in r given the format of the geometry column (I could do this in QGIS or could splice the…
Adrienne
  • 11
  • 1
1
vote
1 answer

Difference between wkt and str

I have a shapely Polygon. What is the difference between converting it to wkt and converting it to string: import shapely.wkt P = shapely.wkt.loads('POLYGON ((8.0 3.0, 8.3 3.3, 8.3 3.0, 8.0 3.0))') print(P.wkt) print(str(P)) Is the result always…
GStav
  • 1,066
  • 12
  • 20
1
vote
1 answer

Errors converting Geometry to Geography

I am getting an error trying to convert data from a Geometry field to a geography field in a separate table. INSERT INTO PIGeoData ([ID], [geo_name], [geo_wkt] ,[port_geography_binary] ) SELECT [id], [name] ,[wkt],…
Feargal Hogan
  • 169
  • 1
  • 8
1
vote
1 answer

Can i convert rectangle extents to boost polygon?

I have extents of 2 boxes (values are in the same projection/CRS). How can i convert them to polygons using boost? Boost polygon needs some kind of WKT and i just have extents as below for each box specifying its bounding box co-ordinates (extent…
user16551333
1
vote
1 answer

GeoSparql functions not working as expected in RDF4J's repository

Colleagues and I are working with RDF dataset and RDF4J's in-Memory repository and we are trying to execute GeoSparql queries while using geometry data in WKT format, as shown below: @prefix geo: . @prefix sf:…
RedCrusaderJr
  • 350
  • 1
  • 12
1
vote
1 answer

GIS: How to resize layer using .prj (WKT) projection? (Geographic Coordinate System)

Briefly: How to parametrize .prj WKT file so that I can perform 7 point tranformation (wiki). I know how false_easting and false_northing params work, but how can I adjust scale? I do not mean scale_factor' That's the problem description: I have…
1
vote
2 answers

replace string with parentheses keeps the slash \

I have table in geodataframe w hich I have changed into geopandas and it contains two fields: ID and geometry. The geometry columns is in WKT format and the table looks like this: >>>ID geometry 0 1 POLYGON((2.9544435 6.3245124,…
Reut
  • 1,555
  • 4
  • 23
  • 55
1
vote
1 answer

How to convert Turf.js polygon to WKT

I'm using Turf.js to generate circle geometry from point and radius, using the circle functions. Example: c = turf.circle([0.0, 0.0], 100, {steps:1000, units:'kilometers'}) The returned result is Feature object, and the only way I managed to…
Yoav
  • 999
  • 3
  • 11
  • 30
1
vote
2 answers

SQL Server geography: Reduce size (decimal precision) of WKT text

For my farming app, a stored proc retrieves paddock/field boundaries that are stored as SQL Server geography data type, for display on the user's mobile device. SQL Server's .ToString() and .STAsText() functions render each vertex as a lat/long…
Merenzo
  • 5,326
  • 4
  • 31
  • 46
1
vote
1 answer

using the buffer and transforming projection, PostGIS

I am creating a buffer and trying to transform my SRID to geog, then back to the original projection and geom. My points layer has my WKT convention as such: POINT (-73.73891083685496 40.59593727361931) CREATE TABLE intrsct_buff AS ( SELECT …
sTonystork
  • 137
  • 8
1
vote
1 answer

IllegalArgumentException: Invalid number of points in LinearRing found 3 - must be 0 or >= 4 - Python

I'm having trouble while trying to create polygon using the shapely library in python. [testPolygon(polygonShape) for polygonShape in fileAppender] and the testPolygon function is defined as: def testPolygon(polygonShape): if…
Paulo Calado
  • 195
  • 1
  • 3
  • 7
1
vote
2 answers

Extract XY extent from WKT string

Using python, how can I extract the XY extent of a WKT polygon? I need it in gdal compatible format like: minx miny maxx maxy So for example below, I'd need to convert wkt to be wkt_extent: wkt = "Polygon ((366247 156971, 366247 174054, 383331…
Theo F
  • 1,197
  • 1
  • 11
  • 18