0

This question already has an answer here:

I have this pdf file that contains a specific borough of my city, Montreal, with a polygon inside it. Link to pdf file: PDF FILE

The jpeg image once exported from the pdf file is the following

enter image description here

I am trying to extract the red polygon and georeference it.

I have tried using QGIS to open the image file and then manually add coordinate points to specific portion, but it seems tedious and long as I have around 90 different pdf file that I aim to georeference.

Is there an easier way such as taking an actual map of montreal and overlay this map on top of the previous one, and then automatically georeference it?

I don't know if it can help you but the actual pdf file is a vector, when I opened it using illustrator I was able to check or uncheck the red portion.

The ultimate goal is to transform this red polygon into a geojson file. I don't mind doing it manually if theres an efficient way but I would be even happier If there's was some way to automate this through a script.

I have been looking over the past week on the internet for georeference tutorials but most of them are for raster images and do not take in account pdf file (vectorized), I mean in theory, in my opinion it seems possible to compare 2 vector file, mine and lets say the whole vector file of montreal and then georeference it automatically.

marked as duplicate by Chris W, Mapperz Jun 1 '15 at 20:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You have a few combined questions here. First, what I say is a possible duplicate, is directly taking the vector data from the pdf into QGIS. Second would be converting the pdf to an image and bringing that in. In both cases, if the pdf isn't geospatial then you have to georeference (raster) or spatial adjust (vector) it once you get it into QGIS. There's no way to do this automatically, as each will be different (unless the map doesn't change, just the polys, then there is one trick to save some time). The fastest solution would be to try sourcing the original data that went into the pdfs. – Chris W Jun 1 '15 at 20:51
  • Thank you for giving me so much information. I was able to open the dxf. I think the pdf is not geospatial and I can't have access to the source data, however, I am one step closer and I know what term to google that is spatial adjust. – delmalki Jun 1 '15 at 21:02
  • Spatial Adjustment is a concept I guess, but it's also what ArcGIS specifically calls the tool for this. Here on GIS.SE, if you search for 'qgis georeference vector' you will find some relevant questions, like gis.stackexchange.com/questions/33208 It is unfortunate that sometimes governments only make data publically available as pdfs or images instead of a GIS layer. However sometimes they will release some GIS data if you get hold of the right person and request it, depending on your use of the data. – Chris W Jun 1 '15 at 21:44
0

If these are geopdfs then you should use gdal and convert to vector and you would be done. If they are just PDF then they may or may not contain vector data still. Trying opening it up in Inkscape and save as a dxf. Bring the dxf into Arc and see if you get you polygon. Doesn't look like you have any coordinates on these maps unfortunately, but once you figure out the projection you should be able to snap road intersection from your dxf you created to the same intersection from projected data. Just use the georeferencing toolbar And 2 points should do. I built a tool based on ghostscript for this a couple of weeks back.... Unfortunately the company I work for owns that now, but Inkscape work easily.... Better then digitizing anyways.

  • Thanks for your prompt answer, I added the pdf file if it might help. Unfortunately,I am not quite good with this whole world of GIS coding therefore I dont even know how to use Arc or GDAL or Inkscape. I converted the pdf to dxf using Illustrator which I think is the same than Inkscape, tried to add a vector layer in QGIS, and nothing appeared. Ill try reading furthermore on DXF, ARC and GDAL, but thank you for giving me a direction to follow ! – delmalki Jun 1 '15 at 20:43
  • This is not a GeoPDF so you are out of luck there. The linework for your polygon came through when I converted to dxf in Inkscape. It won't be spatially referenced. For me the lower left corner comes in @ 0,0. Haven't used QGIS in a while, but you likely need to zoom to the layer as it won't be in your map extent. – Mike Jun 2 '15 at 16:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.