Hello,
I'm trying to create geometry from Sql Server geometry Blob to shapefile. I'm trying geometryextractor but it is not working.
(I can not create geometry in Sql server; I can only read data).
Thanks for help
Hello,
I'm trying to create geometry from Sql Server geometry Blob to shapefile. I'm trying geometryextractor but it is not working.
(I can not create geometry in Sql server; I can only read data).
Thanks for help
Typically, when BLOB data is stored in a database, it is for storing large files like images and multimedia. May I ask if you know what the BLOB data represents in this case?
Typically, when BLOB data is stored in a database, it is for storing large files like images and multimedia. May I ask if you know what the BLOB data represents in this case?
https://gis.stackexchange.com/questions/160629/how-to-convert-from-sql-server-geometry-blob-to-something-else
https://gis.stackexchange.com/questions/160629/how-to-convert-from-sql-server-geometry-blob-to-something-else
Have you tried using the GeometryExtractor transformer with the geometry encoding as 'OGC Well Known Binary'?
Have you tried using the GeometryExtractor transformer with the geometry encoding as 'OGC Well Known Binary'?
So the geometry definition is just a part of the BLOB? In that case, I would recommend to try filtering it with regex and/or a StringSearcher transformer. If you are unfamiliar with regex, you could give me an example and I can try to look at it?
So the geometry definition is just a part of the BLOB? In that case, I would recommend to try filtering it with regex and/or a StringSearcher transformer. If you are unfamiliar with regex, you could give me an example and I can try to look at it?
Is it possible to send some data? Just a couple BLOB's in a text file might be enough to see what is going on.
Hi @miladahmad, how is the geometry stored? Is it WKT or SQL Server Binary? You can try using the GeometryReplacer which allows you to set the geometry encoding and select which attribute stores the geometry.
select cast(geomconvert.geombinary as geometry) as geom from
(select
cast(temp.wkb as varbinary(max)) as geombinary
from
(select lBlobColumn] as wkb from dbo. MyTable]
) as temp
) as geomconvert
and I got as error
com.microsoft.sqlserver.jdbc.SQLServerException: A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry":
may be that will indicate the problem
Hi @miladahmad, how is the geometry stored? Is it WKT or SQL Server Binary? You can try using the GeometryReplacer which allows you to set the geometry encoding and select which attribute stores the geometry.
example of attribte of blob column
C2FFD20FBC8CCF11ABDE08003601B76904000000C08C935DE4181D41375658B7481303410000000000000000FA4A2959AA181D41EF9560B9BB13034100000000000000006324DE380E181D41A9F7511D3116034100000000000000004131146754181D41350713DC7A1603410000000000000000
So the geometry definition is just a part of the BLOB? In that case, I would recommend to try filtering it with regex and/or a StringSearcher transformer. If you are unfamiliar with regex, you could give me an example and I can try to look at it?
example.txt
Sorry to bring this up from the past, but was there a resolution to this issue? I'm trying to read data including geometry stored in an Intergraph/Geomedia SQL database using SQLExecutor Microsoft SQL Server Spatial format. Intergraph SQL is not an option in the SQLExecutor for some reason. I have tried the 'Encoded Polyline' method in the GeometryReplacer, but the geometry is not correct.
Sorry to bring this up from the past, but was there a resolution to this issue? I'm trying to read data including geometry stored in an Intergraph/Geomedia SQL database using SQLExecutor Microsoft SQL Server Spatial format. Intergraph SQL is not an option in the SQLExecutor for some reason. I have tried the 'Encoded Polyline' method in the GeometryReplacer, but the geometry is not correct.
@dustin This is not available in SQLExecutor because of the custom geometry. You have to use the Intergraph GeoMedia SQL Server Warehouse reader.