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:
Please
Regards,
Scott
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.
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.
To fix the Civil3D surface, move the surface one half the cell size in the +X and +Y directions.
Regards,
Scott
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.
Thanks so much for the help here.
See also:
Great explanation and analysis on this issue! I believe this was resolved in Civil 3D 2022 to work as expected.
Rob Sinclair
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
Dave Stoll
Las Vegas, Nevada
@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
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
@ChicagoLooper,
Here's a screen shot bringing in the Tiff with an FDO Connection.
Dave
Dave Stoll
Las Vegas, Nevada
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.
Hi Joe,
Are you replying to the OP? This is an 8-year-old thread.
Dave
Dave Stoll
Las Vegas, Nevada
Also in regard to this post:
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?
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
Dave Stoll
Las Vegas, Nevada
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
Dave Stoll
Las Vegas, Nevada
<<...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
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.
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?
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
<<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.