Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KML/KMZ to Google Earth

9 REPLIES 9
Reply
Message 1 of 10
henrytaray30
575 Views, 9 Replies

KML/KMZ to Google Earth

Hello Guys!

 

 

I am currently a civil engineering intern and I am tasked to convert dwg files to kml for viewing in Google Earth Browser/Pro by using Civil 3D. I have set the GEOGRAPHICLOCATION with WORLD-MERCATOR (WGS84) GIS Coordinate System and set the drawing units to Meters before KML Export. However, when importing the KMZ/KML files to Google Earth, it shows the correct location (coordinates) but the objects, labels, and polygons do not reflect to the map. I tried changing the coordinate systems but it is still not working.

 

What should I do? I hope someone can help. Thank you!

Labels (2)
9 REPLIES 9
Message 2 of 10
Pointdump
in reply to: henrytaray30

Hi Rye,
"I have set the GEOGRAPHICLOCATION with WORLD-MERCATOR (WGS84) GIS Coordinate System..."
Don't use GEOGRAPHICLOCATION. That command is meant for vanilla autocad, and it has unpredictable results in Civil 3D. Use instead MAPCSASSIGN, MAPCSLIBRARY, or Drawing Settings.
Screen shots might shed some light on the problem.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 3 of 10

@henrytaray30 

<<…it shows the correct location…..but the objects, labels, and polygons do not reflect to the map…>>

Hmmm, that’s confusing. If it shows the correct location why doesn’t it reflect the to the map? What does ‘reflect to the map’ mean? Would it be possible to re-describe your issue?

Can you also upload an image of the Google Earth that shows where your linework lands?

 

Your willingness to share will go a long way in diagnosing your problem. Congrats landing your internship!

Chicagolooper

EESignature

Message 4 of 10
henrytaray30
in reply to: Pointdump

henrytaray30_0-1720102450289.png

henrytaray30_1-1720102486687.pnghenrytaray30_2-1720102634894.png

henrytaray30_3-1720102929789.png

henrytaray30_4-1720103148554.png

 

 

@Pointdump I tried doing MAPCSASSIGN but it no longer zooms into the desired coordinates and the objects are still not present. When exporting to kmz, I selected "All objects" and followed the geo-reference, I also ignored the nudge settings.

Message 5 of 10

Thank you @ChicagoLooper 

What I mean in the objects not reflecting on the map is the kmz file models. When I import the kml/kmz to Google Earth, it zooms to the desired location but the models or lineworks (labels, polygons, lines, objects) do not show or reflect. 

I have uploaded some photos on @Pointdump 's thread. 

Message 6 of 10

Hi @henrytaray30 

You, or the original author, didn't give the drawing a proper coordinate system. Here's a one-minute crash course to diagnose whether you, or the original author, drew the line work at the correct geospatial location.

 

  1. Open the original drawing then select and COPY all objects to Clipboard making sure to use 0,0 as the BASEPOINT.
  2. Open a brand new, clean drawing. (Use your standard office template OR use a plain out-of-the-box version.)
  3. Using MAPCSASSIGN command, assign EPSG 3857. (Image-1)
  4. Right-click anywhere in modelspace and PASTE the contents of you clipboard. Use 0,0 as the insertion point.
  5. Go to Geolocation Tab=>Online Map Panel=>change Map Off to Bing Hybrid. (Image-2) (Bing logo will appear in lower right corner of modelspace when connected to the Bing Map server.) 
  6. Zoom extents to see your linework.

Image-1Image-1

 

 

Image-2Image-2

 

If your linework is consistent with Bing Hybrid imagery, then your drawing is properly georeferenced. If not, there are two possibilities, one of them, we don't know which one, is the correct diagnosis.

  • The drawing is NOT using WGS84 EPSG 3857 as the assigned coordinate system, it's using something else. This means someone turned off (deactivated) the assigned coordinate system and you need to figure out the exact one he used AND reactivate it using MAPCSASSIGN command. This will enable you to perform the export procedure correctly. 
  • The drawing was never georeferenced to begin with, meaning it was haphazardly drawn in any ol' spot in modelspace. Unfortunately, you now need to assign an appropriate coordinate system to modelspace AND physically (a) move, (b) scale, and (c) rotate all objects to their correct geospatial location. You may have to do a combination of a, b, c, or do all three. The coordinate system you will assign to the drawing cannot be determined unless you are more forthcoming and provide more info.

Uploading the actual drawing will facilitate a fast and accurate solution.

 

If you can't upload the drawing itself, you may draw a square/rectangle surrounding your site. Make the four sides tight around the linework. Next, delete ALL objects inside the square/rectangle. Do not delete the rectangle! Perform a SAVE AS on this drawing giving it a new name so it's distinguishable from the original. Upload this new drawing to the Forum and be sure to disclose the city, state of the site.

 

Chicagolooper

EESignature

Message 7 of 10
Pointdump
in reply to: henrytaray30

Rye,
In addition to excellent advice from @ChicagoLooper, attached please find a shapefile, drawing, and KMZ of Vicente Hizon Sr, just to show that exporting to KMZ does work.
Please post your drawing. (If it's allowed. Ask first)
Dave

 

ExportKML_1.png

 

ExportKML_2.png

 

ExportKML_3.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 8 of 10

Hi @henrytaray30 

Panabo, correct?

 

Can you describe the object you want to export.

Are they Civil objects? Alignments, cogo points?

Are they points? Blocks?

Are the Lines? Polylines?

Are they closed polylines?

 

Are the labels mtext? Mleaders? Or do you have Object Data?

 

The export to KMZ function in civil3D Toolspace is weak. Since you're running C3D, you also have the Map3D toolset as seen in the Planning and Analysis workspace. Map3D's export function is much more powerful but how you use it depends on the questions above. And how your label data is stored makes a big difference in how it's displayed in Google Earth. Huuuge difference!

 

If you don't need to export any civil objects then I'd suggest you export 3 times: the first for points/blocks, second for lines, and the third for closed polygons. When you import them into Google Earth, you'll have all the data you want. Yes, all 3 exports will be the same--each is exporting a different 'class' of objects.

 

From what you're describing, exporting all classes at the same time using Civil's feature named Export KML is weak and can't handle your type of export.

 

Chicagolooper

EESignature

Message 9 of 10

Using Map3D's MAPEXPORT command you can export to shapefile format. Although I can select only a portion of the DATA I need, MAPEXPORT can also grab ALL THE KML DATA whether I need it or not. The Export to KML on C3D's Toolbox Tab doesn't give options to select specific data.

 

Google Earth is capable of importing more than just KML/KMZ, it can also import SHP format. If I export DATA along with the linework, then the lines in Google Earth can display data. For example, clicking on a street while in Google Earth will reveal the street name.

301.png

If the AutoCAD linework is storing data, then an exported shapefile can export the data too. Then when the importing program 'reads' the shapefile it will also retrieve the data. The KEY to this exercise is DATA, how it's stored and how it's retrieved.

Chicagolooper

EESignature

Message 10 of 10
lim.wendy
in reply to: ChicagoLooper

Hi Dave and Robert,

 

It's heartwarming to see the incredible support and expertise demonstrated in this thread. Your dedication to helping others and sharing your knowledge makes our community so special. Thank you for taking the time to provide such comprehensive support and encouragement.

 

@henrytaray30,

Thank you for reaching out with your question. Your willingness to seek help and provide detailed information made it easier for our experts to assist you. Congratulations on your internship!

 

Please let us know if you require further assistance.

If the suggestions helped you, please hit the "Accept Solution" button, as it helps make the solution easier to find for others who might have the same issue. Knowing which topics are solved or not can also help our many users find the questions that still need to be answered. It’s also a great way to say thank you and recognize whoever helped you. 


 

 



Wendy Lim

Data Nerd | Community Advocate | AEC Industry


facebook twitter twitter blogs pm


Join the new online Rail Community


Rails Summit




Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report