Skip to main content
deleted 5 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I have few SVG files (maps) that I want to convert to GEOJson. On those SVG files, two markers (crosses) had been drown in order to georeference the layer. So I know the coordinates of those control points, I am able to calculate the parameters : Computing parameters for QGIS Affine Transformation.

My plan is :

  • Read the SVG file and extract the paths.
  • Store the coordinates of the shapes in an array
  • Apply the affine transformation
  • Write a GEOJson file

I have already extracted the paths with python (svgpathtool), but I have no clue on how to exploit that. 

Is there a better way to do that ? 

How to translate the path ? Thanks !

I have few SVG files (maps) that I want to convert to GEOJson. On those SVG files, two markers (crosses) had been drown in order to georeference the layer. So I know the coordinates of those control points, I am able to calculate the parameters : Computing parameters for QGIS Affine Transformation.

My plan is :

  • Read the SVG file and extract the paths.
  • Store the coordinates of the shapes in an array
  • Apply the affine transformation
  • Write a GEOJson file

I have already extracted the paths with python (svgpathtool), but I have no clue on how to exploit that. Is there a better way to do that ? How to translate the path ? Thanks !

I have few SVG files (maps) that I want to convert to GEOJson. On those SVG files, two markers (crosses) had been drown in order to georeference the layer. So I know the coordinates of those control points, I am able to calculate the parameters : Computing parameters for QGIS Affine Transformation.

My plan is :

  • Read the SVG file and extract the paths.
  • Store the coordinates of the shapes in an array
  • Apply the affine transformation
  • Write a GEOJson file

I have already extracted the paths with python (svgpathtool), but I have no clue on how to exploit that. 

Is there a better way to do that ? 

How to translate the path ?

Source Link

SVG to GEOjson with control points

I have few SVG files (maps) that I want to convert to GEOJson. On those SVG files, two markers (crosses) had been drown in order to georeference the layer. So I know the coordinates of those control points, I am able to calculate the parameters : Computing parameters for QGIS Affine Transformation.

My plan is :

  • Read the SVG file and extract the paths.
  • Store the coordinates of the shapes in an array
  • Apply the affine transformation
  • Write a GEOJson file

I have already extracted the paths with python (svgpathtool), but I have no clue on how to exploit that. Is there a better way to do that ? How to translate the path ? Thanks !