Questions tagged [wkb]

The Well-Known Binary (WKB) representation for geometric values is defined by the OpenGIS specification.

The Well-Known Binary (WKB) representation for geometric values is defined by the OpenGIS specification.

https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary

33 questions
43
votes
2 answers

What's the "E" before a Postgres string?

I was reading a Postgres/PostGIS statement like this: SELECT ST_AsBinary( ST_GeomFromWKB( E'\\001\\001\\000\\000\\000\\321\\256B\\312O\\304Q\\300\\347\\030\\220\\275\\336%E@', 4326 ) ); The above creates something from a Well Known Binary…
thor
  • 21,418
  • 31
  • 87
  • 173
18
votes
6 answers

Inserting and selecting PostGIS Geometry with Gorm

I've been trying to find a way to insert and retrieve geometric types using Golang, and specifically the library gorm. I'm also attempting to use the library orb that defines different types for geometries, and provides encoding/decoding between…
robbieperry22
  • 1,753
  • 1
  • 18
  • 49
3
votes
0 answers

Importing geometry data into MySQL using LOAD DATA LOCAL INFILE

I am trying to import CSV data into MySQL using the LOAD DATA LOCAL INFILE syntax. This is normally a fairly simple task, but in this case the data includes a geometry field that is tripping me up. When I try to run the import, I'm getting errors…
Spudley
  • 166,037
  • 39
  • 233
  • 307
3
votes
3 answers

How is build the format of geography data type in sql server?

I'm not being able to understand how is the data type geography in SQL server... For example I have the following data: 0xE6100000010CCEAACFD556484340B2F336363BCA21C0 what I know: 0x is prefix for hexadecimal last 16 numbers are longitude:…
Idilio
  • 29
  • 4
3
votes
3 answers

GeoAlchemy2: Get the lat, lon of a point

Consider the following SQLAalchemy / GeoAlchemy2 ORM with a geometry field: from geoalchemy2 import Geometry, WKTElement class Item(Base): __tablename__ = 'item' id = Column(Integer, primary_key=True) ... geom =…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
3
votes
3 answers

Parse WKB string using JTS Topology Suite

It's been a few days that I'm struggling with WKB strings. I need to be able to parse it in order to get the equivalent geometry and extract points coordinates (X,Y,Z). I can't use PostGIS functions. The only java library that I found was the JTS…
user3890394
  • 99
  • 1
  • 7
2
votes
3 answers

How to convert BLOB data stored in SQLite database into the SharpMap.Geometries.Geometry

I have geometry data stored in the SQLite database, and datatype of column is BLOB. I used the below method to convert the BLOB data into the sharp map geometry SharpMap.Converters.WellKnownBinary.GeometryFromWKB.Parse(< byte array >); But it…
pankaj
  • 207
  • 6
  • 18
2
votes
1 answer

.NET framework error when enabling where clause in sql query

I am facing a weird issue wherein on disabling/enabling certain condition in where clause, my Select query throws .net framework error. Here is the CREATE table script. Table test_classes: CREATE TABLE [dbo].[test_classes] ( [CLASSID] [int] NOT…
Prabhat G
  • 2,974
  • 1
  • 22
  • 31
1
vote
0 answers

geoserver layaerpreview internalerror? unknown WKB type 12 . in openlayers

internal error unknown WKB type 12 in geoserver layaer preview using load openlayers in geoserver using i am create a web mapping application but some layers are seen only when i am zoom in
1
vote
2 answers

How to convert WKB format to Geometry in R

I have a table column with data values in wkb format and I want to convert it to geometry. I came across few functions in sql (like "to_geography()") but I am not able to find how to do the same in R. I don't have any code but I have a column in…
1
vote
1 answer

Golang create wkb.Polygon from a list of coordinates

I have lists of coordinates in a file which I want to get their polygon. I used wkb library to load the coordinates, but when I try to set them into the wkb.Polygon object, I get an error: panic: interface conversion: interface {} is [][][]float64,…
Zeinab Abbasimazar
  • 9,835
  • 23
  • 82
  • 131
1
vote
1 answer

WKBReadingError: Could not create geometry because of errors while reading input

I want to upload data with postgis using an sql query. See below the code df = gpd.GeoDataFrame.from_postgis('select ST_ASTEXT(point_sm) as geom from df.df' , con=engine, geom_col='geom') I get this error: ParseException: Invalid HEX…
Reda S
  • 167
  • 12
0
votes
0 answers

For-loop error with number of objects mismatch

I have a set of 356 KMZ files (Google Maps polygons) representing 356 administrative units across the Philippines, with details on tree planting projects. I am only interested in some of those projects and so I need to 'unzip' those KMZ files to…
badiskhiari
  • 13
  • 1
  • 4
0
votes
1 answer

Converting Lat Long Coordinates to A Hex value geographical coordinate possible (EWKB)?

I have a few coordinates and their corresponding coordinates which are stored in a geography format in my database. 2.352917, 101.801556 : 0xE6100000010D6DE7FBA9F1D2024017D9CEF7537359400000000000000000 1.283333, 103.500000 :…
0
votes
0 answers

Openlayers cant recognize WKB type 168

I am attempting to use a spatialite database generated by QGIS in openlayers. I receive the following error Uncaught Error: Unsupported WKB geometry type 168 is found The code below uses a sample of one of my WKB entries. It is a MULTIPOLYGON…
James
  • 702
  • 2
  • 15
  • 39
1
2 3