I use ogr2ogr to convert DXF-files. The conversion to KML and geojson works very well.
For another purpose I need to convert the DXF to SQLite. It works, but I don't know how to use or read the geometry. There's a table "Entities" with a column "GEOMETRY" in somewhat BLOB format.
Does anybody know how to convert this GEOMETRY to WKT, JSON, x/y or something else?
I tried Spatialite (AsText, AsWKT, AsKML) without success.
Thanks!
EDIT/CLOSE:
After many hours I found the cli-parameter -lco to change the geometry format to WKT.
The doc (https://gdal.org/drivers/vector/sqlite.html#layer-creation-options) lists many parameters but has no examples how to use them.
So my working command line is:
ogr2ogr.exe -f SQLite -lco FORMAT=WKT target_wkt.db source.dxf
Related
I'm using Leaflet in R to make an interactive map.
Data I'm using was created using QGIS with Windows-1250 encoding (it's a non-English language). The layers were then exported as geoJSON which only allows UTF-8 encoding and when displaying the features on the map some characters are, of course, displayed wrong.
Is there a way of displaying the encoding properly? Trying to manually change the data results in:
Error: unexpected symbol in x' (x is the wrongly encoded data point I tried to rewrite).
You're not specifying the vector format of the data before being exported - this is more important than the tool used to create that data.
Assuming that the data is in shapefiles, you can use the approach from the question at https://gis.stackexchange.com/q/44057 , and rely on ogr2ogr to both convert to GeoJSON and handle character encoding.
The libE57 is okay but I have to try to do this without any library. I found presentation and there I found next:
Binary Encoding
Blobs :
Opaque encoding
Images, user-defined data ....
"Opaque encoding" means that I can't read .e57 without libE57?
Is there some way to parse it?
I have a parser for a .pcd, .pts, .ptx. Can I convert a .e57 to one of them?
No. You can read data of .e57 only using libe57.
http://www.libe57.org/documentation.html
I'm working with SQLite-Mananger Plugin for FireFox to edit my local geopackage database.
The geometry is stored as BLOB in various tables.
Now I'd like to encode the not readable BLOB format into human readable coordinates.
I already tried it that way:
Select STAsText(geometry) as geometry from table;
With the following error:
no such function: STAsText
I guess because it is a local database and the STAsText-function is for SQL-Sever.
I also tried it with:
SELECT quote(geometry) FROM table
But with this I also get no coordinates.
just use GDAL OGR2OGR "ogr2ogr -f "GeoJSON" path/filename.geojson path/filename.gpkg"
Or use QGIS Desktop. GeoPackage uses a derivation of WKB -Well Known Binary for it's Vector Features BLOB. Conversion to GeoJSON is very straight forward. You can also use GeoPackage-JS to do the conversion.
Click Open Geopackage and it will allow you to download as GeoJSON http://ngageoint.github.io/geopackage-js/
I'm in a big trouble. I've downloaded a GeoTIFFF Dataset from http://earthexplorer.usgs.gov/ ; my problem is that I need the dataset in HDFv4 format, because I've to open it in IDL (please don't tell me "IDL can open GeoTIFF", I NEED HDFv4 format) . May you please suggest me a tool that does this conversion?
Thanks a lot.
Just to get you started, you could read in the image and its GEOTIFF tags using the following command:
file = FILEPATH('boulder.tif', SUBDIR=['examples','data'])
data_variable=READ_TIFF(file, GEOTIFF=GeoKeys)
HELP, GeoKeys, /STRUCTURE
You would then need to pull apart the geotiff structure and write the data back to an HDF4 file. I don't quite understand why you need HDF4, and I'm also not sure how you're going to write the GEOTIFF data into the HDF4 file, since HDF4 doesn't have anything "specific" about map projections.
See the docs for more details:
http://www.harrisgeospatial.com/docs/read_tiff.html
Here's a really bad way to do the conversion:
https://www.hdfgroup.org/HDF5-FAQ.html#gtifftohdf
Basically, in that case you are only saving the image data, not the geotiff-specific data.
Good luck!
Iam trying to load some data using tpump utility from Unix Console.
The data has various datatypes viz., text, number, decimal, date.
Now, iam stuck as what should be the FORMAT type i need to specify in the tpump script.
I went through the tpump manual, but could not decipher the FORMAT type to used.
The data/columns are delimited by "|" symbol.
Any info/hint in using the appropriate FORMAT type would be of great help.
If this is a duplicate question, please help me with the actual question link.
Thanks a lot in advance.