Contact Joel Logan (firstname.lastname@example.org) if you are interested in attending!
I was asked to make a tutorial on defining and reprojecting files in QGIS. I wrote this for specific data sets that were being used and approached it as a workflow instead of just a how-to tutorial. This might help others in understanding some of the quirkiness with QGIS and projections at the moment. Obviously, there is more than one way to do this but I wrote this as a, hopefully, simple solution.
Just as a recap for those that need a refresher or are new to defining and reprojecting:
- Defining projection – the data (vector or raster files) are already drawn in a projection but the actual spatial reference description (like UTM or State Plane or Geographic) is not with the files. QGIS and ArcMap rely on knowing the spatial reference descriptions to reproject files with different defined projections on the fly within the data frame so that they overlay correctly.
- Reproject – When the spatial reference of a file is known, the software can translate the file into another defined spatial reference. An example of this would be like the conversion we did to your second set of files that were in a UTM projection with units in feet and we later reprojected them into a different UTM projection that had units in meters.
This is what we know about the files being used:
- Topo DRG – downloaded in UTM NAD83 in feet from ChartTiff
- Polygon of tract – drawn over the DRG in QGIS (will be in same coordinates as DRG)
Especially because of what QGIS is currently doing, it’s going to be very important to check the metadata of the files used to get the spatial references. (But I would definitely suggest making this a habit regardless!) If they do not come with metadata, you may need to contact the files’ creator and ask for that information as a starting point. I would also recommend going into the files’s Properties after adding it to QGIS to review the CRS information and make sure it matches what you know about the files’ spatial reference before starting to work with the files.
The workflow will go as follows:
(I’m using QGIS 2.0.1 for my example and this should not be any different if you have 2.2 installed.)
Add DRG to QGIS and check the Properties of the file for the CRS that QGIS has defined it as against what you know the file is in. If the projections are different, go to step 2.
Define the projection for the DRG.
Create a new shapefile and choose the same projection as the DRG.
Reproject the files for your GPS unit.
1. Add DRG to QGIS and check projections.
- Open QGIS, and click on the Add Raster Layer button in the sidebar. Browse to the DRG.
- After adding the DRG to QGIS, right-click and select Properties > General. Click on the Specify button under Coordinate Reference System. The screenshot below shows the CRS that QGIS has chosen for the DRG.
2. Define the projection for the DRG:
- Since we know that the DRG is in UTM with units in feet, we know that the above information chosen by QGIS is incorrect and we will need to redefine the projection within the Properties of the file. To do this, go back to Properties > General and click on the Specify button under Coordinate Reference System if you closed the window. In most cases, you would use the filter to find the projection in the list and select the correct projection.
However, in this specific case, we need a projection that is not included in QGIS. I had to create a custom projection from the NAD83 / UTM zone 18N parameters that was in feet instead of meters. You can create a custom projection under Settings > Custom CRS. The parameters I used to define the DRG were: +proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs
3. Create a new shapefile in same projection as DRG:
- Go to Layer > New > New Shapefile Layer (or use the icon in the sidebar) to create the new file using the screenshot below as a guide to change the default projection to match that of the DRG:
4. Reproject files:
- To reproject the files from the UTM units in feet to UTM units in meters (to work with your GPS unit), right-click on the layer you want to reproject and select Save As. Fill out the tool form with the relevant information (giving it a new name, etc…). Both raster and vector files will have a place to select the desired projection you want the data converted to:
That’s it for today.
Time: 11:00 a.m. – 1:00 p.m.
Location and Directions: CRC
1181 Coastal Drive SW
Darien, GA 31305
Georgia Hazard Mitigation Studies
The Georgia HAZUS Project has completed several risk assessments including three coastal counties. These studies used county parcel maps and WinGAP CAMA data to create detailed Building Inventory maps that were used in HAZUS to determine the potential extent of losses and estimated costs related to riverine and coastal flooding as well as hurricanes. Experiments are now underway using the same workflows to produce related maps for land use planning, E911 mapping, and address list compilation. He is currently collaborating with the Coastal Regional Commission to complete similar risk assessments and products for their entire coastal planning region.
Terry Jackson is Director of the Office of Mapping and Decision Support Systems at the Georgia Department of Community Affairs. Since 2011 he has led the Georgia HAZUS Project as part of DCA’s larger initiatives addressing disaster resilience and planning. He is a FEMA credentialed HAZUS Trained Professional and HAZUS Trained Practitioner and in 2012 received FEMA’s HAZUS User of the Year Award. He is a Certified Floodplain Manager and member of the Association of State Floodplain Managers. Recently, DCA joined the Silver Jackets interagency flood risk management team.
The main way I was introduced to GIS was through Esri Virtual Campus Courses. I’m not being critical at all, in fact I have to say I thoroughly enjoyed my Esri Virtual Campus Courses and I kind of miss the Learning Pathways. I really do think Esri Virtual Campus courses are an excellent way to learn Esri software. And, those same courses have valuable GIS concepts in them if you can parse them through ArcGIS’s tools. Even so, I have not been taking Virtual Campus courses lately. I am sure Esri hasn’t slowed down on their training seminars, but I have not seen any of interest. But when I saw the revised Creating and Editing Metadata in ArcGIS, designed specifically for 10.2, I was in. I figured it would be repetitive since I did take their “original” course with exactly the same title. I didn’t care, though, because I needed something to get me back to looking at how much better (or maybe make me miss ArcGIS 9.x again) metadata was in 10.2.
What I did not figure is that it would make me feel as if I am a GeoJournalist. From Middle through Undergraduate school, I was very active in various forms of school journalism. It started with my all-time favorite course entitled “Effective Communications” in eight grade that had us editing the middle school paper. I’ll show my age and state that our typing courses were on AppleIIe’s and we were designing the paper on “happy” mac’s in PageMaker. We even cut the color out of mylar. And, the course was the first real photojournalistic tasks I had. It lead me to the sidelines of many sporting events…ok, enough reminiscent history.
So, I’m sitting down to read through the materials and in the key definitions, the metadata definition feels an awful lot like the 5W’s (and an H)…just about data. I’m immediately taken back to my Effective Communications class, discussing how to write interview questions that extract the 5W’s from the subject. Yes, I know, I was reminiscing again. Sorry. But, the point is that metadata really is answering the 5W’s and ESPECIALLY the H about your geospatial data and I like that explanation.
I made it another section in the course and started to reminisce again. I have always been a firm believer in the A Picture is Worth a Thousand Words concept since I am a photographer, and I often think of metadata as the writing on the back of the “analog” print or the Digital Asset Management information for digital photos. I thought they were going to use the tired old writing on the back of a photograph, but instead they basically used captions and said “Each photo can tell you something, but its photographic value is limited if you do not have other information.” Thus, captions. If I had used their examples in my eight grade effective communication class, I would have failed. But I guess they don’t want you to write those thousand words down.
Unfortunately, the rest of the course was downhill from there. Yes, they showed the all-important method of changing from Item Description to your standard of choice, but they didn’t really talk about the tips at the bottom or anything else. In other words, my general frustrations with how ArcGIS handles metadata are still well founded. And, yes, I suppose that translates to still missing ArcGIS 9.x!
One funny part was that Esri HQ seems to have one of the same problems I have. If you edit your metadata in ArcGIS, it reports stuff that you don’t really want to have reported…like file locations. This is something that, if you’re delivering to a client, you will have to update on the final drive you deliver. There certainly are wonderful things they collect (such as the exact version of your software), but the file location is definitely not one of those wonderful automatically collected items. Anyway, I was amused that they blurred out that portion of the data.
My final review is that I suppose I have to thank Esri for a trip down memory lane with this Virtual Campus course. I have a few new ideas of how to define metadata when I’m teaching it. But overall I still find it tragic to still miss ArcGIS 9.x. But, what that really means is that I should be working on building my own interface. When I do accomplish that, I will share.
We received an email today from Michael Cliverton with a problem he was experiencing within QGIS Desktop concerning projections. Don’t ask me why, but I enjoy solving projection issues while others scream at their computers in tongues. The screaming is occasionally laced with profanities, but I digress. Michael did nothing of the sort. He actually found an issue we have been seeing pop up and even discussed it briefly in our Introduction to QGIS workshop as a potential gotcha to look out for. I’ll go over the problem and provide a few workarounds.
WKID: 2261 Authority: EPSG
WKID: 26918 Authority: EPSG
- Load your data into QGIS. I like to start with the imagery then load the shapefiles. For each layer, right-click then select Properties > General then click on Specify under the Coordinate reference system heading. The CRS information for Michael’s imagery appears as EPSG:32116 – NAD83 / New York Central which is the best guess that QGIS has made based on what ESRI has provided but is not correct for QGIS to work with. You can use the Filter to narrow down your selection and find the projection. In Michael’s case, I entered “New York” into the filter then was able to scroll through the list to match the FIPS code (3102) and the units (feet) with the proper CRS within QGIS which turned out to be EPSG: 102716 for NAD_StatePlane_New_York_
- I prefer to reproject the shapefiles rather than the imagery, so once the imagery’s CRS is discovered, go to Project > Project Properties > CRS. Here you can select the imagery’s CRS from the list. It will most likely now show up in the recently used list. Click on OK after selecting the CRS. If all the layers have been redefined, you should see the canvas go blank (Zoom to layer extent for the image) or all layers aligned.
2. Saving layers as new files with defined projection:
- Once you know the EPSG codes for the layers, you can redefine them and save them as new files to be in the same CRS. I did this by defining the layer projections as described in workaround #1 then right-clicking on the layer and selecting Save As… to save our as a new shapefile. The defined projection should already show up as Layer CRS just under Encoding in the tool’s form or you can manually select it as described before.
3. Reproject the shapefiles into the imagery’s CRS:
- Once you know the CRS’s of the imagery and the shapefiles, you will still need to redefine all the layers as described above. However, you can now reproject the shapefiles into the same CRS as the imagery has to save from having this issue. You do this the same as in workaround #2, except that you will select Project CRS instead of leaving it as Layer CRS. I like to have all of my files in the same projection whenever possible because of some quirky ArcMap problems I have run across, particularly when dealing with unit conversions between horizontal and vertical and selecting by location.
Hope this helps others and happy (Q)GISing!
File based geodatabases….love them or hate them. I’ve done both. Back in 2009 I even did a two hour workshop on Switching to File Based Geodatabases and why this was the best thing ever.
A question came up on the QGIS users list and it led to a slight detour as the days usually go. What do you do if you get a file based geodatabase and you are using QGIS? At about 9.x everyone was usually screwed. Then ESRI relased their API and the good people at GDAL fixed it to where life was much easier. You could break out ogr and get to your data out.
I’ve been in the middle of writing the QGIS Part Deaux class. It’s going to be heavy editing/working with your data. With the emphasis on your data. It’s going to be the nice thing by the end of the three day class (Parts I, II, and III) is that you aren’t going to care what software you use – you are only going to care ultimately about your data and the tools you can use on it. The tool we will discuss will be QGIS in the class (obviously).
So what happens when you are sitting there and you get a file based geodatabase from someone. I’ve used linux and windows to pull data out into shapefiles but this example ran from the windows side of life and the OSGEO4W installer as described here. Being a complete slacker I didn’t try the stand alone installer but I did get anecdotal evidence it works also. Well – because of GDAL you can open a file based geodatabase as a directory once you get the gdal-filegdb library installed. You can open your data. I even edited the data (but that scared the crap out of me).
In all of that I did something completely out of the ordinary – or at least I thought it was. It actually is quite brilliant that QGIS can do this. I’ve talked about spatialite and with the OGC’s announcement of the geopackage I have a bit more hope with it as an alternative software. So after opening the file based geodatabase in QGIS I cracked open spatialite and made a new database (there are several ways to do it) and used the database manager to pull data out of the File based geodatabase and into spatialite.
Why is that remotely brilliant? When I die I’m going to have the words descriptio put on my tombstone. For those who have dealt with moving data from a database into a shapefile that’s always how I describe the truncation that occurs. It is a pain if you are working with data and you move something into a shapefile and all the fields become truncated. Well with the database manager that comes with QGIS you can move it straight from the file based geodatabase into spatialite (or PostGIS). Yes this is awesome – BUT – you can’t go back to a file based geodatabase….BUT you can hand of the spatialite database to your ESRI users.
So a diversion out of my day. I learned something. Hopefully you did too….QGIS – it’s awesome. It’s OpenSource. (shameless plug WE TEACH CLASSES ABOUT IT!!)
Update 03.03.14: GA URISA Benefit Workshop to assist Joe Bless Family – Building an Address Repository Using the FGDC Standard. Find out more by clicking on the link to view the latest GA URISA newsletter. Thank you to all those who are so generously contributing to this effort. I know the Bless family appreciates everything being done right now.
During my time at Gainesville State College (now UNG) as a student and a staff member, I had the unique opportunity – the privilege – to meet many wonderful people, most of them my fellow AESA and GIS certificate students. I consider them not only as GSC family, but also as family within our broader GIS community. I’m convinced that the GIS network is closer than the Six Degrees of Kevin Bacon. I’m hoping that’s true by sending out this blog post and reaching out to my fellow GIS family members to ask for your support to help one of our own – Joe Bless, and to tell you about another family member – John Nesbitt.
I recently found out that two of our alumni and their families have been going through very challenging times. I’m saddened that one, John Nesbitt, lost his battle in late January with ALS, also known as Lou Gehrig’s Disease. He was bright and one of the most entertaining people I’ve had the pleasure of meeting. Those who had class with him and Brian together surely remember this well. Some of the fondest memories I have of John involve hearing the GIS Lab in Rm. 257 erupt with laughter on most days (and evenings) and trying to schedule Saturday field trips to Lake Lanier for our Limnology class around UGA game days because of John’s obsession with the Dawgs. Unfortunately, I don’t have more information on John and his family. If you would like to share more, please leave a comment here or send me an email and I will share it here with updates.
In the same week of hearing about John, myself and others received a message from another AESA graduate, Tim Guant. He told us about what another fellow graduate, Joe Bless, and his family has been going through. Joe, and Tim, were part of the IT concentration of the AESA program. During his time as a student and even after graduating, Joe was the embodiment of professionalism and always found time to help others, fellow students and faculty alike. I spoke with Joe’s wife, Lucy, yesterday. Between what she and Tim have told me, the Bless family is in desperate need of our help. Joe was hired by GeoFields but found out in November that he had a yet to be diagnosed brain disease that is strongly suspected to be Creutzfeldt-Jakob Disease and had to take extended medical leave as his brain mass decreased by 45%. Lucy tells me that GeoFields has been extremely supportive and wonderful to the family. During the last several months since finding out about Joe’s condition, Lucy’s mother passed away, she now cares for her elderly father, younger sister (both need special care) and their young daughter, and their house was flooded which has left the entire family living in a hotel until repairs have been done.
In response to this news, several of us have been trying to figure out ways to help and spread the word. As more concrete plans are made, myself and others will certainly share more. Until then, you can find out more information and leave messages for Joe on the Supporting the Bless Family Facebook page. If you would like to donate to the Bless Family, I’m told the best way to do so is through the Fundly.com page they have set up called Aiding the Bless Family.
We’ve got more to talk about than space currently. We’ve had a Introduction to QGIS class and have taught it several times. I remember the first time I offered it no one showed up. The last time we were approaching half full and everyone left (it seemed) capable of opening the software and doing something with it. Which is what we want – use this piece of software as an additional tool in your toolbox.
The question came up about a part II to the class and after a discussion there’s going to be a II and III. Yes – we’re going to eventually have a three day QGIS offering going all the way from “this is the interface” to “store your data in a database”
So what does the second one cover? In no Particular order:
- Creating Shapefiles
- Creating Spatialite databases
- Converting Data
- Databases (spatialite/postgis)
We are in the middle of writing it now so it will be out soon. I know – QGIS Part II is pretty lame for a class name. It’s probably going to be Data and Editing: QGIS 2.2. How much will it cost – we are still hashing through that one. This one will be more involved but it’s not going to be significantly more than the intro class which is priced at $325.
So anyway – prepare for some more QGIS goodness.
KEEP CALM!! The source has been released! I debated even putting this up here but it’s part of the cool thing about open source software. You get the source. So in this case QGIS 2.2 is done and the package guys are working away providing binaries for your favorite Operating System. If you so desire – compile it yourself and get busy.
From the email bag (Jurgen E Fischer’s email)
QGIS is a user friendly Open Source Geographic Information System that runs on Linux, Unix, Mac OSX, and Windows. We are very pleased to announce the release of QGIS 2.2 'Valmiera'. The emphasis on this release has been very much on polish and performance - we have added many new features, tweaks and enhancements to make the user interface more consistent and professional looking (and hopefully easier to use). The composer (used for creating print ready maps) has had a lot of work done to it to make it a more viable platform for creating great cartographic outputs. This is first release following our new four month release schedule that is meant to make new features and bugfixes available quicker and the development and new releases more predictable. In order to streamline the release process, we only release the source code today. The binaries will be created in close succession by the individual package maintainers. The source code is and the binaries soon will be available via the large download link on our home page: http://qgis.org If there is not yet a binary package for your platform on the above page, please check back regularly as packagers push out their work and the download page will reflect the new packages. Good things are happening the FOSS4G Space