0

I need to apply "raster paint" over a OSM map. I am using FME to convert the OSM map to SVG, and then using the xara draw program to add the paint (roadways, stop lines, etc.) for a raster display.

The issue I have is that FME is stretching the SVG image. I don't see that in the FME 2015.1 data explorer. But I do see that in when I look at the SVG in Chrome. Any FME experts here?

(I already tried the SVG tag for preserve aspect ratio: preserveAspectRatio="xMinYMin slice"

True Image:

True image

Stretched Image:

enter image description here

Here is what some of the data looks like:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat.dtd"
>
<svg xmlns="http://www.w3.org/2000/svg"  viewBox="-3.59534e-005 -3.59534e-005 0.00294818 0.00381678"><g xmlns:fme="http://www.safe.com/fme" fill="none" stroke="black" stroke-width="0.000000359533915" preserveAspectRatio="xMinYMin slice" transform="translate(0,0.00374488) scale(1, -1)">
<g id="boundary" >
<path fme:id="-2096" fme:visible="true" fme:lane_boundary_type="solid_yellow" fme:type="lane_boundary" d="M 0.00267276,0.00303538 l -0.00014045,-0.000209472 -0.000138128,-0.000195737 -0.000145093,-0.000203464 -0.000106788,-0.000186295 "/>
<path fme:id="-2094" fme:visible="true" fme:lane_boundary_type="solid_yellow" fme:type="lane_boundary" d="M 0.00186222,0.00192878 l 9.55227e-005,-8.6277e-007 "/>
<path fme:id="-2092" fme:visible="true" fme:lane_boundary_type="solid_yellow" fme:type="lane_boundary" d="M 0.00181594,0.00192882 l -0.000128648,1.66573e-006 "/>
<path fme:id="-2090" fme:visible="true" fme:lane_boundary_type="solid_yellow" fme:type="lane_boundary" d="M 0.00202719,0.0030487 l 4.84211e-006,-0.000327528 6.96445e-006,-0.000366579 2.32148e-006,-0.000218918 2.32148e-006,-0.000115898 "/>

Here is a screen shot of the workspace. I am currently not doing any re-projection.


UPDATE

@Fezter and @Mapperz are correct. the problem was that I needed to re-project to spherical Mercator. I feel stupid. Can one of write up your solution as an answer so I can give you guys credits?

  • Are you doing any reprojection of the OSM data in the FME workspace? Screenshot of your workspace might help – Mapperz Oct 14 '15 at 18:49
  • added screen shot of workspace and log of Data Inspector – Dr.YSG Oct 14 '15 at 20:08
  • 1
    In line three of the log, it states that the dataset will be reprojected to Spherical Mercator. Perhaps you need to put a reprojector transformer in your workspace to what you think it should be. – Fezter Oct 14 '15 at 22:55
  • I saw that also. I will test at the office tomorrow. But I am surprised that a 30 acre area makes a difference in projection. – Dr.YSG Oct 14 '15 at 23:34
  • If the units are degrees, then the SVG might be assigning these values to the pixels. Depending on where on the earth this is, it's likely you'll get skewed results. Try outputting to an inspector first and see if the results are still skewed. – Fezter Oct 15 '15 at 0:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.