3

I'm new to autocad and have been sent a file with polylines which I need to plot on a map. However I cannot see that the file contains any geolocation data to plot it accurately. The GeoLocation tab does not appear and reading the AutoCad knowledge base, I suspect that the file does not contain any location data. Can someone download the file and confirm this or if I'm missing something?

  • If you are looking for a way that the file defines which coordinate system it's in, you'll probably find nothing. There's a place to insert that at Drawing utilities --> Drawing Settings, but from my experience this is very rarely used. However, your file does contain coordinates that looks like they're in a real world coordinate system. If you are able to guess/find out which one, you should be good enough. It's also possible to generate .prj-files for dwg/dxf files, which'll help future GIS users. – Martin Feb 4 '16 at 10:00
1

You can load this into QGIS okay - it has 3 point features and 12 line features. The coordinate system is undefined, so exactly where on the planet the features live can't be determined. The bounding box of the coordinates is xMin,yMin 325880.38,6409376.11 : xMax,yMax 651934.19,12818724.96 - which isn't lat-long.

The ogrinfo command will tell you most of this:

$ ogrinfo -so -al testpoly.dxf 
INFO: Open of `testpoly.dxf'
      using driver `DXF' successful.

Layer name: entities
Geometry: Unknown (any)
Feature Count: 15
Extent: (325880.382876, 6409376.107868) - (651934.193204, 12818724.956451)
Layer SRS WKT:
(unknown)
Layer: String (0.0)
SubClasses: String (0.0)
ExtendedEntity: String (0.0)
Linetype: String (0.0)
EntityHandle: String (0.0)
Text: String (0.0)

Without the -so (summary) flag you'll even get the coordinates and attributes of each feature:

$ ogrinfo -al testpoly.dxf 
INFO: Open of `testpoly.dxf'
      using driver `DXF' successful.

Layer name: entities
Geometry: Unknown (any)
Feature Count: 15
Extent: (325880.382876, 6409376.107868) - (651934.193204, 12818724.956451)
Layer SRS WKT:
(unknown)
Layer: String (0.0)
SubClasses: String (0.0)
ExtendedEntity: String (0.0)
Linetype: String (0.0)
EntityHandle: String (0.0)
Text: String (0.0)
OGRFeature(entities):0
  Layer (String) = Gunnilse dagvatten_arc
  SubClasses (String) = AcDbEntity:AcDbBlockReference
  ExtendedEntity (String) = (null)
  Linetype (String) = (null)
  EntityHandle (String) = 29
  Text (String) = (null)
  Style = PEN(c:#7fff7f)
  LINESTRING (651870.29291189997457 12818660.791532900184393 2,651869.138874100055546 12818665.608888300135732 2,651868.297324900049716 12818669.17193860001862 2,651867.79771399998572 12818671.234730100259185 2,651867.36775169998873 12818675.153996299952269 2,651867.851822299999185 12818677.184894200414419 2,651868.40745499997865 12818680.869133699685335 2,651868.819348299992271 12818683.458861399441957 2,651869.270946800010279 12818686.965924400836229 2,651870.653307599946856 12818705.297845300287008 2,651870.880679300054908 12818708.077216699719429 2,651870.458569 12818712.177779801189899 2,651870.37601609993726 12818714.970561100170016 2,651870.643554799957201 12818718.677922200411558 2,651870.940263499971479 12818721.080252200365067 2,651871.33599349996075 12818723.296622600406408 2,651871.504200200084597 12818724.95645060017705 2)
[ etc etc ]
  • OK. Thanks for the your comments. This confirms the coordinate system is undefined which answers my question. – Ot_Gu Feb 4 '16 at 10:39
  • Its not so much undefined as unspecified. If someone tells you the coordinates are EPSG:3857 or UTM Zone 8N or whatever then its easy enough to convert them. – Spacedman Feb 4 '16 at 11:54

Your Answer

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

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