Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [well-known-binary]

a format for representing geographical and geometrical data in binary format.

2
votes
1answer
41 views

PostGIS geometry to GEOS geometry without lwgeom dependency?

I've been looking for ways to convert PostGIS to GEOS geometries without linking to or dependency on lwgeom/liblwgeom. The closest thing I can find is a mention of the pointcloud approach here: ...
0
votes
0answers
36 views

GeoPandas ParseException: Invalid HEX char error

I am trying to read a geospatial table from a PostGIS database on PostgreSQL. Using the funcion sql = '''SELECT ST_AsText(geom) AS geom FROM my_table;''' df = gpd.GeoDataFrame.from_postgis(sql, ...
0
votes
0answers
65 views

Getting well known text from varchar in redshift.

As you know, redshift does not support geometry types. There is a column in a dataset on my redshift db that has varchar column and the format looks like: ...
0
votes
0answers
134 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(...
1
vote
1answer
162 views

GeoServer can't determine native CRS from PostGIS db with wkb_geometry column

I am trying to extract a banks layer from daily OSM extract pbf files for Nepal. After using osmosis and ogr2ogr, I was able to get it into a PostGIS Database. Here are the commands I used: osmosis -...
2
votes
1answer
291 views

Is MULTICURVE geometry in WKT valid according to the standard and open source community?

We are using Oracle function (SDO_UTIL.TO_WKTGEOMETRY) for exporting geometry to WKT. Some geometries have MULTICURVE in WKT, like this one: MULTICURVE (COMPOUNDCURVE (LINESTRING (3451418.006 5481808....
1
vote
0answers
43 views

This functionality is not supported by Default spatial service. DevArt dotConnect for PostgreSQL error

I want to get geometry data as binary. Its give me an error {"This functionality is not supported by Default spatial service."}. I am searching but nothing found about it. var ilces = db.MaksIlces....
2
votes
1answer
403 views

How to convert PostGIS WKB to Shapefile - Fiona 'Polygon' object not iterable error

I am relatively new to Python and programming and trying to create a shapefile using multiple WKBs queried from a PostGIS database. I am using psycopg2 to query the database and using shapely and ...
1
vote
0answers
109 views

Importing GDB WKB geometry error (OGR Geometry Factory err:6)

I have prepared all my layers in File GDB (converted the projection to EPSG3857) and uploaded the entire File GDB to PostGIS. Somehow, it returned errors described below Yet, it is uploaded to my ...
0
votes
2answers
202 views

Exporting WKB (geometry) to .txt using ArcPy?

How can I export WKB (geometry) to text file using arcpy (ArcGIS)? When I use the examples that I found on the Internet, it doesn't work. Below it's the code I'd wrote: ## Import arcpy module ...
2
votes
1answer
246 views

What is wkbType -2147483646 in QGIS?

I want to find out the wkbType of a layer, this is my code: print layer.wkbType() Usually when it is a line geometry layer, it would give me 2. But instead it is giving me -2147483646.
2
votes
2answers
3k views

PostGIS: Update table with st_geometryfromtext [duplicate]

I'm trying to update a column wkb_geometry in a table locations by creating a point from the eastings and northings cols from the same table. The database is PostGreSQL with PostGIS extension: UPDATE ...
2
votes
0answers
30 views

ARCPY loses Z when I use geometry WKB [closed]

I'm trying to convert a shape geometry to WKB within a arcpy.da.cursor for import it in a Postgis database. When I analyze the result I saw that arcpy give me a 2d geoemtry when I convert to WKB. Is ...
2
votes
0answers
631 views

How to convert geometry to WKB in QGIS?

I have a shapefile with polygon type geometry. I want WKB format of the geometry values. Is there any such tool in QGIS so that without using gdal/ogr I can do this?
1
vote
1answer
166 views

Print and write the WKB to another shapefile using OGR_G_ExportToWKB in C?

I want to convert the geometry to well known binary (WKB) format of my shapefile. I want to print and want to write it into another shapefile. My code is: #include <stdio.h> #include <...
1
vote
0answers
467 views

Import CSV with WKB field to QGIS?

I have a CSV file with a column that is WKB, called WKB. When I import it to QGIS (using "Add Delimited Text Layer"), there seems to be no option for WKB, and the file imports as pure CSV - no ...
5
votes
1answer
413 views

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 ...
4
votes
1answer
197 views

Is it possible to convert from Microsoft's format to WKB?

Microsoft chose to create its own binary storage format for spatial data and it is not valid for use with any of SQL's OGC WKB functions. Has anyone run across code to translate from Microsoft's ...
5
votes
2answers
818 views

Conversion of a GeoJSON into EWKB format?

I see libraries such as shape from shapely.geometry that support conversion to WKB and WKT binaries. What I am unable to find is guidance on converting to EWKB specifically. I suspect this is ...
0
votes
1answer
141 views

Geoserver support for WKB spatialdata

I use SQL Server (2012 sp3) DB with Geoserver and i noticed that Geoserver likes to call SQL like SELECT ... geom.STAsBinary() FROM (geoserver sql view) WHERE geom.filter(...) In my test case ....
1
vote
0answers
413 views

Convert WKT to EWKB/WKB using GDAL/OGR? [closed]

How do I convert WKT geometry to EWKB/WKB? Here's my WKT: POLYGON ((113.749421064162419 62.38697568386327,113.754636282390067 62.386872575140529,113.755323673085357 62.334314115202005,113....
3
votes
1answer
679 views

Parsing WKB with python geos: ParseException: Unknown WKB type 16

I am pulling a WKB strings from the MYSQL table in pandas / geopandas, Python 2.7. As it is MySQL, the only way to read geometry is to parse it on the client. However, when parsing, geos raises an ...
1
vote
0answers
170 views

Parse geometry from MYSQL on the client side

I am working with the existing production Mysql database, that contains some geometry (wkb, I think) as a blob. While documentation offers to use ST_AsText(boundaries.geometry) AS geom, Servers says "...
1
vote
1answer
277 views

Importing a CSV with EWKB field into Postgres

I have a csv that I'm trying to import in postgres with postgis enabled but can't seem to get the EWKB field to work. I have created a table: CREATE TABLE sample_data ( id character varying(200) ...
2
votes
0answers
92 views

QGIS clip tool doesn't regenerate geometry column in attribute table

I have a lot of large datasets which all contain WKB defined geometry (point and polygon separate), which makes it easy to load in QGIS from a PostGIS-database. This format is also preferable when ...
2
votes
2answers
579 views

How to convert .csv with WKB to shapefile (.shp) using open source solutions?

I have a .csv file with hundreds of rows pulled out via PostGIS. The geospatial information is in "the_geom" field which seems to be in WKB-format. How can I convert this to shapefile using simple ...
1
vote
1answer
975 views

Transform to SRID 900913

How i can transform the geometry WKB for example: ...
5
votes
4answers
2k views

Transform GeoJSON geometry to WKB

I need transform geometry from JSON like: {"type":"MultiPolygon","coordinates":[[[[-125045.48351212002,4577567.588141698],[-124816.19981552364,4577552.93014355],[-124765.99472517562,4577419.175847012]...
3
votes
1answer
172 views

Decoding POSTGIS dump file

I have a dump from a version of PostGIS that is no longer supported. It dumps the value of a (lat, long) as 01010000003D2CD49AE6A549409AB1683A3B19F1BF How can I decode that number (without using ...
1
vote
0answers
124 views

Converting shapefile to WKB after v.clean

I've been trying to get to through this by reading manuals, but I can't seem to understand what I'm doing. I have source data with overlaps that exist in a table with associated WKBs (SRID 4326). I ...
1
vote
0answers
146 views

SQLite layer from AutoCAD MAP in QGIS editing problem

SQLite files generated with FDO (AutoCAD MAP) have FGF geometry instead of WKB. FGF is an extended version of the Well Known Binary (WKB) format. QGIS can read these layers but they can't be edited, ...
2
votes
2answers
183 views

Why does psycopg2 “SELECT ST_AsBinary(geom)” return “<read-only buffer…>”?

I'm trying to retrieve polygons out of a postgresql database and I'm running into several problems. First, I've been able to get ST_AsText(geom) to work in conjunction with arcpy.FromWKT(), but the ...
3
votes
1answer
365 views

Decoding this GIS blob

I am new to the decoding world (and even to the world of gis), but I am definitely not new to programming and large data. I was tasked with uncovering a column in our db with this information. It's ...
4
votes
2answers
1k views

How to interpret a WKB (Well-known-binary)?

I read this example of a WKB (well know binary) from "PostGIS in Action" 2ed.: SELECT ST_AsBinary( ST_GeomFromWKB( E'\\001\\001\\000\\000\\000\\321\\256B\\312O\\304Q\\300\\347\\030\\220\\275\\336%E@...
3
votes
1answer
805 views

Use Postgis to convert wkb_geometry data type to geom datatype

How would I write an ALTER statement or otherwise to convert an existing imported data column from "wkb_geometry geometry(LineString,4326)" to a geom data type? I ask because I've moved to ...
3
votes
0answers
396 views

Is there a Tiny Well-Known Binary (TWKB) implementation in C#?

I am aware of https://github.com/TWKB/twkb.js and I'm looking at evaluating Tiny Well-Known Binary (TWKB) in a c# application. I did some googling but came up empty. Are there any efforts underway ...
7
votes
1answer
8k views

Understanding the format: WKB from WKT and how to convert the first into the latter [closed]

I don't understand which kind of format I have my data. The column name is wkb_geom, so I supposed that data were in WKB format, but then I was checking around and I couldn't find example of it. Data ...
3
votes
1answer
361 views

I can't understand this ewkb type mask

I have the following ewkb strings from PostGIS: 01 01000020 E6100000 AECB9307F9D81240 0F2ADCE003704940 01 01000020 E6100000 7EAA0A0DC4920DC0 5AF0A2AF201F4440 I've been able to understand every data ...
0
votes
0answers
231 views

GeoServer GeoJson with coodinates in WKB?

I'm using a GeoJson query to GeoServer to update data in existing sqlite database used in an android app. The geometry column in that database is in WKB format, because like this the database is ...
1
vote
1answer
167 views

Android library to show wkb

I would like to use open street map to show data from wkb file(wkb + some extended attributes). I have found out that wkb file is possible to read/query using spatialite. But i dont know how to ...
2
votes
0answers
794 views

QGIS : cannot change the z-coordinate of a point shapefile using the wkb geometry format

I am using QGIS Desktop 2.5.0-Master with GDAL/OGR 1.11.0 on a windows 7. I am working on a little pyQGis script that should modify the z-coordinate of points in a vector shapefile based on a value ...
2
votes
1answer
655 views

Transform wkb to gml geometry using FME

Maybe (and probably) this is stupid question, but I am totaly new to FME and geometry conversion. I need to transform WKB field from SQLServer to GML geometry using FME software. How can I do this?
3
votes
1answer
4k views

Is it possible to get a binary geometry from PostGIS?

PostgreSQL (via C# Npgsql driver) returns geometry column (PostGIS) like a hex string (EWKB as I understand) for this query: SELECT ST_Transform(geometry, 4326) FROM myGeometries; Result (for ...
7
votes
3answers
9k views

PostGIS: parse geometry wkb with OGR

I'm trying to pull a LineString geometry out of PostGIS and parse it with OGR (python bindinds). from osgeo import ogr import psycopg2 connection = psycopg2.connect("...") cursor = connection.cursor(...
0
votes
2answers
2k views

Converting WKT to WKB in Java using PostGIS?

How can I convert a WKT string to a WKB byte[] in Java using PostGIS functions? I need to save that WKT string in a PostGIS database (geometry column.
-1
votes
2answers
338 views

How to convert WKB to radians or utm in postgresql?

I am using PostgreSQL with postgis, the geometries are in UTM and stored as WKB with several shapes types (point, polygon, linestring...). Is there a way to convert the WKB to a list of points in ...
4
votes
1answer
457 views

PyQGIS - Converting WKB to String

Using PyQGIS, i'd like to print the string representation of a point WKB (like what PostGIS displays in geometry columns). For example: p = QgsGeometry.fromPoint(QgsPoint(2, 4)) wkb = p.asWkb() print ...
0
votes
1answer
584 views

Probably base64 encoded WKB - Reading in QGis/ArcGIS?

I have a probably base64 encoded WKB string. How would I load that feature represented by the string into QGis or ArcGIS? I found the QGis QuickWKT plugin, but that does not handle my base64 encoded ...
3
votes
2answers
3k views

Import Points with WKB format to QGIS

I have a .csv file with population data according to specific locations (Points). My problem is that all locations are given in WKB format like that: ...
9
votes
6answers
4k views

WKB to WKT JavaScript function

Turns out json isn't so good at transporting binary data. But with HTML5, XHR2 is now capable of transferring blobs cleanly. I'm looking to transfer binary geometry (to save bandwidth) and decode it ...