Solved

Can't correctly recognize the Geometry column

  • 3 September 2019
  • 11 replies
  • 20 views

Badge

Hi

When I created my Reader, I can read all my data and especially my geometry column but this column doesn't display . I try different coordinate system but it does not match. Same issue.

What's wrong with this Reader ?

Thanks

icon

Best answer by nielsgerrits 3 September 2019, 12:06

View original

11 replies

Userlevel 6
Badge +32

I think you read a PostGIS table with a PostgreSQL reader?

Badge +3

yeah, looks like wrong reader(?)

You could of course use geometryreplacer on the string.

Badge

@gio : No I didn't try the geometryreplacer Transformer.

@nielsgerrits : yes you're right. (I read a PosGIS column type from a PostgreSQL reader. My data are in Psotgresql database )

Userlevel 6
Badge +32

@gio : No I didn't try the geometryreplacer Transformer. 

@nielsgerrits : yes you're right. (I read a PosGIS column type from a PostgreSQL reader. My data are in Psotgresql database )

@jerome "PostGIS is an extension to the PostgreSQL object-relational database system which allows GIS (Geographic Information Systems) objects to be stored in the database. PostGIS includes support for GiST-based R-Tree spatial indexes, and functions for analysis and processing of GIS objects." - https://postgis.net/docs/manual-2.5/ 

PostgreSQL non spatial --> PostgreSQL reader

PostgreSQL spatial --> PostGIS reader

@gio What settings do you need to get the GeometryReplacer to work with the geometry column? When I read a 3D point (0.5,0.5,0.5) with the PostgreSQL reader the geometry value is:

0101000080000000000000E03F000000000000E03F000000000000E03F

Using the GeometryReplacer with WKB I get:

2019-09-04 06:50:08|   0.5|  0.0|WARN  |Invalid WKB encountered.

This is in 2019.1.1.0

Badge +16

@jerome "PostGIS is an extension to the PostgreSQL object-relational database system which allows GIS (Geographic Information Systems) objects to be stored in the database. PostGIS includes support for GiST-based R-Tree spatial indexes, and functions for analysis and processing of GIS objects." - https://postgis.net/docs/manual-2.5/ 

PostgreSQL non spatial --> PostgreSQL reader

PostgreSQL spatial --> PostGIS reader

@gio What settings do you need to get the GeometryReplacer to work with the geometry column? When I read a 3D point (0.5,0.5,0.5) with the PostgreSQL reader the geometry value is:

0101000080000000000000E03F000000000000E03F000000000000E03F

Using the GeometryReplacer with WKB I get:

2019-09-04 06:50:08|   0.5|  0.0|WARN  |Invalid WKB encountered.

This is in 2019.1.1.0

@nielsgerrits I belive you need to set it to OGC Well Known Binary (not tested)

Userlevel 6
Badge +32

@nielsgerrits I belive you need to set it to OGC Well Known Binary (not tested)

@itay Yeah thats what I thought but this gave me the "Invalid WKB encountered." warning.

Badge +16

@itay Yeah thats what I thought but this gave me the "Invalid WKB encountered." warning.

oops...I see that now...

Badge

@gio : No I didn't try the geometryreplacer Transformer.

@nielsgerrits : yes you're right. (I read a PosGIS column type from a PostgreSQL reader. My data are in Psotgresql database )

@nielsgerrits: I had installed the posgis extension with Postgresql and it worked well. But I didn't think it was necessary to change the type of Reader. I didn't know OGC WKB.

 

Badge +3

@jerome

 

 

Hi,

Geometryreplacer: Hex Encoded OGC Well Known Binary

 

(The letters in the string indicate it is hexadecimal.)

 

Greets

Badge

You're right . I used the wrong reader: my data was in a Posgresql database format but my column was in Postgis. So with the Postgis format I can now read my geometry data.

Thanks.

Userlevel 6
Badge +32

@jerome

 

 

Hi,

Geometryreplacer: Hex Encoded OGC Well Known Binary

 

(The letters in the string indicate it is hexadecimal.)

 

Greets

Learned something today, thanks!

Reply