C3D 2019 Image Insertion/Projection Issue

C3D 2019 Image Insertion/Projection Issue

sfore
Collaborator Collaborator
5,537 Views
22 Replies
Message 1 of 23

C3D 2019 Image Insertion/Projection Issue

sfore
Collaborator
Collaborator

Has anyone noticed a projection issue when inserting images in C3D 2019 when a coordinate system is set under drawing settings?

 

I have a .tif aerial photo that has an associated .prj and .tfw file. I set coordinate system to WV SPNAD 83 South Zone, US Survey foot under drawing settings, then inserted image (mapiinsert). It comes in way off from my surface which is in WV SPNAD 83 South Zone, US Survey Foot.

 

At first I thought maybe image was in HARN projection, despite what .prj file says, so I set Coordinate system to HARN WV South Zone, US Survey Foot. The image appeared to land correctly over top of surface. I thought I had it figured out but the image is not in HARN projection according to script in .prj file and according to our Surveyors. I also compared upper left image vertice between HARN and SPNAD 83 inserted images, the coords are slightly different.

 

So I did the following tests:

 

1.  I set coordinate system to No Datum, No Projection then inserted image and it landed perfect over top of surface.

 

2.  In same drawing, I set coordinate system to WV SPNAD 83 South Zone, US Survey Foot then inserted image and it landed way off, so I scaled image from 0,0,0 at 1200/3937 and image landed perfectly over surface.

 

3.  In same drawing, I left coordinate system at WV SPNAD 83 South Zone, US Survey Foot and inserted different images such as a USGS and a different aerial image, both of which has associated .tfw files. They landed perfectly over surface.

 

So, I can only conclude this is a bug in Civil 3D or the .prj file associated with initial image is causing issue.

Thoughts??

0 Likes
Accepted solutions (2)
5,538 Views
22 Replies
Replies (22)
Message 2 of 23

tcorey
Mentor
Mentor

The difference between international feet and us survey feet?



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
0 Likes
Message 3 of 23

sfore
Collaborator
Collaborator

No, International Feet is not set anywhere in any data or drawing setting. My drawing settings are set to:

 

drawing settings.PNG

 

Also, I just learned that under 'Units', US Survey Feet is now an option and has been since version 2017 or 2018. We skipped from 2016 to 2019. See pic.

 

units-us survey feet.PNG

 

I don't quite understand this and when to use this setting. My units inside my template is set to Feet, not US Survey Feet. As a test, I changed my 'Units' to US Survey Feet then inserted a USGS Quad. This setting caused my image correlation units to go to inches and of course the USGS image did not come in correctly and was scaled huge. See pic.

 

units-us survey feet causes image correlation units to be inches.PNG

0 Likes
Message 4 of 23

ChicagoLooper
Mentor
Mentor

On command line UNITS, change 'Insertion Scale' to Unitless. At this point, you have two options.

  1. Option 1. Invoke MAPIINSERT command, compare the following: x/y coordinates on the Source Tab vs. x/y coordinates on the Insertion Tab. Both pairs of coordinates must be identical. If they're the same, do not change units under 'Insertion point & Density' leave it alone. If not the same, then change units under 'Insertion point & Density', Source Tab, from inches to feet (or feet to inches) until they are identical. When identical click OK.
  2. Option 2. Home Tab=>Data Panel=>Connect Icon. You will get Data Connect palette. Choose Add Raster or Surface Connection then click FILE icon next to 'Source File or Folder' then browse to your image, select it, then OPEN. Next, click CONNECT, verify Coordinate System is correct coordinate system column of Data Connect palette. (If not correct, edit it.) Click ADD TO MAP. 

Note: the tfw, whether imbedded in the tif's header or a separate file, gives your image the geospatial accuracy, not the prj. The prj is import to ESRI shapefiles, such as shp, shx, dbf and prj.

 

Reasons why neither option above works.    

  1. Wrong CS in modelspace despite cad user saying the assigned CS is  right.
  2. Wrong projection given to the image despite the original author saying it's right.
  3. Your UCS is not in world coordinates.
  4. Insertion Units are not set to unitless after running UNITS command.
  5. Cad cannot fine the tfw file.
  6. The tfw file doesn't have the same 'name' as the image.
  7. A reason something other than 1 thru 6 that I forgot about.

Chicagolooper

EESignature

Message 5 of 23

Pointdump
Consultant
Consultant

Shawn,

"It comes in way off..."

Can you quantify that? Distance and Direction.

Please Zip up your drawing and Aerial Files and post them.

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 6 of 23

sfore
Collaborator
Collaborator

Please see my comments in RED


@ChicagoLooper wrote:

On command line UNITS, change 'Insertion Scale' to Unitless. At this point, you have two options.

  1. Option 1. Invoke MAPIINSERT command, compare the following: x/y coordinates on the Source Tab vs. x/y coordinates on the Insertion Tab. Both pairs of coordinates must be identical. If they're the same, do not change units under 'Insertion point & Density' leave it alone. If not the same, then change units under 'Insertion point & Density', Source Tab, from inches to feet (or feet to inches) until they are identical. When identical click OK. I did 2 tests in 2 separate drawings with same image . Test 1 - I changed units to unitless and drawing settings to No Datum, No Projection then brought in image. Source and Insertion Tab both had same coords (x: 1702590.0065  y: 278685.5891) and Units for Insertion Point and Density said inches. Test 2 - I changed units to unitless and set drawing settings coords to WV SPNAD83 South Zone US Foot then brought in same image. Source and Insertion Tab both had same coords (x: 5585914.0463  y: 914320.9702) and Units for Insertion Point and Density said inches. These coords were far different than Test 1. I drew a line from upper left image corner of test 1 to upper left image corner of test 2, then labeled bearing and distance. It read, N80 37' 49" E at 3935835.21'. The placement of the image in Test 1 seems right and when I dref'd in the surface it landed on top of the image correctly. 
  2. Option 2. Home Tab=>Data Panel=>Connect Icon. You will get Data Connect palette. Choose Add Raster or Surface Connection then click FILE icon next to 'Source File or Folder' then browse to your image, select it, then OPEN. Next, click CONNECT, verify Coordinate System is correct coordinate system column of Data Connect palette. (If not correct, edit it.) Click ADD TO MAP. I did 4 tests. The first 2 tests were similar with first test set unitless and second test set to feet, both had drawing settings coords set to No Datum, No Projection. I browsed and connected to image, add to map and both tests had Unknown Coordinate System in dialog, but fell in the same place (x: 1702590.0065  y: 280939.1891). Notice the y is different here than in Option 1 of the first tests. The last 2 tests were also done similar with third test set unitless and fourth test set to feet, both had drawing setting coords set to WV SPNAD83 South Zone US Foot. I browsed and connected to image, add to map and both tests had WV83 SF NAD83....in dialog box and fell in same place (x: 5585914.0463  y: 921714.6561). Notice y is also different here than in Option 1 of the second tests. The same bearing and distance difference showed.

Note: the tfw, whether imbedded in the tif's header or a separate file, gives your image the geospatial accuracy, not the prj. The prj is import to ESRI shapefiles, such as shp, shx, dbf and prj.

 

Reasons why neither option above works.    

  1. Wrong CS in modelspace despite cad user saying the assigned CS is  right. N/A-I assigned the coordinate system that surface is in which is WV SPNAD83 South Zone US Foot. Also, I exported USGS quads from Terrain Navigator in WV SPNAD83 South Zone US Foot and they come in just fine. I also brought in some old Sid Aerial photos that I know for a fact are in WV SPNAD83 South Zone US Foot and they also come in correctly on this project surface.
  2. Wrong projection given to the image despite the original author saying it's right. ?? possibility
  3. Your UCS is not in world coordinates. N/A
  4. Insertion Units are not set to unitless after running UNITS command. Confused on this because my .dwt has always been set to Feet and I've never had issues bringing in images.
  5. Cad cannot fine the tfw file. N/A-I'm assuming it is finding .tfw files, they are in same directory as image and .prj file
  6. The tfw file doesn't have the same 'name' as the image. N/A-All 3 files (.tif, .tfw, .prj) have same name
  7. A reason something other than 1 thru 6 that I forgot about.

I hope I didn't confuse matters with my replies. I just wanted to explain all the testing I've done and wanted to test it in separate drawings with various settings as I explained in my responses. Thanks for your time.

0 Likes
Message 7 of 23

sfore
Collaborator
Collaborator

The bearing and distance is N80 37' 49"E @ 3935835.21'

 

Also, please see my response to ChicagoLooper

 

 

The zip file is too large to attach. Not sure how I could get it to you unless I put it on our FTP site and then sent you a FTP link via email for you to get drawings and image files from. Suggestion?

0 Likes
Message 8 of 23

Pointdump
Consultant
Consultant

Shawn,
DropBox would be OK. Or a link to your FTP Site or the site where you got the image from originally. The free >>>GeoViewer<<< can crop your image, making the file size more manageable.

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 9 of 23

AllenJessup
Mentor
Mentor

@sfore wrote:

I scaled image from 0,0,0 at 1200/3937 and image landed perfectly over surface.

 


That would lead me to believe the image is in meters. Do the coordinates in the .TFW file match your coordinate system?

Allen Jessup
CAD Manager - Designer
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

0 Likes
Message 10 of 23

ChicagoLooper
Mentor
Mentor

Upload the image and tfw file in question. It sounds like the tfw is incorrect. Who or what geo-referenced this image?

Chicagolooper

EESignature

0 Likes
Message 11 of 23

ChicagoLooper
Mentor
Mentor

You don't need to make the modelspace coordinates match the raster's coordinates. Matching like that is a huge misconception.

Example: If you set modelspace to west Virginia State Plane, South zone, NAD83, US Survey FEET, you can use an FDO data connection to bring in a USGS Quadrangle such as Logan, then the quad will be georeferenced correctly despite the coordinate system that's assigned to modelspace, e.g. WV, south, State Plane, US Feet assigned to modelspace and Lat/Long NAD83 degrees assigned to the quad.. Not only is each CS a different projection, they are using different units. To verify harmony using this example, turn on Bing imagery.

Chicagolooper

EESignature

0 Likes
Message 12 of 23

ChicagoLooper
Mentor
Mentor

Your image shows <unknown> under the Coordinate System column in the Data Connect palette and you have not addressed this lack of geospatial reference. That is your issue.

Unknown Coordinates is not good. To  understand how to fix it, keeep reading.Unknown Coordinates is not good. To understand how to fix it, keeep reading.

You have chosen to ignore it and have pushed ahead with your workflow. The geospatial reference is a mainstay of the Data Connect palette because it allows you to position feature objects accurately against a 'known coordinate system.'

 

Imagine that modelspace is planet Earth and when you assign a particular CS to that modelspace you are making it representative of a 'defined portion of the planet.' Your assigned CS defines that portion using datum, projection, rotation and scaling. Assigning a CS is both easy and hard. All you have to do is pick the correct one from the CS Library. Simply pick the right one by clicking your mouse and you're done. Easy. The hard part is choosing the right one. Having no CS at all is a no-no.

 

The CS assigned to modelspace is totally independent to the CS assigned to your image. Your image must know where to go when referenced against your modelspace or planet Earth. If your image doesn't have the correct CS assigned to it, then it won't be positioned accurately in model. Also, leaving it as <unknown> will cause AutoCad to use default coordinates--which you already know can produce unfavorable results.

 

As long as AutoCAD understands both modelspace CS and the raster's CS, you are good to go. They don't have to be the same, they just have to be understood (or 'known' and 'appropriate' for your defined area of Earth).

 

To make your image geospatially accurate, try this:

 

1-Data Connect palette, click Edit Coordinate Systems button. Note: CS assigned to model is WV83-SF and <unknown> is displayed as CS for the image.1-Data Connect palette, click Edit Coordinate Systems button. Note: CS assigned to model is WV83-SF and <unknown> is displayed as CS for the image.2-Highlight DEFAULT then click EDIT.2-Highlight DEFAULT then click EDIT.3-In search box enter WV83 and  highlight WV83-SF (EPSG 26854), SELECT.3-In search box enter WV83 and highlight WV83-SF (EPSG 26854), SELECT.4-Back in Data Connect palette, WV83-SF has replaced <unknown>. Finally click ADD TO MAP.4-Back in Data Connect palette, WV83-SF has replaced <unknown>. Finally click ADD TO MAP.

Chicagolooper

EESignature

Message 13 of 23

Anonymous
Not applicable

MAPIINSERT doesn't work unless you have the Insertion units from UNITS set to unitless. I just tried - the dialog in MAPIINSERT said inches but it came in correctly. Try flipping between the Source and Insertion tabs - does the scale keep changing? This is an indication of the "bug" and you know something is hosed. If it comes in right the scale will stay at 1.0000.

 

MAPCONNECTing to the image works every time and is preferable - especially for turning the Map layer off for the image.

 

Our photos have a .tfw, .tif.aux.xml, and a .ovr file(s) that come with the tif. Jp2 and sids have similar files - nothing is embedded.

 

I'm actually in a training session - yesterday the instructor, when using MAPCONNECT, set the coordinate system for the image before adding to map. It isn't necessary with our photos, but maybe that would work for you.

0 Likes
Message 14 of 23

sfore
Collaborator
Collaborator

Yes, the coords in tfw file do match drawing/surface coords. The image lands correctly as long as I don't set any coords under drawing settings.

 

When I open up tfw in WordPad, the coords read:

0.3
0
0
-0.3
1702590.1565
280939.0391

 

I understand these are the pixel coords and wont be exaxtly the same insertion coords.

 

When I mapiinsert the image in without setting coords under drawing settings, they read:

x: 1702590.0065

y: 278685.5891

 

When I do set coords under drawing settings to WV SPNAD 83 South Zone, US Foot and bring image in, the coords read:

x: 5585914.0463

y: 914320.9702

 

5585914.0463 / 1702590.0065 = 3.2808333333

 

I tried plugging in .old at end of .prj file to disable that file temporarily in case that file was causing some sort of issue. The issue is still there.

0 Likes
Message 15 of 23

sfore
Collaborator
Collaborator

The zip file of the image and associated files are too large to zip and post here. Our ftp site is down. Will send a link asap.

0 Likes
Message 16 of 23

sfore
Collaborator
Collaborator

I used data connect in the past for aerial images and usgs maps along with shp files but have had performance issues with high res images as far as jumping/zoom screen in paper space, tracers in model space etc... Also, I've had a lot of inconsistencies with the map engine with projections. At times I have to restart Civil 3D/Map 3D to get shp files to bounce back down to correct location. 

 

I just tried a few things again and had inconsistencies with the map in question. I brought it in (via data connect) several times in several different drawings and map coordinate system had different results even when I never set any coordinate system under drawing settings. See pics

 

coords 2.PNG

 

coords 3.PNG

 

When I do set coords in drawing settings and data connected to image and insert it, the coords and scale of image is wrong, but when I edit coordinate system and override to WV83-SF, the image re-projects itself correctly and is scaled correctly.

 

coords 5.PNG

 

So is the image actually in UTM despite what the tfw and prj says? I will try and post a ftp link of the files.  

 

 

 

 

0 Likes
Message 17 of 23

sfore
Collaborator
Collaborator

I believe image and surface data came from a drone, but can't be 100% sure. I was told that the surface data was lidar tied to ground control.

 

To access drawing and images, see link HERE

 

The image files, survey drawing and my drawing is in it. My drawing (Image and Surface DREF.dwg) contains a data referenced surface plus the image tile we've been discussing.

 

Thanks for everyone's feedback!

0 Likes
Message 18 of 23

ChicagoLooper
Mentor
Mentor

Your 'scale factor' is incorrect.

 

  • To convert from meters to feet, you multiply your METERS by 3.2808
  • To convert from feet to meters, you multiply your FEET by 0.3048

So if the x,y coordinates are indeed correct, using WV-State Pln-South-US Feet, then 1702590.1565, 280939.0391 must be multiplied using the 0.3048 factor and not 3.2808.

 

Hence, the appropriate conversion to METERS would be 518949.4797, 85630.219118 or x, y respectively.

Your math in post #14 clearly shows the wrong factor was used in the explanation of your conversion.

 

Who or what created the tfw? It appears the original coordinates 1702590.1565, 280939.0391 were in feet but got incorrectly 'labeled' as meters. Have the original author, or creator, of the tfw file make another one (preferably in feet, not meters and not degrees), then try again.  Use the new tfw file then follow the steps in post #12 and you'll be fine.

Chicagolooper

EESignature

0 Likes
Message 19 of 23

sfore
Collaborator
Collaborator

I think I have clearly confused the matter. I wasn't trying to do any conversion from meters to feet or feet to meters to get the image in correctly.  In post #14, I was only showing the difference between the 2 y insertion coordinates being 3.2808 difference.

 

I don't know source of image or surface other than it was lidar. I think it was scanned with a drone and tied to ground control. The photos also were taken with a drone (I think) and then stitched together. I know the overall image that was stitched together matches surface extents.The image I zipped up was only 1 tile.

 

Since the Surface and Image was collected by the same person and same method, I was just confused as to why the surface is coordinately correct (WV SPNAD83 South, US Foot), but the image is not.

 

Have you had a chance to look at the surface data and image data that I zipped up in the link I previously sent?

 

 

 

 

0 Likes
Message 20 of 23

Pointdump
Consultant
Consultant
Accepted solution

Shawn,

Interesting thread. Thanks for posting your data and drawing. I've been following with interest.WVsfore_1.png

 WVsfore_2.png

 

 

 

Using MAPCONNECT I notice two lines. I don't know why there should be two lines, but editing both puts the Tiff in the right place. Otherwise, it's as you say, off by:

N80 37' 49"E @ 3935835.21'
Using MAPIINSERT, whether I accept defaults or not (The "Modify Correlation" box) the Tiff comes in N80 37' 49"E @ 3935835.21', so that certainly seems like a Meter/Feet thing.

Using IINSERT in the Raster Design Tools, accepting defaults places the image correctly.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

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