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: 

Civil 3D causes horizontal shift in DEM (geotif) surfaces

22 REPLIES 22
Reply
Message 1 of 23
Anonymous
5595 Views, 22 Replies

Civil 3D causes horizontal shift in DEM (geotif) surfaces

I have found that Civil 3D causes a horizontal shift when importing and exporting DEMs (tif/geotif format). The shift corresponds to 1/2 the cell size in both the x and y direction. So, the larger the grid, the larger the shift. 

 

My suspicion is that Civil 3D reads the geotif's lower left corner coordinate as the mid point of the first raster cell, where it should be the lower left corner of the entire data set. The mid point of first cell should be shifted 1/2 cell size north and east.

 

It is easy to check if you have both ArcGIS and Civil 3D. Steps:

  1. starting with a raster DEM in ArcGIS, export two tif format rasters, each at different cell sizes (e.g., 10 ft and 50 ft)
  2. import these tifs into cad as two separate surface.
  3. Compare the contours. As expected the 50 ft raster being coarser than the 10 ft, but they will be 20 ft (50/2 - 10/2 = 20) offset in the east and north directions.

Please 

 

Regards,

Scott

22 REPLIES 22
Message 2 of 23
Anonymous
in reply to: Anonymous

Hi again,

Here are a couple screen shots describing the offset error graphically. First, below is the header of the tfw file (with annotations from Wikipedia). As you can see, it provides the x,y coordinates for the "center" of the upper left pixel.

 

capture1.jpg

 

 

Below is a screen shot of the geotif imported into Civil 3D as a surface. You can see it inserts the geotif in the wrong location. I verified this by also importing into ArcGIS.

 

 

 

Capture.JPG

 

To fix the Civil3D surface, move the surface one half the cell size in the +X and +Y directions.

 

 

Regards,

Scott

Message 3 of 23
Neilw_05
in reply to: Anonymous

Great work figuring out the shift. I hope you submit this to support. If you do, please post your responses so we can all learn from it. 

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
Message 4 of 23
Hidden_Brain
in reply to: Anonymous

Mega kudos to you for figuring this out and posting the solution!
Message 5 of 23
jmartt
in reply to: Anonymous
Message 6 of 23
pghcivil3d2
in reply to: Anonymous

Great explanation and analysis on this issue! I believe this was resolved in Civil 3D 2022 to work as expected.

Rob Sinclair

EESignature

Message 7 of 23
Pointdump
in reply to: pghcivil3d2

Hi Rob,
"...this was resolved in Civil 3D 2022 to work as expected."
Then they re-broke it in 2023. Surfaces are again using lower left of pixel.
Dave

 

TiffPixels_1.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 23
ChicagoLooper
in reply to: Pointdump

@Pointdump 
Just curious, what happens when you attach that same DEM using an FDO connection? (Attach it to the same drawing shown in your image so the same DEM is loaded in two different ways.)

Chicagolooper
Message 9 of 23
Pointdump
in reply to: ChicagoLooper

Hi @ChicagoLooper,
Same. I'd show with a screen shot, but C3D is still chewing on things after 10 minutes. (2.25 million pixels)
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 10 of 23
Pointdump
in reply to: ChicagoLooper

@ChicagoLooper,
Here's a screen shot bringing in the Tiff with an FDO Connection.
Dave

 

TiffPixels_2.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 11 of 23
Joe-Bouza
in reply to: Anonymous

Curious. ae your units survey feet

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 23
Pointdump
in reply to: Joe-Bouza

Hi Joe,
Are you replying to the OP? This is an 8-year-old thread.
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 13 of 23
jmartt
in reply to: Pointdump

Also in regard to this post: 

https://forums.autodesk.com/t5/civil-3d-forum/importing-dems-as-surfaces-into-us-survey-ft-state-pla...

 

Using C3D 2014, I see that the US/Int feet problem went away. 

I'm not set up to test easily -  Can anyone tell me if the cell shift problem is still there?

Message 14 of 23
Pointdump
in reply to: jmartt

Hi Jeff,
You're using C3D 2014?
Looks like it's still a problem in C3D 2024 with the Tiff I just tested. Nothing is lining up.
Grey Squares = inserted Tiff
Blue X's = extracted surface points
Green Dots = center of pixel

Dave

 

SurfPts_1.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 15 of 23
Pointdump
in reply to: jmartt

Jeff,
OK, here's a better display. I went back to the original DEM data, instead of a cropped version. I used MAPCONNECT to bring in the DEM as a raster, which seems to work much better than Raster Tools IINSERT.
This screen shot shows a center-of-pixel blue dot and red circle surface points using lower-left-of-pixel.
Dave

 

SurfPts_2.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 16 of 23
ChicagoLooper
in reply to: Pointdump

@Pointdump 

<<...I used MAPCONNECT to bring in the DEM as a raster, which seems to work much better than Raster Tools IINSERT...>>

 

I agree! Thank you for advocating MAPCONNECT , aka the Data Connect Palette.

 

Over many years, I've noticed using a Data Connection on geospatial objects, e.g. uncropped rasters, is better when compared to using MAPIINSERT.

 

All that mumbo jumbo stuff regrading program error this and program error that is mind boggling. Use the appropriate tool for Geospatial  Rasters. Sure you can use MAPIINSERT to insert an image somewhere close to where you want it, but just because you can doesn't mean you should.

 

Chicagolooper
Message 17 of 23
jmartt
in reply to: Pointdump

Oh geez. I meant 2024, not 2014. Sorry.

But 2014 was ten years ago? Crazy. 

 

Okay. I gather that the cell shift is still a thing. Thank you. 

 

 

Message 18 of 23
jmartt
in reply to: ChicagoLooper

I get DEMs in by creating a surface and then right-clicking on DEM Files. Is the data connection method better than that method somehow?

Message 19 of 23
Pointdump
in reply to: jmartt

Jeff,
"I get DEMs in by creating a surface and then right-clicking on DEM Files. Is the data connection method better than that method somehow?"
I just used MAPCONNECT to bring in the DEM also as an image to better show the relation of surface points to pixel squares. Adding the DEM file to your surface definition is still the way to go.
The upshot is that nothing has changed. C3D is still using the lower-left of each DEM pixel to create a surface.
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 20 of 23
ChicagoLooper
in reply to: jmartt

@jmartt 

<<I get DEMs in by creating a surface and then right-clicking on DEM Files. Is the data connection method better than that method somehow?>>

 

BE forewarned, a DEM is not a substitute for a survey. Expecting survey grade results from a DEM is unreasonable.  

 

Chicagolooper

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report