Hello Ahmed,

I just posted a similar question a few days before with a solution.
Your problem is, that data is a raw bytea which is passed to ST_GeomFromWKB. Try to use escaping http://www.postgresql.org/docs/9.4/static/datatype-binary.html

So maybe
select location, st_astext(ST_GeomFromWKB(E'data', 4326)) from tiletable_0 where location='dem2_4326_06_11.tif';
might work.

- Benjamin

Am 20.04.2015 um 09:12 schrieb Ahmet Temiz:
hello

I am trying to get "data(" bytea ")  , then convert it to postgis raster.

On this table:

  Column  |     Type      | Modifiers
----------+---------------+-----------
 location | character(64) | not null
 data     | bytea         |
Indexes:
    "tiletable_2_pk" PRIMARY KEY, btree (location)
​
​***  I tried to get "data(" bytea ")  as then convert to postgis raster

tr2=> select location, st_astext(ST_GeomFromWKB(data, 4326)) from tiletable_0 where location='dem2_4326_06_11.tif';
ERROR:  Invalid endian flag value encountered.


how can I solve the problem ?

regards

--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu


________________________

Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency


_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

--
Dipl.-Betriebsw. (BA), Bachelor of Science
Benjamin Börngen-Schmidt
Bleichstraße 44
64293 Darmstadt

fon: +49-176-25300297
email: [email protected]

_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to