ThinkGeo.com    |     Documentation    |     Premium Support

SID File(Raster Image File) to SQL Server and Displaying that as a feature layer

Hi! I am developing a map with some vector and raster layers.
I have made MapView object and overlayed the vector layer from SQL Server.
Now, my issue is how to store the .sid file to SQL Server and display it as a feature layer.
Please help me.

hi @willson_sam ,

I don’t think we can store .sid file to sql and display it as a feature layer. As you may notice, there’re xxxRasterLayer and xxxFeatureLayer in thinkgeo products, RasterLayer and FeatureLayer are totally different.

Thanks,
Leo

Thanks Leo.
I want to restore raster image data(Tiles or MrSID file) to Sql Server.
How can I do that?

hi, @Kyle_Day, it seems that you implemented raster stuff with SqlLite? maybe SqlServer can support this also, right?

Thanks,
Leo

Hey @willson_sam,

So, in order to get these in SqlServer, here is what I would do:

  1. Create a small project that displays the MrSid data
  2. In that small project, add a FileRasterTileCache to the overlay
  3. Create a script that uses mapView.Pan and mapView.Zoom to programmatically draw the entire extent of the MrSid file
  4. Add the generated TileCache images to a table using zoomlevel, row, column, image as columns

From there, I have a class laying around that can consume tiles from a SQLite database that can be adapted to use SqlServer instead. Better yet, I might be able to implement it in our existing code to where you just need to override a function and query your table there.

Let me know if any of that makes sense to you or if you need any clarifications.

Thanks,
Kyle

Hi Kyle.
Thanks for your help.
I am just going to do that with your hint.
Now, I am wondering how to restore raster tiles to SQL Server.
I have to build script to upload the tiles automatically?

Hey @willson_sam,

Yes, you’ll have to build a script to take the file the TileCache generates to add them to the table in SQL Server.

Thanks,
Kyle