Hi,
I'm quite new to Inkscape but I the coordinate system handling is not
getting clear to me, and I believe there must be a bug.
Basically I'm getting started by transformation of a shapefile to svg
the important part is (one point to keep it simple):
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="villages1">
<circle
r="0.01009"
cy="-20.87945"
cx="101.33645"
id="villages1_B_Chaloen_Suk"
sodipodi:cx="101.33645"
sodipodi:cy="-20.87945"
sodipodi:rx="0.01009"
sodipodi:ry="0.01009" />
</g>
</g>
The -20.87945 is from conversion, the real coordinate is 20.87945 Degree
north and 101.33645 degree east.
My full file is (more or less directly after import):
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!-- Created with Inkscape (
http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd&q...
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.44"
version="1.0"
sodipodi:docbase="C:\Documents and Settings\s0167070\Desktop"
sodipodi:docname="test.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="14.481547"
inkscape:cx="10.67134"
inkscape:cy="16.69171"
inkscape:document-units="px"
inkscape:current-layer="layer1"
width="100"
height="100"
units="px"
inkscape:window-width="1280"
inkscape:window-height="751"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="villages1">
<circle
r="0.01009"
cy="-20.87945"
cx="101.33645"
id="villages1_B_Chaloen_Suk"
sodipodi:cx="101.33645"
sodipodi:cy="-20.87945"
sodipodi:rx="0.01009"
sodipodi:ry="0.01009" />
</g>
</g>
</svg>
But the point is displayed at approx 101,120 so 100 px too high.
Changing cy from -20.87945 to +20.... shifts the point to 101,79.1..
(reading from Inkscape properties). I assume the coordinate system
starts above paper size?!
Next thing is that I want to shift the canvas origin from 0,0 to 0,100.
Therefore I've added manually x="0 y="100" to the file:
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!-- Created with Inkscape (
http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd&q...
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
x="0"
y="100"
width="100"
height="100"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.44"
version="1.0"
sodipodi:docbase="C:\Documents and Settings\s0167070\Desktop"
sodipodi:docname="test.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="14.481547"
inkscape:cx="10.67134"
inkscape:cy="16.69171"
inkscape:document-units="px"
inkscape:current-layer="layer1"
x="0"
y="100"
width="100"
height="100"
units="px"
inkscape:window-width="1280"
inkscape:window-height="751"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="villages1">
<circle
r="0.01009"
cy="-20.87945"
cx="101.33645"
id="villages1_B_Chaloen_Suk"
sodipodi:cx="101.33645"
sodipodi:cy="-20.87945"
sodipodi:rx="0.01009"
sodipodi:ry="0.01009" />
</g>
</g>
</svg>
But this doesnt change anything at all!!! The point is still displayed
at 101,120. And I assume the x,y statement is valid.
It gets even more strange if you put an additional <svg width="100"
height="100"> ... </svg> statement around the last example:
<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
<!-- Created with Inkscape (
http://www.inkscape.org/) -->
<svg
width="100"
height="100">
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd&q...
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
x="0"
y="100"
width="100"
height="100"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.44"
version="1.0"
sodipodi:docbase="C:\Documents and Settings\s0167070\Desktop"
sodipodi:docname="test.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="14.481547"
inkscape:cx="10.67134"
inkscape:cy="16.69171"
inkscape:document-units="px"
inkscape:current-layer="layer1"
x="0"
y="100"
width="100"
height="100"
units="px"
inkscape:window-width="1280"
inkscape:window-height="751"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="villages1">
<circle
r="0.01009"
cy="-20.87945"
cx="101.33645"
id="villages1_B_Chaloen_Suk"
sodipodi:cx="101.33645"
sodipodi:cy="-20.87945"
sodipodi:rx="0.01009"
sodipodi:ry="0.01009" />
</g>
</g>
</svg>
</svg>
Now the point is displayed at 101,-79.1 ! I dont understand why this
should be correct! Especially as only the y coordinate is influenced. I
really hope that somebody can explain me how I can move my image canvas
so that it fits over my local coordinate system.
Thanks
Wolfgang