Creating Polyline from GML using PyShp?

المشرف العام

Administrator
طاقم الإدارة
I have a problem in creating some polylines in one Shapefile with PyShp 1.2.The plan is to read a GML file containing LineStrings and create a shapefile.

The theory is clear, but the realworld is different.As I understand the syntax is as follows:

w.line(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]])

This one is a fixed line, but my lines are flexible.My thoughts were, to extract the Coordinates from the GML file and concatenate it to a String which meets the PyShape Syntax.My results are therefore:


[[[-94,-49.1152],[-94.45451,-49], .... ,[-93,-49.30391],[-94,-49.1152]]]
 
أعلى