Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Belvire
otb
Commits
46a1cc75
Commit
46a1cc75
authored
16 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
DOC: otbVectorDataProjectionFilter
parent
cc3e07cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Projections/otbVectorDataProjectionFilter.h
+23
-22
23 additions, 22 deletions
Code/Projections/otbVectorDataProjectionFilter.h
Code/Projections/otbVectorDataProjectionFilter.txx
+8
-21
8 additions, 21 deletions
Code/Projections/otbVectorDataProjectionFilter.txx
with
31 additions
and
43 deletions
Code/Projections/otbVectorDataProjectionFilter.h
+
23
−
22
View file @
46a1cc75
...
...
@@ -31,30 +31,31 @@ namespace otb
* \brief Reproject vector data in a different coordinate system
*
* This class is used to reproject vector data into a different coordinate system.
* the input and output coordinate system can be a map projection, a raw image from a
* sensor (the sensor model will be used), or the local coordinate system of an image.
*
* This filter works on otb::VectorData as input and output.
*
* The process goes as follow:
* - offset/scaling of the input coordinates
* - transform to get the data in geographic coordinates (lon/lat)
* - transform from geographic coordinates
* - offset/scaling of the output coordinates
*
* Each of this step is optional and would default to and identity transform is nothing
* is specified.
*
* The offset/scaling step are necessary only when working with the local coordinate
* system of the image. The value need to be provided by the SetInputSpacing, SetInputOrigin,
* SetOutputSpacing and SetOutputOrigin methods.
*
* The two transforms are itk::Transform that will be instanciated as otb::GenericMapProjection
* or otb::InverseSensorModel or otb::ForwardSensorModel.
* the input and output coordinate system can be a map projection, a raw image from a
* sensor (the sensor model will be used), or the local coordinate system of an image.
*
* This filter works on otb::VectorData as input and output.
*
* The process goes as follow:
* - offset/scaling of the input coordinates
* - transform to get the data in geographic coordinates (lon/lat)
* - transform from geographic coordinates
* - offset/scaling of the output coordinates
*
* Each of this step is optional and would default to an identity transform if nothing
* is specified.
*
* The offset/scaling steps are necessary only when working with the local coordinate
* system of the image (origin on the top left). The value need to be provided by the
* SetInputSpacing, SetInputOrigin, SetOutputSpacing and SetOutputOrigin methods.
*
* The two transforms derived from itk::Transform and will be instanciated as
* otb::GenericMapProjection or otb::InverseSensorModel or otb::ForwardSensorModel
* (according to the available information).
*
* \ingroup VectorDataFilter
* \ingroup Projection
*/
* \ingroup Projection
*/
template
<
class
TInputVectorData
,
class
TOutputVectorData
>
class
ITK_EXPORT
VectorDataProjectionFilter
:
...
...
This diff is collapsed.
Click to expand it.
Code/Projections/otbVectorDataProjectionFilter.txx
+
8
−
21
View file @
46a1cc75
...
...
@@ -197,27 +197,14 @@ namespace otb
VectorDataProjectionFilter<TInputVectorData,TOutputVectorData>
::ReprojectPoint(PointType pointCoord) const
{
// typedef typename LineType::VertexListType::ConstPointer VertexListConstPointerType;
// typedef typename LineType::VertexListConstIteratorType VertexListConstIteratorType;
// VertexListConstPointerType vertexList = line->GetVertexList();
// VertexListConstIteratorType it = vertexList->Begin();
// typename LineType::Pointer newLine = LineType::New();
// while ( it != vertexList->End())
// {
itk::Point<double,2> point;
// itk::ContinuousIndex<double,2> index;
// typename LineType::VertexType pointCoord = it.Value();
pointCoord[0] = pointCoord[0] * m_InputSpacing[0] + m_InputOrigin[0];
pointCoord[1] = pointCoord[1] * m_InputSpacing[1] + m_InputOrigin[1];
point = m_Transform->TransformPoint(pointCoord);
point[0] = (point[0] - m_OutputOrigin[0]) / m_OutputSpacing[0];
point[1] = (point[1] - m_OutputOrigin[1]) / m_OutputSpacing[1];
// index[0]=point[0];
// index[1]=point[1];
// otbMsgDevMacro(<< "Converting: " << it.Value() << " -> " << pointCoord << " -> " << point << " -> " << index);
// newLine->AddVertex(index);
// it++;
// }
itk::Point<double,2> point;
pointCoord[0] = pointCoord[0] * m_InputSpacing[0] + m_InputOrigin[0];
pointCoord[1] = pointCoord[1] * m_InputSpacing[1] + m_InputOrigin[1];
point = m_Transform->TransformPoint(pointCoord);
point[0] = (point[0] - m_OutputOrigin[0]) / m_OutputSpacing[0];
point[1] = (point[1] - m_OutputOrigin[1]) / m_OutputSpacing[1];
return point;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment