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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
David Youssefi
otb
Commits
b13091c9
Commit
b13091c9
authored
12 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add dataNode methods using directly the OGR api -> need to use the OGRAdapters (wip)
parent
220d6e01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Common/otbDataNode.h
+11
-0
11 additions, 0 deletions
Code/Common/otbDataNode.h
Code/Common/otbDataNode.txx
+26
-0
26 additions, 0 deletions
Code/Common/otbDataNode.txx
with
37 additions
and
0 deletions
Code/Common/otbDataNode.h
+
11
−
0
View file @
b13091c9
...
...
@@ -266,6 +266,17 @@ public:
double
EuclideanDistance
(
const
DataNode
*
node
);
double
EuclideanDistance
(
const
PointType
point
);
/**
* \return true if the two datanodes intersects
*/
bool
Intersects
(
const
DataNode
*
node
);
/**
* \return true if the two datanodes intersects
*/
bool
Within
(
const
DataNode
*
node
);
/**
* Clear all fields.
*/
...
...
This diff is collapsed.
Click to expand it.
Code/Common/otbDataNode.txx
+
26
−
0
View file @
b13091c9
...
...
@@ -636,6 +636,32 @@ DataNode<TPrecision, VDimension, TValuePrecision>
return currentGeometry->Distance(&ogrPointSrc);
}
template <class TPrecision, unsigned int VDimension, class TValuePrecision>
bool
DataNode<TPrecision, VDimension, TValuePrecision>
::Intersects(const DataNode* node)
{
// Convert the nodes to OGRGeometries
OGRGeometry * dstGeomtery = this->ConvertDataNodeToOGRGeometry(node);
OGRGeometry * currentGeometry = this->ConvertDataNodeToOGRGeometry(this);
//
return currentGeometry->Intersects(dstGeomtery);
}
template <class TPrecision, unsigned int VDimension, class TValuePrecision>
bool
DataNode<TPrecision, VDimension, TValuePrecision>
::Within(const DataNode* node)
{
// Convert the nodes to OGRGeometries
OGRGeometry * dstGeomtery = this->ConvertDataNodeToOGRGeometry(node);
OGRGeometry * currentGeometry = this->ConvertDataNodeToOGRGeometry(this);
//
return currentGeometry->Within(dstGeomtery);
}
} // end namespace otb
...
...
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