Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make datasource info available as python objects #171

Closed
artemp opened this Issue · 6 comments

2 participants

@artemp
Owner

To avoid this kind of monkeypatching to parse the string returned from lyr.describe():

http://mapnik-utils.googlecode.com/svn/trunk/nikinfo/nikinfo.py

a more pythonic interface to be exposed to a layers datasource.

@artemp
Owner

[springmeyer] essentially I think a list of fields should be exposed, as well as the name/type of the datasource and the encoding.

Further, datasource specific parameters can be exposed in the params object (once we get that working via python #330).

@artemp
Owner

[springmeyer] added in r1121

you can now do:
{{{
(Pdb) ds.fields()
'FIPS', 'ISO2', 'ISO3', 'UN', 'NAME', 'AREA', 'POP2005', 'REGION', 'SUBREGION', 'LON', 'LAT' ds.field_types()
, , , , , , , , , , ds.name()
'shape'
(Pdb) ds.encoding()
'utf-8'

}}}

@artemp
Owner

[springmeyer] changing milestone... going to be part of 0.6.1 release

@artemp
Owner

[springmeyer] this could use a review before the 0.6.1 release, so re-opening....

@artemp
Owner

[springmeyer] r1162 added/exposed params() methods, also needs review/improvement

@artemp
Owner

[springmeyer] leaving open and moving to 0.6.2 for further review

@springmeyer springmeyer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.