Question

SDE raster to PostGIS Raster will not convert

  • 8 February 2018
  • 2 replies
  • 9 views

Badge

I am trying in many ways to convert an SDE raster dataset into a PostGIS raster table, all I need to do is simply copy the table and its content without any manipulation in terms of data or schema. The native table is in SQLServer and it has only 1 record.

I tried in many ways.

Using the appropriate readers writers (SDE => PostGIS Raster). it copies only a non relevant schema with no data

Used the native SQL Server reader (Spatial SQL Server => PostGIS Raster), it reads the feature but when it comes to write it says Failed to obtain raster from feature. Only features with raster geometry are expected. Both with Dynamic and automatic schema definition. Nothing just a schema with empty fields is created.

I tried to use SQLCreator and feature reader . the features are read of from the native SQL Server but when it comes to write, again just empty unwanted fields.

All I would like to do is to recreate the same exact table, schema and data from a SQL server table that contains the raster in a BLOB field to PostGIS using the raster writer.

Can anybody help?


2 replies

Badge +7

Hi @alex_chris, thanks for the question!

 

I'm not sure this is the solution, but if your BLOB attribute is coming through alright I wonder if a RasterReplacer is what you need. It replaces the geometry of the feature with the geometry contained in the BLOB (ie the raster).

 

Hope this helps.

Nathan

Badge

Hi Nathan, I am still not sure why I would need to convert a raster coming from SQLServer as a blob into a format which is not a DB format (GEOTiff, JPEG, etc) and then put it into a PostGIS raster, how?). I probably am not very expert, but how do I fit the resulting raster into a POSTGIS raster table, which attribute should I use?

Thanks in advance if you would like to help @NathanAtSafe

Reply