From: Sunburned S. <sun...@gm...> - 2007-04-16 21:05:13
|
I know that SVG uses a coordinate system in which the "X" or "northing" coordinate value increases as you move "down" the screen or page. Is this the coordinate system that lib2geom uses, or does the library employ a more typical coordinate system in which the "X" or "northing" coordinate value decreases as you move "down" the screen or page. If lib2geom does not use the SVG coordinate system, does it provide code to do the translation? Thanks, Scott Huey |
From: MenTaLguY <me...@ry...> - 2007-04-16 21:20:02
|
On Mon, 16 Apr 2007 14:04:46 -0700, "Sunburned Surveyor" <sun...@gm...> wrote: > I know that SVG uses a coordinate system in which the "X" or "northing" > coordinate value increases as you move "down" the screen or page. Is this > the coordinate system that lib2geom uses, or does the library employ a > more typical coordinate system in which the "X" or "northing" coordinate value > decreases as you move "down" the screen or page. > > If lib2geom does not use the SVG coordinate system, does it provide code > to do the translation? The short answer is that (ideally) nothing in lib2geom really cares. The ultimate interpretation of the coordinate system is up to the client. -mental |
From: mgsloan <mg...@gm...> - 2007-04-17 05:31:41
|
On 4/16/07, MenTaLguY <me...@ry...> wrote: > > On Mon, 16 Apr 2007 14:04:46 -0700, "Sunburned Surveyor" < > sun...@gm...> wrote: > > I know that SVG uses a coordinate system in which the "X" or "northing" > > coordinate value increases as you move "down" the screen or page. Is > this > > the coordinate system that lib2geom uses, or does the library employ a > > more typical coordinate system in which the "X" or "northing" coordinate > value > > decreases as you move "down" the screen or page. > > > > If lib2geom does not use the SVG coordinate system, does it provide code > > to do the translation? > > The short answer is that (ideally) nothing in lib2geom really cares. The > ultimate interpretation of the coordinate system is up to the client. > Yeah, I've gotten in trouble for making methods like cw (clockwise) and ccw (counter-clockwise) before, as these would imply a particular coordinate system (or at least, the desired behavior varies depending on your view of the coord sys). |
From: Sunburned S. <sun...@gm...> - 2007-04-17 16:04:53
|
I understand now that every geometry in lib2geom maintains its own "coordinate system". I am curious how this will work with the spatial index. For a spatial index to work won't I need to have geometries on a common coordinate system? Perhaps this is a foolish question. Scott On 4/16/07, mgsloan <mg...@gm...> wrote: > > On 4/16/07, MenTaLguY <me...@ry...> wrote: > > > > On Mon, 16 Apr 2007 14:04:46 -0700, "Sunburned Surveyor" < > > sun...@gm...> wrote: > > > I know that SVG uses a coordinate system in which the "X" or > > "northing" > > > coordinate value increases as you move "down" the screen or page. Is > > this > > > the coordinate system that lib2geom uses, or does the library employ a > > > more typical coordinate system in which the "X" or "northing" > > coordinate value > > > decreases as you move "down" the screen or page. > > > > > > If lib2geom does not use the SVG coordinate system, does it provide > > code > > > to do the translation? > > > > The short answer is that (ideally) nothing in lib2geom really > > cares. The ultimate interpretation of the coordinate system is up to the > > client. > > > > Yeah, I've gotten in trouble for making methods like cw (clockwise) and > ccw (counter-clockwise) before, as these would imply a particular coordinate > system (or at least, the desired behavior varies depending on your view of > the coord sys). > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Lib2geom-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/lib2geom-devel > > |
From: MenTaLguY <me...@ry...> - 2007-04-17 17:00:25
|
On Tue, 17 Apr 2007 08:35:12 -0700, "Sunburned Surveyor" <sun...@gm...> wrote: > For a spatial index to work won't I need to have geometries on a common > coordinate system? Yes. Each spatial index would need to have its own "global" coordinate system, and either all geometric objects in the index would be assumed to be in that coordinate system, or each object's entry in the index would need to be accompanied by a transformation from the object's coordinate system to the index's. I'm not sure which is better really. -mental |
From: mgsloan <mg...@gm...> - 2007-04-18 00:44:00
|
I think it's much more pure to not include a matrix with all objects. This has actually given me an idea - a Transformed<> template! may be useful in inkscape, anyway. The main reason for this is that it removes matrices and related code from seperate concepts, like paths , curves, etc. Another reason is possible future optimizations - immutable objects might memoize conversions, for example. On 4/17/07, MenTaLguY <me...@ry...> wrote: > > On Tue, 17 Apr 2007 08:35:12 -0700, "Sunburned Surveyor" < > sun...@gm...> wrote: > > For a spatial index to work won't I need to have geometries on a common > > coordinate system? > > Yes. Each spatial index would need to have its own "global" coordinate > system, and either all geometric objects in the index would be assumed to be > in that coordinate system, or each object's entry in the index would need to > be accompanied by a transformation from the object's coordinate system to > the index's. > > I'm not sure which is better really. > > -mental > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Lib2geom-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/lib2geom-devel > |