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

Loading ans interpreting data from PostGIS

I installed postgis 3.2.4 on OpenSUSE 15.4 and created a table named 'coastline' containing the outlines of all the continents. Here is an example of what I got: select ST_AsEWKT(geometry) from coastline limit 1 MULTILINESTRING((180…
skylendar
  • 11
  • 3
0
votes
0 answers

How to properly use plain SQL code in Postgresql?

I'm using pgadmin right now and this is the table I created. I'm trying to convert this wkb_geometry column into lat,lon geometry point. When I tried to select this column and declare it as a variable so I can perform some conversion on it, I failed…
user40003
  • 101
0
votes
1 answer

Inserting POINT Geometry from DJANGO to POSTGIS database error

Hello I try to use DJANGO to insert point clicked on Leaflet in a POSTGIS database. During the import I receive the following error : "function st_geomfromewkb(bytea) does not exist" My understanding is that the ST_GeomFromEWKB is used to insert…
Rafiosan
  • 13
  • 3
0
votes
3 answers

Java - Converting Hex string to double

Im attempting to decode the value of "Well-known Binary" format in Java. The following Node script does what I need Buffer.from('A4C0A7DEBFC657C0', 'hex').readDoubleLE() // returns -95.1054608 My question is, what is the equivalent Java code?…
mrhijack
  • 311
  • 2
  • 5
0
votes
0 answers

Insert WKB to POINT column in PostgreSQL

Having a hard time working out what do I need to do to insert this export from MySQL: INSERT INTO cities VALUES ('Nameoftheciy',0x0000000001010000005C21ACC6129C48407AFF1F274CA65EC0); I tried wrapping the value in single quotes or extracting the…
Moseleyi
  • 2,585
  • 1
  • 24
  • 46
0
votes
1 answer

Snowflake - error converting binary to geography

I am running the following query: select…
Gabriel
  • 488
  • 4
  • 8
0
votes
1 answer

Using Shapely to convert 2 columns to WKB

I have 2 columns in a CSV called Longitude and Latitude which are being parsed using my Python AWS Lambda Code. I am using the shapely module with the following code to convert the long/lats into geometry format g =…
0
votes
1 answer

How to parse 8-byte double-precision number (little endian) into float64 in BigQuery?

I have a string written as 8-byte double-precision number with little endian and would like to convert it with float64 so that BigQuery can handle it as a number. # example from: hex(little endian): EC51B81E852B4340 to: float64: 38.34 Is there an…
0
votes
1 answer

Conversion of wkt to wkb in postgresql

I have a column named wkt_geometry in a table in Postgres with data converted from latitude and longitude. But I want to convert the wkt_geometry to wkb_geometry using sql commands. If I convert it directly from Lat and long it would even…
0
votes
1 answer

Is there a difference between WKB and the hex value returned in PostGIS

I've been doing some experimenting with PostGIS, and here's what I've noticed: Suppose I have a table defined as follows: CREATE TABLE IF NOT EXISTS geomtest ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, geom geometry(POLYGON, 4326) NOT…
robbieperry22
  • 1,753
  • 1
  • 18
  • 49
0
votes
0 answers

Automatically call function on column upon select or insert

I'm trying to find a way to automatically call a function on a specific column, without actually calling it in the sql statement. I'm using PostGIS with types for different kinds of geometry. I need to insert and select said geometric columns in the…
robbieperry22
  • 1,753
  • 1
  • 18
  • 49
0
votes
0 answers

How can I read byte() geometry into array of points using VBScript?

I have a binary file "geo.bin" that represents some geometry (OGR WKB I think). The binary file has a list of points that make up a polygon. I'd like to read the binary data and create an array of points in my VBScript script. Are there solutions…
carlr
  • 21
  • 5
0
votes
0 answers

PostGis and datatypes WKT

I dont't have any experience with the geographics databases so I hope that you be patiente with me, the thing is: I know that the datatype geography is used if all you care about is measuring distances and lengths and you have data from all over the…
singleMan
  • 1
  • 2
0
votes
0 answers

PHP - Export Altitude (z dimension) from a geometry postgis position

I have a 3D Point like 01010000A0E6100000075F984C153C4A40705F07CE199141400000000000000000 and I want to export x,y and z dimensions from it using PHP. I find GeoPHP library in my searches and seems that it supports 3D points. I used library like…
Mahmood Kohansal
  • 1,021
  • 2
  • 16
  • 42
0
votes
3 answers

R - convert WKB geometry to WKT representation

Does anyone knows a package/function in R that takes Well-Known Binary (WKB) as an input, and returns it's Well-Known Text (WKT) representation?
Yoav
  • 999
  • 3
  • 11
  • 30