Re: [gdal-dev] Problem using ogrlineref

2016-06-07 Thread Dmitry Baryshnikov

Hi Nicola,

The idea of ogrlineref was follow:
1. You have layer with some lines and some reper points with known 
linear coordinates
2. The reper points divide lines on equal parts (e.i. 1000 m) - this is 
important that parts should be equal
3. The result file will have special structure (required fields: beg, 
end, scale, and some optional)
4. During referencing  ogrlineref make attribute query and get needed 
part based on beg and end fields (which is rather fast), and than calc 
point position inside this part.


In your case, the simple way is to extract begin and end point of your 
lines and make them reper points. After that all steps are usual.


There is no sense to move other fields into the parts file from your 
original datasource. But you can use -lf option to store some value and 
use it in future for join with your original data.


Best regards,
Dmitry

07.06.2016 15:19, Nicola Baraldo (ICONSULTING) пишет:


Hi guys,

I am trying to split some routes into segments of the same length 
(dynamic segmentation) using ogrlineref command.


My data is stored in a shapefile containing a set of paths, for each 
path I know the length in meters.


I have tried ogrlineref with –create, –get_coord and - get_subline.

For the first option I don’t have a reper datasource to provide 
because I don’t have mile-stones, are they really necessaries?


The second and third options give me the following error for each path 
contained in the input shapefile; with –get_coord I have tried both 
options “–m 0” and “–m 1000”, with –get_subline I have tried “-mb 0 
-me 1” options.




Can someone help me using this command? Is there a better way to 
perform dynamic segmentation using GDAL?


Moreover my shapefile contains also a lot of other fields, there is a 
way to keep these information also in the output file?


Thanks,

Nicola


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Problem using ogrlineref

2016-06-07 Thread Nicola Baraldo (ICONSULTING)
Hi guys,

I am trying to split some routes into segments of the same length (dynamic 
segmentation) using ogrlineref command.
My data is stored in a shapefile containing a set of paths, for each path I 
know the length in meters.

I have tried ogrlineref with –create, –get_coord and - get_subline.
For the first option I don’t have a reper datasource to provide because I don’t 
have mile-stones, are they really necessaries?
The second and third options give me the following error for each path 
contained in the input shapefile; with –get_coord I have tried both options “–m 
0” and “–m 1000”, with –get_subline I have tried “-mb 0 -me 1” options.

[cid:image002.png@01D1C0B2.95D5BF20]

Can someone help me using this command? Is there a better way to perform 
dynamic segmentation using GDAL?
Moreover my shapefile contains also a lot of other fields, there is a way to 
keep these information also in the output file?

Thanks,
Nicola
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev