Boost logo

Geometry :

Subject: [geometry] Geometries represented in multiple point types
From: Andrew Hundt (athundt_at_[hidden])
Date: 2013-01-29 18:48:08

I am dealing with a box type that is specified in multiple coordinate
systems because it is translating from vector to raster. One point
type is integer based for the location in an image (cartesian), and
the other is a point defined with doubles, also a cartesian system.

I initially tried to define the coordinates by defining tags
inheriting from the point_type tag assuming that tag_cast would be
applied, keeping all existing geometry calls functional as follows:

struct grid_point_tag : boost::geometry::point_tag {};
struct world_point_tag : boost::geometry::point_tag {};

However, this turned out not to be the case as nearly all uses of
point_tag don't use tag_cast. Alternatively I can define an entirely
new tag system for these points and use that. While it would work
around the problem I don't feel like it is the best way to solve it.
If there are any ideas they would be greatly appreciated.

Andrew Hundt

Geometry list run by mateusz at