Results 1 to 10 of 21

Thread: [Award Winner] Some pointers for using GIS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Software Dev/Rep Hai-Etlik's Avatar
    Join Date
    May 2009
    Location
    48° 28′ N 123° 8′ W
    Posts
    1,333
    Blog Entries
    1

    Default

    Sorry for the delay in getting this next section done.

    So, you should currently have something that looks like this:

    Click image for larger version. 

Name:	25.png 
Views:	169 
Size:	275.6 KB 
ID:	42817

    Select the Cities layer and either right click on it, or go to the Layers menu. Select "Query".

    Click image for larger version. 

Name:	26.png 
Views:	188 
Size:	29.5 KB 
ID:	42818

    If you are familiar with SQL, this is a simplified version of the queries you can do in that. You can only manipulate the WHERE clause, and it only looks at one table. If you are not familiar with SQL, you can still probably understand it, and there are some SQL tutorials out there that go into the details.

    http://www.sql-tutorial.com/sql-where-sql-tutorial/

    In this case, lets query for cities that have been marked as "World Cities". In the Fields list select WORLDCITY and then under the Values box, click All. This will fill the values box with the values in the WORLDCITY field. Now double click on WORLDCITY and it will appear in the SQL Where Clause box at the bottom. The click the = button, and double click on 1 in the Values box. The SQL Where Clause box should now read

    Code:
    "WORLDCITY" = 1
    This says to only show cities that have a WORLDCITY field set to 1. So click OK to apply the change.

    Click image for larger version. 

Name:	27.png 
Views:	237 
Size:	265.6 KB 
ID:	42819

    Many of the cities have disappeared. They are still in shapefile, we haven't altered it, it is simply being filtered by the query before display. If you look in the attribute table, it will also be filtered.

    Now, you can create a new shapefile based on this filter. Again, right click or go to the Layer menu, and this time pick Save As.

    Click image for larger version. 

Name:	28.png 
Views:	168 
Size:	21.2 KB 
ID:	42820

    You can browse for a file location, and browse to pick a CRS to save it as. Save it along with your other shapefiles for this project with a name like world_cities_lambert. Choose the Statistics Canada LCC projection, which should now be in the recently used list at the bottom of the CRS selector when you click browse.

    When you've set this up, click OK to save your new shapefile. You can add it to your map as a layer if you want.

    Now, you may wonder, why would I want the shapefile in the same CRS as the map if the software can reproject it on the fly. The reason is that on the fly transformations need to be fast, which means they cut corners. They are less precise and can cause odd little Glitches. In my case the oceans turned inside out, and a few graticule lines disappeared. I can't be sure you will get exactly the same glytches but assuming you do, you can try saving the file in the CRS you want for the map and then loading that in place of the original.

    Click image for larger version. 

Name:	29.png 
Views:	159 
Size:	271.2 KB 
ID:	42821

    Similar to the "save as" option is the "save selection" option. This works the exact same way, except it only saves the currently selected features.

    Now, you've probably been thinking that this is all very nice but you want to create something new rather than just presenting some existing information. Well, you can in fact edit a shapefile.

    On the toolbar there should be a blue pen. This toggles editing for the selected layer. if it's greyed out, it means you can't edit that layer. One common cause of this is having a query on it. Try opening the query dialogue and clearing it it if you have this problem.

    Lets start by editing the countries layer.

    Click image for larger version. 

Name:	30.png 
Views:	186 
Size:	319.0 KB 
ID:	42809

    Notice that the buttons beside the editing toggle have turned on. These are the editing controls. The edges of the country polygons have also gotten little red Xs marking the locations of the points that make them up. You may have to drag the toolbars around if you have limited screen space.

    To save your changes, you can either toggle editing back off and then select "Save" when asked, or your can click the Save Edits (floppy disk) button beside the toggle button and continue editing.

    The next tool is Capture Polygon (Looks like a pentagon with red dots at the corners), which lets you create new features. Left click to add a point, then click again to add the next point and so on as you work along the perimeter of the area. To place the last point, right click instead. You will then be presented with a dialogue that lets you set the attributes for the new feature. The Natural Earth data set has a lot of attributes but feel free to leave them blank while playing with it. Click OK when you have the attributes the way you want them.

    Click image for larger version. 

Name:	31.png 
Views:	179 
Size:	251.2 KB 
ID:	42810Click image for larger version. 

Name:	32.png 
Views:	171 
Size:	322.9 KB 
ID:	42811

    The next tool is Move Features. (Arrows in four directions) This is fairly simple, select it and then drag a feature. If you have multiple features selected, dragging one will drag all of them.

    Next is the Node Tool. This lets you drag individual nodes around. You can select a node by clicking on it to highlight it in blue, and then delete it by pressing delete. You can add new nodes by double clicking on an edge.

    Click image for larger version. 

Name:	33.png 
Views:	215 
Size:	327.0 KB 
ID:	42812

    Next are Delete, Copy, Cut, and Paste, which operate on the selected features pretty much the same way as in any other application.

    Next up are Undo and Redo (curved arrows to the left and right) which likewise work the same way as in any other application.

    Next is Simplify geometry which can be used to reduce the amount of detail in a feature. (Strangely this doesn't seem to be working for me)

    Then come a set of tools for manipulating "rings" and "parts". A "ring" is a hole in a feature and a "part" is a portion of the feature disconnected from the rest. You create them the same way as with the capture polygon tool. To delete them, pick the appropriate delete tool and click on the edge of the part or ring you want to delete.

    The next tool is Reshape, which will take some getting used to but is very powerful. It works in a similar way to the capture tools in that you left click several times and then right click to finish. The line you create must cross the boundary of the feature twice, between the first and last crossing, the boundary will be changed to follow the line you traced. If this applies to more than one feature, then their shared boundary will be updated. That may sound a bit confusing so I suggest you just play with it until it makes sense.

    The split tool is similar but you must start and end outside the target feature, and it gets split into two features.

    Finally there are two tools to merge features together. They both require you to select two or more features. The first combines the two features into one feature, and then provides a dialogue that finds all the places where their attributes differ, and lets you choose between them. The second tool just merges the attributes but leaves them as separate features.

    The rotate point symbols tool only applies when using a special feature of the point symbolizer I haven't gotten to.

    Click image for larger version. 

Name:	34.png 
Views:	263 
Size:	274.2 KB 
ID:	42813

    Besides the geometry, edit mode also lets you edit the attributes in the attribute table. Double click on a cell to edit it. Go back to the map view and refresh (Ctrl-R) and your changes should now be visible.

    Click image for larger version. 

Name:	35.png 
Views:	181 
Size:	90.5 KB 
ID:	42814Click image for larger version. 

Name:	36.png 
Views:	206 
Size:	274.5 KB 
ID:	42815

    Finally, you can add entirely new attributes. At the bottom of the Attribute Table look for a button that looks like a window with a little star. This will bring up a dialogue that will let you pick a name and a type. Types can be text, an integer (whole number), or a decimal number. Width is the number of characters/digits, and for decimal types, precision is the number of digits after the decimal place. Width 5, precision 2 allows 123.45 but not 1234.5 or 12.345. All the existing features will get this attribute filled with NULL, which just means "there's nothing here".

    Click image for larger version. 

Name:	37.png 
Views:	171 
Size:	108.0 KB 
ID:	42816

    When it's all done, toggle off the edit mode and click Save when prompted. Remember that you have edited the shapefile itself. Any maps using it will reflect these changes.
    Last edited by Hai-Etlik; 03-05-2012 at 11:59 PM.

  2. #2
    Guild Applicant Facebook Connected
    Join Date
    May 2012
    Location
    Belo Horizonte, MG, Brazil
    Posts
    4

    Default

    Hi Hai-Etlik

    I'm not allowed to send private msg yeat. Still discovering this amazing forum.
    For now, seems it's just like you (and me) with GIS experience over here, am I wrong?.
    And I Hope to change a lot of informations with you (and others GIS pros) to make wonderfull GIS interactive maps with rich details, from this artists over here.

    To keep on the subject:
    I'd a little post about how I'd transformed the maps into an OpenLayers GIS, but it's in portuguese only: http://fnorte.org/2012/05/sigweb-de-gelo-e-fogo/
    Try a web translator, if it's still confused I'll try to translate my self and post here too, to help this tutorial (I didn't readed it yeat, just scan and it's a great job).

    Did you know the MapTiler software, to generate the tiles from the georef.images?? http://www.klokantech.com/maptiler/

    See ya...

  3. #3
    Software Dev/Rep Hai-Etlik's Avatar
    Join Date
    May 2009
    Location
    48° 28′ N 123° 8′ W
    Posts
    1,333
    Blog Entries
    1

    Default

    Quote Originally Posted by fnorte View Post
    I'm not allowed to send private msg yeat. Still discovering this amazing forum.
    For now, seems it's just like you (and me) with GIS experience over here, am I wrong?.
    And I Hope to change a lot of informations with you (and others GIS pros) to make wonderfull GIS interactive maps with rich details, from this artists over here.

    To keep on the subject:
    I'd a little post about how I'd transformed the maps into an OpenLayers GIS, but it's in portuguese only: http://fnorte.org/2012/05/sigweb-de-gelo-e-fogo/
    Try a web translator, if it's still confused I'll try to translate my self and post here too, to help this tutorial (I didn't readed it yeat, just scan and it's a great job).

    Did you know the MapTiler software, to generate the tiles from the georef.images?? http://www.klokantech.com/maptiler/
    I think there are a few other GIS users here, but not many.

    This thread ended up being more of a walk through of basic functionality than the collection of pointers I'd initially intended so it'd probably be better if you posted your tutorial in a separate thread. I hadn't heard of that particular tool; the last time I did something like that with one of my fantasy maps, I georeferenced the map in QGIS and then loaded it into GeoServer to provide a WMS, and then used OpenLayers like you did.

  4. #4
    Guild Applicant Facebook Connected
    Join Date
    May 2012
    Location
    Belo Horizonte, MG, Brazil
    Posts
    4

    Default

    Quote Originally Posted by Hai-Etlik View Post
    I think there are a few other GIS users here, but not many.

    This thread ended up being more of a walk through of basic functionality than the collection of pointers I'd initially intended so it'd probably be better if you posted your tutorial in a separate thread. I hadn't heard of that particular tool; the last time I did something like that with one of my fantasy maps, I georeferenced the map in QGIS and then loaded it into GeoServer to provide a WMS, and then used OpenLayers like you did.
    Nice,

    I prefer to generate tiles, instead use mapServer, because I think too slow to mapServer generate raster. The MapTiler itself generate a basic OpenLayers, the rest is about html/css/javascript skills.

    Soon I will do this tutorial either.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •