Skip to main content
Question

Import raster image to Postgis

  • September 5, 2014
  • 9 replies
  • 127 views

hoa_le
Contributor
Forum|alt.badge.img+5
Hi everybody,

 

 

I have a raster image(TIFF file). I want to import it to Postgis.

 

How can I do?

 

I tried it : - Reader: read tiff file , - Writer: PostGIS Raster.

 

But I got error. Could you tell me please how can I do?

 

Thank you

 

 

 

 

 

9 replies

takashi
Evangelist
  • September 5, 2014
There should be more detailed error messages above that.

 

Paste all the error messages.

hoa_le
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 8, 2014
Yes. I tried Reader from Postgis and I got it:

 

 

 


takashi
Evangelist
  • September 8, 2014
The "fme" database could be a non-spatial database. Did you create it as a spatial database (i.e. PostGIS DB)? If you didn't, you have to extend it as a spatial database at first.

 

If you are using pgAdmin III tool, the way described in this page would be a quickest one.

 

Creating a spatial database (http://www.amipci.org.mx:8080/opengeo-docs/dataadmin/pgGettingStarted/createdb.html)

hoa_le
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 9, 2014
Thank you. The problem is create a spatial database. I can do it :)

hoa_le
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 9, 2014
I imported in postgis but when I view it in inspect, I saw it has not attribute, It means it is not value. For example: temperature, I dont see value.

 

 

Could you tell me how can I do? Thanks

 

 

 


takashi
Evangelist
  • September 9, 2014
A raster has pixel values but cannot have attributes like vector features. The image looks like a geographic feature of northern Vietnam. I guess the raster have elevation as its pixel value, that's a typical use case of raster on GIS.

 

What kind of result do you expect?

hoa_le
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 9, 2014
Exactly. It's northern of VietNam :-). Thank you cared Vietnam.

 

I am connecting temperature image to Postgis.

 

When I connected, I check in inspector. I saw It has not value.

 

When I connect postgis to QGIS. I cant open this raster.

 

I saw in this example, it has Value of each pixel:

 

 

 

 


takashi
Evangelist
  • September 9, 2014
Solution depends on the temperature data and your requirement.

 

Just one example. If the data consists of points each of which has temperature as its attribute, this process might work as expected.

 

1) Assign temperature into z-coordinate for each point (3DForcer).

 

2) Create a DEM raster based on the points (RasterDEMGenerator).

 

3) Clip the raster by the interest area (Clipper).

 

4) Write the raster into the database.

hoa_le
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 10, 2014
Yes. My requirement is transfer Geotiff image to store Postgis.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings