In continuing effort of my last blog post, I will explain how you can create a simple world file to use with an image which is not georeferenced to use with AutoCAD MAP, Civil 3D and/or InfraWorks.
In my previous blog post “How to grab aerial images from WMS server” you have made a rectangle (or square) as a boundary to your project of what you want to download an aerial image from a WMS server.
Now I am using the same example to write down the coordinates of the upper left corner of that rectangle (or square). Now use the half of the value of the factor I have calculated back then (which is in fact the ground resolution of that particular image) and add this value to the X ordinate, and subtract the same value from the Y ordinate. The result will be used as the coordinates for the World File.
Now create a text file with the following content (6 rules):
X (value = Upper left X ordinate plus half the value of the calculated factor)
Y (value = Upper left Y ordinate minus half the value of the calculated factor)
If I use the same example from my previous blog the content of my World File will be as follows:
Save the file with the same name as the image you have downloaded from the WMS server but with the file extension which is built up as follows:
If your image has the jpg file extension, use jgw as the file extension for the World File. You can name any bitmap file extension by omitting the 2nd (or middle) character and by shifting the 3rd (or last) character to the left and finally by adding the ‘w’ character to the end. So ecw would become eww and png would become pgw, etc.
Now you can use both files, the downloaded aerial image with the self made World File in AutoCAD Map / Civil 3D or InfraWorks. You may even use these files in vanilla AutoCAD if you like, by using this free available tool: GeoRefInsert from the Autodesk Exchange Apps store.
In my next blog post I will explain how you can successfully use a GDAL WMS XML file to use with InfraWorks.
Happy georeferencing! 😃
With AutoCAD Map 3D or AutoCAD Civil 3D (planning and Analysis workspace) you can connect to a WMS data server via the MAPCONNECT command. Once connected you can select a Layer or layers from the available presented list of layers, choose the coordinate system corresponding to the one you have set in your drawing and add the data to your drawing. If everything runs well your window screen will be filled with all the layer data from the selected WMS server. Aerial Imagery maps can be served this way. Once you’ve connected and add aerial images to your map, your window will fill with aerial images. But you will not recoginize much detail. But by zooming in, much more detail will become available until a maximum value is reached. This maximum value is explained as ground resolution and stands for the image content expressed in a distance in units per pixel image. For example: 0.5m/pixel or 50cm per pixel. The smaller the units expressed in cm or m (or inches/feet) the better the quality of the image.
However, you can not grab the image directly in AutoCAD Map 3D or Civil 3D to use as a standalone or as an attached image.
For this you could make a printscreen of your AutoCAD Window. But the resolution is as ‘good’ as your resolution of your screen. You could also use the re-sample function from the MapWorkspace to download the active screen to a temporary folder on disk. In both cases the retrieved imagery is not georeferenced and therefor hard to insert at the right coordinates back into the drawing. Another and much better way is, to use the EXPORTMAPTODWG function, which will allow you to create a new DWG with the image attached to that DWG. But only the image of what you visual have zoomed into at that moment will be captured, created and attached. This way you have the retrieved image positioned at the right coordinates in the drawing. But the image resolution is as good as the resolution from screen.
There is an alternative way to do both: get a better image resolution and have the image georeferenced. How to grab an aerial image map from a WMS server, right after the jump.
Grabbing an aerial image map from a WMS server can be done via a web browser by using a typical URL with special parameters which the WMS server understands for retrieving the requested data from the server. This URL can have or should contain the following parameters:
- Built the URL starting with the same WMS url you have used with the MAPCONNECT function in Map 3D or Civil 3D. Mostly it ends with a ? mark or & mark. What follows next does not have to be in a certain order.
- Place the REQUEST=GetMap phrase into the to be build URL like in the example below. Add the & character at the end.
- Place the LAYERS=layer name<,layer name> phrase. Add the & character at the end. Use the same layer name(s) you have used in Map 3D/Civil 3D when connecting and adding the layer(s) to your Map. The right layer name(s) can be different than the display name(s) Map/Civil 3D will show you. If you want the exact layer name(s), make use of the GetCapabilities request in an Internet browser before you continue. From that response you can filter out the right layer name(s).
- Place the BBOX=upperleftX,upperleftY,lowerrightX,lowerrightY in the URL. And add the & character at the end. Define a window in Map3D/Cvil3D and determine the upper left and lower right coordinates. Draw a rectangle for example and write down the upper left and lower right coordinates. These coordinates will be used in the boundingbox (BBOX) part of the URL.
- Place the FORMAT=image/jpeg phrase in the URL but replace the / with %2F so it will show image%2Fjpeg in the URL. Add the & character at the end.
- Use the maximum allowed WIDTH and HEIGHT of the image grabbed from the WMS server. This could be different for every WMS server. Most of the times I found, sometimes by trial and error or sometimes by using the GetCapabilities request, the value of 2000 or 2048.
- Now here comes the trick: calculate the width and height values of your rectangle to the maximum WIDTH/HEIGHT so the width and height are in relation to each other. For instance: your largest side (width) of the rectangle is 1000m. Then your WIDTH value will be the maximum WIDTH of 2000. It needs a scale factor of 0.5 to get the 2000 into 1000m. Your shortest side (height) is 400m. Then your HEIGHT will be 800 by using the same scale factor of 0.5. If you have drawn a rectangle with equal width and height, a square, you can use the same value for the maximum WIDTH/HEIGHT of the WMS server. This scale factor is also important for creating a World File later.
- Finally, determine the geographical or Projected coordinate system expressed as a EPSG code. This code can also be found by using the GetCapabilities request first.
An URL example of a WMS server GetCapabilities request could look like this:
This will return an XML file which can be opened in any text or XML editor.
An URL example of a WMS server GetMap request could look like this:
Applying the GetMap request URL into any webbrowser will result showing the image within the given boundingbox.
Rightclick the image and save it to your harddrive or network share.
You now have the image ready to be used in AutoCAD.
But you are not there yet. This image example isn’t georeferenced. If the WMS server supports GeoTiff images, only then the saved image is geo referenced.
In my next post I will explain how to create a World File for non GeoTiff images like above example, without using an application which can create World Files like Raster Design does. Stay tuned.
Great news. At least for the mobile AutoCAD WS users.
AutoCAD WS, for the iPad at least, now supports Civil 3D drawings, and it works great.
When you open an AutoCAD Civil 3D drawing in the AutoCAD WS app you will see the drawing in one of the 3 available Views: 2D, 3D Wireframe and 3D Solid. You can easily switch to either one of those Views.
If you have a Surface in the drawing, the 3D Solid View will show you the solids of the triangulation of the surface. Just like you would see when you make use of the Object Viewer by selecting the Surface within AutoCAD Civil 3D.
Switching to 2D View will show you the drawing in Plan View.
Switching to 3D Wireframe View will show you the drawing in 3D View showing Civil 3D objects like Feature Lines and probably more objects as I first have to test this more.
See: AutoCAD WS
See also below images made from my iPhone:
This video will show you how you can import a LandXML file containing a DTM surface into vanilla Microstation V8i (SELECTseries 3).
Yeah, I know. It has nothing to do with AutoCAD Civil 3D itself, besides that Civil 3D can export (and of course also import) LandXML files. So when you have a contractor or client or other project team using Microstation V8i (SELECTseries 3) you could share your Civil 3D TIN surface through LandXML export.
I really like this adoption of the LandXML DTM/TIN feature with Bentley’s flagship Microstation because it has all the functionality to change the style of the Surface and annotate it where needed in the drawing. You can not though change or alter the TIN surface in anyway. But in most cases you don’t need to alter the TIN surface when you are in a phase of the project when you need to create construction drawings and the existing or proposed ground surface does not change at all anymore.
I really would like to see this functionality in vanilla AutoCAD too.
Go see and check it out: Import LandXML into MicroStation V8i (SELECTsereis 3) and Annotate – Terrain Model (via Twitter: @EnvisionCAD and @Blip)
Here’s a quick remedy for the following error:
In AutoCAD Civil 3D 2012, when I want to insert a subassembly from the Toolpallette or Content Browser, I get this error:
I did not know what caused this error. But repairing or even re-installing the application did not solve the issue. At least for me it didn’t. I couldn’t find any solution from the Autodesk support website so I made a support request at Autodesk Subscription Tech Support. They replied: re-install the application. Well that didn’t work.
So I was delivered to the resources of the internet community. And that’s not bad as you may read right after the jump.
Out there on the web I read that it had something to do with the way you’ve made the installation, through manual installation or through network deployment. Working as a CAD application administrator I always use deployments because of the many installations we need to make. Looking further on the internet, I even found a blog page describing the same error and the solution for an AutoCAD MEP installation. Read here for their findings. Their solution was that within the User’s roaming Support\RegisteredTools folder I should have had the appropriate files in it.
So I made a manual (stand-alone) installation on another system and compared that with the network deployment. With the manual installation under the User’s roaming Support\RegisteredTools folder I found the right files in it as described before with the AutoCAD MEP installation. Where the network deployment installation did not had these files under the User’s roaming Support\RegisteredTools folder.
The location for Windows 7 or Vista is:
“C:\Users\<user account>\Roaming\App data\Autodesk\C3D 2012\enu\Support\RegisteredTools”.
So I’ve copied those files from the manual installation location to the network deployment installation location, started AutoCAD Civil 3D 2012, and there you go. Inserting subassemblies from the ToolPalette or even from the Content Browser did not gave me the “Unable to execute the tool” error anymore.
You can download these 3 .atc files here.
New survey features are introduced with the release of AutoCAD Civil 3D 2013.
One of those new features is the Survey Query Builder. The Survey Query builder gives you the opportunity to build your survey data (point and figures) by using queries or filters. This way you can select what survey data you want before you import it into the drawing.
On the internet you can find lots of information how you can build such a survey query. The User Guide documentation of Civil 3D 2013 has also sufficient information how to do so.
Once you’ve build your query, you can preview the result in the drawing editor. And if satisfied you can save the query for later use to import your result into the drawing.
One thing I’ve noticed when I tried to Preview a points query only, is that I could not see the result (any points) in the drawing editor.
Taking a closer look, and I actually had to zoom in from great distance, you could finally see the points. That is awkward.
I could not find any documentation how to change the display style of the points in preview mode.
So to see the points in preview mode I have added a large drawing (or annotation) scale like 1:5,000 or 1:10,000 to the scale list. Set this large scale before you want to see a preview of your queried survey points and voila there are your points.
When you’re done with querying your survey data do not forget to turn your drawing scale back to an appropriate scale. If not you could end up with very big annotations or graphical representations of your points when you want to import those points into the drawing. If so, you know how to change the scale back to a more working presentation.
Note: this problem only occur with the Metric version of Civil 3D 2013.