RE: [svg-developers] SVG speculum
Thanks by the response. Yes, you're right, but I need a process more or less complicated. I need a simply and if is possible, automatic way to do that for a good performance. Barend Köbben <[EMAIL PROTECTED]> wrote:Hi, the key is in the inverted y-axis that SVG has as opposed to most GIS (and therefore shp file) data. In SVG 0 is topleft, y+ is going down, in GIS y+ is going up. Easiest solution is negating all y values (by multiplying * -1). Barend Köbben International Institute for Geo-information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede (The Netherlands) ph: +31-(0)534874253; fax: +31-(0)534874335 _ From: svg-developers@yahoogroups.com on behalf of Edgar Valarezo Sent: Sat 16-Apr-05 21:35 To: svg-developers@yahoogroups.com Subject: [svg-developers] SVG speculum Hi. Sorry for my bad english. I have a problem with the shp2pgsql.exe tool (download since Carto.net) and my PHP-MySQL application. I don't know why my SVG is resulting how if it was reflected by a horizontal mirror. The PHP code (after de SQL spatial query) is like this: //geometry in Well-Know-Text format $wkt="MULTIPOLYGON(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1,1)),((6 7,8 9,4 5,6 7)))"; $d= str_replace("MULTIPOLYGON(((", "M ", $wkt); $d = str_replace(")),((", " z \n M ", $d); $d = str_replace("),(", " z \n M ", $d); $d = str_replace(",", " L ", $d); $d = str_replace(")))", " z \n", $d); /* result: M 0 0 L 0 3 L 3 3 L 3 0 L 0 0 z \n M 1 1 L 1 2 L 2 2 L 2 1 L 1 1 z \n M 6 7 L 8 9 L 4 5 L 6 7 z \n */ There is a simple manner for turn the image since SVG, how change the coordinate system or something like? I know there is simple making a PHP function that do that, but my SVG's are little big and could consume too many resources and processing time. First of all, I need to preserve the performance and the easy-to-use issue. Someone have any idea? Thanks, Ed - Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. [Non-text portions of this message have been removed] - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" Yahoo! Groups Links [Non-text portions of this message have been removed] - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. [Non-text portions of this message have been removed] - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [svg-developers] SVG speculum
Hi, the key is in the inverted y-axis that SVG has as opposed to most GIS (and therefore shp file) data. In SVG 0 is topleft, y+ is going down, in GIS y+ is going up. Easiest solution is negating all y values (by multiplying * -1). Barend Köbben International Institute for Geo-information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede (The Netherlands) ph: +31-(0)534874253; fax: +31-(0)534874335 _ From: svg-developers@yahoogroups.com on behalf of Edgar Valarezo Sent: Sat 16-Apr-05 21:35 To: svg-developers@yahoogroups.com Subject: [svg-developers] SVG speculum Hi. Sorry for my bad english. I have a problem with the shp2pgsql.exe tool (download since Carto.net) and my PHP-MySQL application. I don't know why my SVG is resulting how if it was reflected by a horizontal mirror. The PHP code (after de SQL spatial query) is like this: //geometry in Well-Know-Text format $wkt="MULTIPOLYGON(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1,1)),((6 7,8 9,4 5,6 7)))"; $d= str_replace("MULTIPOLYGON(((", "M ", $wkt); $d = str_replace(")),((", " z \n M ", $d); $d = str_replace("),(", " z \n M ", $d); $d = str_replace(",", " L ", $d); $d = str_replace(")))", " z \n", $d); /* result: M 0 0 L 0 3 L 3 3 L 3 0 L 0 0 z \n M 1 1 L 1 2 L 2 2 L 2 1 L 1 1 z \n M 6 7 L 8 9 L 4 5 L 6 7 z \n */ There is a simple manner for turn the image since SVG, how change the coordinate system or something like? I know there is simple making a PHP function that do that, but my SVG's are little big and could consume too many resources and processing time. First of all, I need to preserve the performance and the easy-to-use issue. Someone have any idea? Thanks, Ed - Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. [Non-text portions of this message have been removed] - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" Yahoo! Groups Links [Non-text portions of this message have been removed] - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[svg-developers] SVG speculum
Hi. Sorry for my bad english. I have a problem with the shp2pgsql.exe tool (download since Carto.net) and my PHP-MySQL application. I dont know why my SVG is resulting how if it was reflected by a horizontal mirror. The PHP code (after de SQL spatial query) is like this: //geometry in Well-Know-Text format $wkt="MULTIPOLYGON(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1,1)),((6 7,8 9,4 5,6 7)))"; $d= str_replace("MULTIPOLYGON(((", "M ", $wkt); $d = str_replace(")),((", " z \n M ", $d); $d = str_replace("),(", " z \n M ", $d); $d = str_replace(",", " L ", $d); $d = str_replace(")))", " z \n", $d); /* result: M 0 0 L 0 3 L 3 3 L 3 0 L 0 0 z \n M 1 1 L 1 2 L 2 2 L 2 1 L 1 1 z \n M 6 7 L 8 9 L 4 5 L 6 7 z \n */ There is a simple manner for turn the image since SVG, how change the coordinate system or something like? I know there is simple making a PHP function that do that, but my SVGs are little big and could consume too many resources and processing time. First of all, I need to preserve the performance and the easy-to-use issue. Someone have any idea? Thanks, Ed - Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. [Non-text portions of this message have been removed] - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/