Think about Loose Coupling | |
PerlMonks |
Geo Package filesby Bod (Parson) |
on Mar 03, 2022 at 13:45 UTC ( [id://11141799]=perlquestion: print w/replies, xml ) | Need Help?? |
Bod has asked for the wisdom of the Perl Monks concerning the following question: I suspect this is a bit of a longshot...but... Has anyone had any dealings with reading a Geo Package .gpkg file using Perl. I cannot find anything in CPAN that might help. A .gpkg file is a SQLite3 DB file. Of course, Perl can handle this. I have used DBD::SQLite to access the Geo Package. The file I am trying to use only has one layer so it only has one row in the gpkg_contents table. This defines the content I need as being in the openUSRN table. I've used this code to peek at this table....
There are four fields in the table. Three are human-readable text. However, the one I am most interested in, geometry, is gobbledegook. A quick look at the specification seems to show that it is not going to be trivial to work out how to decode this from scratch. So I am hopeful that someone has trodden this path before to give me a head start or even a solution. I suspect that the geometry is actually a linestring. I am only interested in getting the co-ordinates of the start and the end of the linestring. Here is a sample of the output...
Back to
Seekers of Perl Wisdom
|
|