+ Reply to Thread
Results 1 to 2 of 2

Thread: Using Python to find DBF data (im a newb)

  1. #1
    Steven Workman
    Join Date
    Jun 2011
    Posts
    15
    Points
    0
    Answers Provided
    0


    0

    Default Using Python to find DBF data (im a newb)

    Hello all. I am really new to python but have been learning. This is my first post and hopefully someone will be able to help me out. I have a .dbf that contains a huge list (59000 records) of geologic units and their corresponding quadrangles. Each geologic unit can be found in multiple quads too. I want to develop a program that asks a user to input what geologic unit their looking for and output the corresponding quadrangle(s). What would be the best way for me to approach this problem? Thanks for any input.

  2. #2
    Marcin Gasior

    Join Date
    Oct 2010
    Posts
    450
    Points
    559
    Answers Provided
    91


    0

    Default Re: Using Python to find DBF data (im a newb)

    Do you mean your DBF has a column with geologic unit and a column with quadrangle (name/number?) in one row?


    If so, to retrieve required data you can query table with something similar to this:
    Code:
    SELECT DISTINCT 'Quadrangle'
    FROM YourDBF
    WHERE 'GeologicUnit' = "user provided name"
    If you realy have to do it with Python, you may need additional module like http://pypi.python.org/pypi/dbf/


    From your problem description, it appears that no spatial operation is required (actually it can't be as .dbf do not store spatial type).
    In this case maybe its better to import file into Access of Excell and create some form?

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts