Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

New Post: Open shapefile from memory/stream

$
0
0
No, I don't think it's possible without some extra work. Here are some approaches:
1) You can save it to the disk as temporary files (.shp, .shx, .dbf) and then read with Shapefile.LoadDataFrom method (it's loaded as in-memory shapefile so temporary files can be deleted at once).
2) Another approach is to store shapefile data in geometry / geography column and use OgrLayer class to access them directly.
3) As for direct loading of in-memory data, there is Shape.ImportFromBinary method which takes array of bytes as input. In theory you can populate in-memory shapefile with it, but you need to extract chunks of data for particular shapes from your memory stream in order to do it. So it's hardly an easy option.

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>