Skip to content

Pcpatch to gdal raster

Remi-C edited this page Feb 16, 2015 · 8 revisions

goal

This project proposes python library to

  • convert from pcpatch to numpy structured array (custom dtype)
  • convert a numpy structured array to one or several gdal rasters

##architecture the mainarchitecture is :

  • a class to store pc_schema and tools to parse xml to file it;
  • a class to store the numpy structured array plus metadata associated to it
  • function to read write pcpoint/pcpatch
  • function to convert numpy structured array plus metadata to gdal rasters

there are several distinct utilities :

  • reading and parsing a xml schema
    • pcpatch and pcpoint can be understood thanks to an xml pcschema
    • this xml schema is parsed and translated as a custom pcschema python class
  • reading writing pcpoint / pcpatch in wkb format
    • uncompressed pcpatch can be read and write in wkb thanks to python struct module.
    • both read and write use numpy structured array as interface
  • creating gdal rasters from numpy array
    • on pcpatch may with several attributes may be converted to several monoband rasters.
    • the user define the function that create the pixel values, so it can be the result of any computing between attributes

feature

  • full schema parsing
  • convert to numpy structured array
  • cache for schema
  • work inside and outside db (transparently, plpyhton or python)
  • automatic src transmission
  • automatic nodata creation
  • user defined function to create rasters

##limitation

  • a pixel value can only be determined from point with min_z in this pixel
  • need a way to easily transfer attributes without modification
  • need a way to propagate scale and offset

##todo

  • vrt dataset from all output rasters
  • scale and offset
  • cleaning
  • better doc (for users)
Clone this wiki locally