Re: [gdal-dev] R: Problem using ogrlineref

2016-07-02 Thread Dmitry Baryshnikov

Hi Dan,

Feel free to rewrite the docs more understandable.
You have to fork https://github.com/OSGeo/gdal
make changes to 
https://github.com/OSGeo/gdal/blob/trunk/gdal/apps/ogr_utilities.dox

and provide pull request.
Also, look at man pages of other utilities as an example how it should 
be done (i.e. http://gdal.org/ogr2ogr.html).


Best regards,
Dmitry

02.07.2016 01:19, 積丹尼 Dan Jacobson пишет:

Well OK but the Debian guy closed all my bug reports instantly,
and on the man page you will need to give full examples, including input file 
content,
before any of this becomes understandable. Thanks.



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

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread 積丹尼 Dan Jacobson
Well OK but the Debian guy closed all my bug reports instantly,
and on the man page you will need to give full examples, including input file 
content,
before any of this becomes understandable. Thanks.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread Dmitry Baryshnikov

Hi Dan,

I see your tickets on debian bug tracker.
1. ogrlineref support all GDAL vector drivers with write capability
2. You didn't set -f (format) option, so default driver was set - ESRI 
shape file

3. I reproduce segmentation fault (will be fixed soon)
4. Current implementation have the only option to return distance along 
line for some geographic coordinates and coordinates for distance. So 
you need to loop every 500 meters to get what you want.
5. We tested using ogrlineref without any repers (reference point, 
milestones) and it works. You only need to add to OGRLayer three fields 
(beg type of REAL, end type of REAL and scale type of REAL).
6. KML is not good format as ogrlineref expect some attributes filled, 
but KML usually has the few attributes (NAME and Description). In that 
case ogrlineref cannot get some sensitive data from attributes.


Best regards,
Dmitry

01.07.2016 10:10, 積丹尼 Dan Jacobson пишет:

I am trying to use the ogrlineref command.
I can't even understand its man page.
Maybe it only works on shapefiles.
Maybe it only Seg Faults.

How can I get the locations of the kilometer markers given only this KML:


   zaokeng main road 中45市道
   
 1
 120.86817,24.17922,0.0 120.86816,24.17922,0.0...
   


Let's say put the output into a new KML file.

OK maybe I need these redundant starting and ending points too:

   Start
   
 120.86817,24.17922,0.0
   


   End
   
 120.86696,24.16733,0.0
   


Anyway the man page is just a mishmosh to me.

Maybe if you show me how to do it, then I can figure out what "reper"
points are. They certainly aren't English. Maybe I don't need "reper"
points. Maybe I am trying to produce "reper" point.
Nobody knows.
___
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

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread 積丹尼 Dan Jacobson
I just have a single .
I want to put kilometer markers along it.
That is all I am trying to do.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread 積丹尼 Dan Jacobson
I am trying to use the ogrlineref command.
I can't even understand its man page.
Maybe it only works on shapefiles.
Maybe it only Seg Faults.

How can I get the locations of the kilometer markers given only this KML:


  zaokeng main road 中45市道
  
1
120.86817,24.17922,0.0 120.86816,24.17922,0.0...
  


Let's say put the output into a new KML file.

OK maybe I need these redundant starting and ending points too:

  Start
  
120.86817,24.17922,0.0
  


  End
  
120.86696,24.16733,0.0
  


Anyway the man page is just a mishmosh to me.

Maybe if you show me how to do it, then I can figure out what "reper"
points are. They certainly aren't English. Maybe I don't need "reper"
points. Maybe I am trying to produce "reper" point.
Nobody knows.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] R: Problem using ogrlineref

2016-06-07 Thread Dmitry Baryshnikov

Hi Nicola,

The first and last segments usually have beg and end fields value not a 
multiple of 1000.

I.e. begin = 576 m, end 1000 m or begin 76200 m, end 76234 m
This is ok, and ogrlineref correctly woks with this case.

I think, that you can try to play with your data without equal parts 
sizes. But ogrlineref need - beg (double), end(double) and scale 
(double) fields.

Scale - is spatial length of you part divided on linear lenght.
I.e. scale = part.get_Length() / (end - beg)

Best regards,
Dmitry

07.06.2016 18:25, Nicola Baraldo (ICONSULTING) пишет:


Hi Dmitry,

thank you for you response. There is a way to do the step 2 using GDAL?

Moreover, if the path lengths are not multiple of the split size (e.g. 
1000m), how the last segment is handled?


Best regards,

Nicola

*Da:*gdal-dev [mailto:gdal-dev-boun...@lists.osgeo.org] *Per conto di 
*Dmitry Baryshnikov

*Inviato:* martedì 7 giugno 2016 16:16
*A:* gdal-dev@lists.osgeo.org
*Oggetto:* Re: [gdal-dev] Problem using ogrlineref

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 mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] R: Problem using ogrlineref

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

thank you for you response. There is a way to do the step 2 using GDAL?
Moreover, if the path lengths are not multiple of the split size (e.g. 1000m), 
how the last segment is handled?

Best regards,
Nicola

Da: gdal-dev [mailto:gdal-dev-boun...@lists.osgeo.org] Per conto di Dmitry 
Baryshnikov
Inviato: martedì 7 giugno 2016 16:16
A: gdal-dev@lists.osgeo.org
Oggetto: Re: [gdal-dev] Problem using ogrlineref

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