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
0
votes
2 answers

What is the correct MySQL Polygon format for Latitude and Longitude?

When looking at MySQL's Polygon Functions page, one can see comprehensive examples for using the polygon/spatial functions but it does not say something about the format of the polygon points. An example of a polygon string is Polygon((0 0,0 3,3 3,3…
Abel Callejo
  • 13,779
  • 10
  • 69
  • 84
0
votes
2 answers

Convert shp spatial data to WKT using PHP

I am trying to export some shape files to a a MySQL database. I can read the shp features dbf file using PHP but I want to be able to get the WKT spatial data for each row that I am looping through. I have thought to add a calculated field…
perpetual_dream
  • 1,046
  • 5
  • 18
  • 51
0
votes
2 answers

Count how many geographic coordinates are in a polygon object

I have an XML file which contains the POLYGON object to define the coordinates of a neighborhood: Quartier 5-1 44709524.0 27807.3 POLYGON ((-71.2039023644186…
actaram
  • 2,038
  • 4
  • 28
  • 49
0
votes
1 answer

Using a regular expression to convert WKT to GeoJSON

I obtain data as WKT from mysql: POLYGON((148.798828125 -34.37971258046219, 148.86474609375 -34.10270799317487, 149.23828125 -34.28899186503752, 149.2108154296875 -34.601563177240884, 148.853759765625…
vamsiampolu
  • 6,328
  • 19
  • 82
  • 183
0
votes
1 answer

Pushing Google Map Polygons/Markers to array pushes no data

I am creating a tool using Google Maps API v3. I need overlay some polygons and markers, and clear them. I was attempting to follow an example similar to this - push polygons/markers into an array, and then delete them from the array, and thus the…
ryantkelly
  • 93
  • 1
  • 9
0
votes
1 answer

DbGeometry Contains() works only for Polygon WKT

I tried the following code that behaves differently from what I expected. The DbGeometry.FromText is supposed to create an object from WKT. However, the contains function only seems to work on Polygon WKT and not for circles or linestrings (I've…
arviman
  • 5,087
  • 41
  • 48
0
votes
1 answer

LINESTRING to gpx

I have to following situation: I got some tracks as a LINESTRING (well-known text) and I need each of them in a separate gpx-file. All of them are stored in a csv file. Do you have some ideas to get there? I didn't find any scripts or something…
bumblebee
  • 17
  • 5
0
votes
1 answer

Using geography::STGeomFromText for WKT

I'm trying to import UK postcode zones from WKT to SQLServer 2012. Most are fine but there's a few that produce an very large polygon (best I can explain it). When using QGIS the WKT below displays as it should. MULTIPOLYGON (((-2.255068…
Alxwest
  • 179
  • 12
0
votes
3 answers

Using Regular Expression in Python to determine the type of geometry

I have a number of MULTIPOLYGONS in the form of WKT (Well Known Text) like this: A single multipolygon with no holes: MULTIPOLYGON(((11 -17, -8 -1, 14 -8, 18 -17, 3 -11, 0 18, -17 -12, -17 -10, -10 -13))) A single multipolygon with one…
f.ashouri
  • 5,409
  • 13
  • 44
  • 52
0
votes
2 answers

Python convert WKT polygon to row wise points

"POLYGON ((12 13,22 23,16 17,22 24))",101,Something,100000 "POLYGON ((10 12,40 42,46 34,16 24,88 22,33 24,18 20 ))",102,another,200000 How can I get something like below in a csv file: UID(like 101,102 etc) represents an unique identifier for each…
addcolor
  • 455
  • 8
  • 23
0
votes
1 answer

openlayers create marker (feature with icon) from WKT

I have a point object WKT. Like this: POINT (25.04568 48.221548). Also I have an icon in my project folder. My goal is to show on a map an icon that represents a feature. Can it be just a normal OpenLayers feature (if yes, then how can I define that…
user721588
0
votes
1 answer

Transfer format between geodatabase and OpenLayers

I was curious ab your opinions whats the most efficient transfer format between SpatiaLite and OpenLayers. Currently Im developing an application based on SpatiaLite (extension of SQLite) and OpenLayers and as a transfer format I use GeoJSON. My…
0
votes
3 answers

generating street map from openstreetmap dat through osm2wkt

i am trying to generate street map of a city from openstreetmap data. i have used osm2wkt tool but it converts it into wkt file. is there any way to convert in map rather than in wkt file.
-1
votes
1 answer

MYSQL ST_Union returning weird polygon-multipolygon hybrid

I'm using PHP to physically locate items in a MYSQL table based on their relationship to other items. Specifically, I'm creating the spatial WKT by running a series of ST_UNIONs on the result. In most cases, it works perfectly. However, with…
-1
votes
1 answer

AttributeError: 'LineString' object has no attribute 'encode'

I am trying to convert data frame to geodata frame where data frame geometry applying for wkt.loads to convert geometry Line String to geodata frame but getting below error: text = text.encode('ascii') AttributeError: 'LineString' object has no…
Rtop
  • 59
  • 5
1 2 3
12
13