[gdal-dev] densify line?
Frank Warmerdam
warmerdam at pobox.com
Thu Jul 10 13:29:28 EDT 2008
Matt Wilkie wrote:
> Hello All,
>
> Does ogr have a densify line option or utility?
>
> The goal is to densify (add vertices at regular intervals) to a 1
> dergree by 1 degree fishnet grid before projecting from WGS84 to UTM (or
> whatever) so the result follows earth curvature rather then jumping
> straight from corner point to corner point.
>
> I could use Arcinfo DENSIFYARC, but would like to avoid having to
> convert to a coverage if I can.
Matt,
No, no such capability exists in OGR to the best of my knowledge.
The Value() method on OGRCurve might be helpful to identify points along
a line string at particular distance intervals.
/**
* \fn void OGRCurve::Value( double dfDistance, OGRPoint * poPoint ) const;
*
* Fetch point at given distance along curve.
*
* This method relates to the SF COM ICurve::get_Value() method.
*
* @param dfDistance distance along the curve at which to sample position.
* This distance should be between zero and get_Length()
* for this curve.
* @param poPoint the point to be assigned the curve position.
*/
If someone were inclined to implement it, I think a Densify() method
on OGRGeometry would be nice.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list