Forum: 1.0 Release

Posted by: Bjoern Ricks
Date: 2011-09-07 09:02
Summary: 1.0 Release
Project: pyshapelib


This project has not yet categorized itself in the Trove Software Map

Content:

I am happy to announce the 1.0 release of pyshapelib a python wrapper for shapelib, a free software library for reading and writing ESRI shapefiles, a frequently used format for geographic data.

Pyshapelib was originally developed as part of the interactive viewer for geographic data Thuban (http://thuban.intevation.org/) but now moved to an own home at http://wald.intevation.org/projects/pyshapelib/

The following changes were made since the last 0.3 release:

Module shapelib:

* Rewritten as a hand-crafted module instead of a SWIG generated one.

* SHPObject now has a method part_types() to return a tuple of the
part types when appropriate. Otherwise, it returns None.

* Added support for shapetypes with Z and M values. When creating measured
shapes (XYM), treat M value as optional (defaults to zero).Similar for 3D
shapes (XYZM), treat both Z and M values as optional (both default to
zero). None is accepted as an M value, but it is stored as zero internally
(ESRI shapefile specs define any M value smaller than 1e-38 as no-data).

* Added 'name' and 'mode' keywords for ShapeFile constructors and the
module's open() function, similiar to Python's file().

* Unicode strings are now accepted as filenames, also on Windows.

Module dbflib:

* Rewritten as a hand-crafted module instead of a SWIG generated one.

* DBFFile objects can be requested to return string content as unicode, via
the optional return_unicode argument in create(), open() and the DBFFile
constructor. If so, string content is decoded using the file's codepage.
Otherwise, the raw encoded string is returned. return_unicode is False
by default.

* DBFFiles now support code pages for string content. These code pages can
either be specified by the numerical LDID field in the .dbf file, or by an
additional .cpg file that contains a single string with the code page name.
Both systems are unified into a single string, the former is of the form
"LDID/nn" where nn is a _decimal_ number between 1 and 255.

When creating a DBFFile, you can specify the code page to use by the
optional code_page argument that defaults to "LDID/87", the ESRI ANSI code
page 0x57. You can inspect the code page of a DBFFile through the readonly
code_page member.

Code pages are associated to Python codecs through a codecs map (see
below). This codec is used to encode or decode string content to or from
dbflib. You can inspect the used codec by the readonly codec member of
DBFFile.

dbflib supports a number of constants of the form LDID_??? and CPG_??? that
are names of code pages that are supported by the builtin codecs map.

* An optional custom codecs_map can be passed to create(), open() and the
DBFFile constructor to map code pages to codecs, for when the builtin
codecs map does not fit your needs.

The keys of this map are strings like the values of the constants LDID_???
and CPG_???. E.g. "LDID/87" for LDID_ESRI_ANSI (use _decimal_ values in
the string) or "UTF-8" for UTF-8 encoding.

The values of this map should be names of Python codecs. See Python
Library Reference - 4.9.2 Standard Encodings to see what codecs are
builtin.

* Added 'name' and 'mode' keywords for ShapeFile constructors and the
module's open() function, similiar to Python's file().

* Unicode strings are now accepted as filenames, also on Windows.

Björn Ricks
Latest News

1.0 Release

Bjoern Ricks - 2011-09-07 09:02 -
Monitor Forum | Start New Thread Start New Thread
That is awesome [ Reply ]
By: kate Garcia on 2011-12-18 08:34
[forum:2235]
I am thankful that there is now commonly used structure with regard to geographic information.

_____________________




<a href="http://www.bpclaim.com/bp-claims/";>oil spill claims</a>