Giter Site home page Giter Site logo

dump_gdbtable's Introduction

dump_gdbtable

Python script to dump the content of a .gdbtable according to the reverse engineered FileGDB specification

dump_gdbtable's People

Contributors

nyalldawson avatar rouault avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dump_gdbtable's Issues

Print uuid as uuid (patch)

In one dump I have to make it would be better to grab directly the uuid correctly formatted
Here how I've done it.

diff --git i/dump_gdbtable.py w/dump_gdbtable.py
index ab00ac1..36137dd 100644
--- i/dump_gdbtable.py
+++ w/dump_gdbtable.py
@@ -34,6 +34,7 @@

 import struct
 import sys
+import uuid

 if len(sys.argv) != 2:
     print('Usage: dump_gdbtable.py some_file.gdbtable')
@@ -590,7 +591,7 @@ for fid in range(nfeaturesx):

         elif fields[ifield].type == 10 or fields[ifield].type == 11:
             val = f.read(16)
-            print('Field %s : "%s"' % (fields[ifield].name, ''.join(x.encode('hex') for x in val)))
+            print('Field %s : "%s"' % (fields[ifield].name, uuid.UUID(bytes=val)))

         elif fields[ifield].type == 7:
             geom_len = read_varuint(f)

Un-parseable file db

Hi there,

I have been using the excellent ogr2ogr gdb extension, but I found a database that it can't open, the Washington state soils database downloads (both statewide and per-county):

https://fortress.wa.gov/dnr/app1/dataweb/dmmatrix.html#Soils

Note that I found geometry problems even after opening in ESRI and exporting to shapefile and playing with that using ogr2ogr.

Not sure where else to post this, will also post to the GDAL trac site.

Thanks!

encode('hex') not supported in python 3.6.9

Thanks for this code. I was using it to troubleshoot an fgdb and modified line 740 to get it to work in python 3

Replaced
print('Field %s : "%s"' % (fields[ifield].name, ''.join(x.encode('hex') for x in val)))
with
print('Field %s : "%s"' % (fields[ifield].name, ''.join(bytes.hex(val))))

print('Field %s : "%s"' % (fields[ifield].name, ''.join(x.encode('hex') for x in val)))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.