Hot answers tagged

8

We have had quite a lot of success doing this in 6 Australian and two South African cities under the banner of GeoRabble. Its About page describes the process for how GeoRabble "self-organizes" and we would be happy to try and help you get one off the ground. Some things that have made GeoRabble successful are: The definition of a GIS Professional being ...


6

I suggest you to install Group Stats plugin. Here is a quick tutorial: Search for the Group Stats icon Select the layer in which you have the Codes Select the attribute (in your case Code) Click on Calculate The Count will appear. If you go to preferences you should be able to select only Count avoiding the other parameters to be displayed (this is not ...


5

I recognize that a few of these have been covered in other posts, but they are worth re-iterating. Here are my keys to organizing a successful user group: Your professional network. The most important part of a user group is each individuals professional network. You need personal interaction on a professional & educational level. Get the word out ...


4

You can create unique values but based on which polygon the point resides in. Add a unique attribute which is at least 10 times larger than the amount of points to your polygons, and the join this value to your points. Like in your example, the upper polygon would have 100. Join to your points and create unique values that is something like 101 and 102. ...


4

As your polygon example is not convex, I would rather use some "morphological math" tricks. You dilate your polygons so that closeby polygons will touch each others and fill the gaps of your streets, then you erode the block so that the contour is the same as the origin. In practice, you can do it with vectors using the buffer tool. After first positive ...


4

Before I get to how to in QGIS I feel I should mention that from table browser in QGIS you can select and copy the whole table and paste into your favorite spreadsheet software and calculate sums (or other) there. If you really want to do it in QGIS, the best way is to use SQL query for this. Meaning you need to work in some database (don't panic, it is ...


4

Use a CASE statement and a sub-query: SELECT foo.category, SUM(ST_Length(foo.the_geom)) as length FROM (SELECT gid, year, the_geom, (CASE WHEN year BETWEEN 2005 AND 2014 THEN "1"; WHEN year BETWEEN 1995 AND 2004 THEN "2"; WHEN year BETWEEN 1985 AND 1994 THEN "3"; WHEN year BETWEEN 1975 AND 1984 THEN "4"; ... ...


4

You can group points using either the recursive query or PL/PLGSQL procedure described in the answers to this question. Just substitute ST_DWithin for ST_Intersects/ST_Touches, as appropriate. If you're comfortable trying something experimental, you could build PostGIS with purpose-built functions to solve this problem: see the ticket on trac (code ...


3

When to use join: When there is a one to one relationship between two distinct tables or geometrics (based on join field or spatial relation) Used to append new field/columns to table (result = table has same number of rows, and more columns) http://resources.arcgis.com/en/help/main/10.2/index.html#//005s0000002q000000 When to use merge: To combine ...


3

In PostGIS, use ST_Collect to collect your block geometries into one geometry. Then use ST_ConvexHull to get the convex hull, or try ST_ConcaveHull to get a better fit at the cost of more CPU.


3

I think there is more detail required in your question. But maybe you could select the shapes by using a rectangle or polygon, then use the Merge Shapes Tool. Maybe then also add a buffer before that step if you want the final shape to be more contiguous. hth


3

This was the best result on Google I could find, but the screenshot tutorial by G M is out of date and it took me a while to work out how to use the plugin. Once installed, Load the Group Stats control panel from the "Vector" menu. Select the layer of interest. From the fields list, drag the field of interest into the "rows" box. Now drag the same field ...


3

Another tool which might be useful to you is the Linear Directional Mean tool which "Identifies the mean direction, length, and geographic center for a set of lines." It will not identify the clusters of lines, however. You may have to select these out manually first. In your example, I see three major clusters of lines - top, middle, and bottom (with ...


3

You could try Dissolve (Data Management) tool. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000005n000000 Integrate (Data Management) also shows promise, although I can't find anything about it under ArcGIS 10. Only under 9.3.1. http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=integrate_(data_management)


2

As @NathanW pointed out, you are trying to pass your sql_clause to the where_clause parameter. I've found two posts (here and here) that show passing the sql_clause parameter as a tuple (the help also agrees), not a string, so you might want to try the following: sql = (None, 'GROUP BY "INPUT_FID"') with arcpy.da.UpdateCursor("outDistanceSorted", ...


2

This is not QGIS but if you don't consider OpenJUMP Plus totally off-topic, then you can do it like this: Create a grid which has some unique ID as an attribute. Open grid layer and building layer as separate layers into a project. Use the Aggregate function of OpenJUMP Plus. Define that ID attribute will be aggregated by the "majority" criteria. ...


2

Intersect your building layer and grid layer (Vector > Geoprocessing Tools > Intersect). The result should be your buildings, cut up wherever they cross a grid line. Those pieces should have both the building id attribute and the grid cell id attribute. Open the attribute table use the Field Calculator to create a new field and calculate the area of each ...


2

As dmahr said, this isn't possible but there are workarounds. My normal one is to create a separate legend for those items and use the legend title for your text instead of the layer heading. The title can be centered above all the columns in the legend, unlike the layer name or layer heading. So in your example map, I'd create 3 legends: one for Fire Hazard ...


2

There is no way to stretch the heading across multiple columns using the built-in legend functionality in ArcMap. You could repeat the heading across both columns by splitting your layer into two, but that's probably not desirable. My recommendation would be to hide the layer heading in your legend and use a static text element (e.g. Rectangle Text box) to ...


2

What you could do is within a loop - create feature layers out of your points - then do the point near analysis. As a brief example: import arcpy countries = ['CANADA','USA'] arcpy.MakeFeatureLayer_management('PATH_TO_CITIES_FC','cityfc') arcpy.MakeFeatureLayer_management('PATH_TO_CAPITALS_FC','capitalfc') for country in countries: ...


2

I think I understand what you want to do. For each unique value in "Field", you want to find the most recent date in "Date" and set its value to "Y" in "Flagged_Field". I used your field naming conventions, but you need to avoid using keywords like Field and Date for your field names. import itertools def getGrouper(row): """Key function to retrieve ...


2

this is a sumarize function. You will need to right click on the area field and hit summarize. Then add the value field and sum it. After you complete that you can join that table back to the original data using the id field. NOTE: it is advisable to not use the fid,OID field for your id. Just create a new field and calculate the value from fid into it.


2

You could use the Sum Line Lengths tool from the toolbar: Vector > Analysis Tools > Sum Line Lengths You will receive a polygon output with the sum of all lines within each polygon. Alternatively, you could use the GroupStats plugin (which you can download/install from Plugins > Manage and Install Plugins). I wrote a somewhat similar answer here where ...


2

There is an easy way that needs two steps from the db-manager and two tables that can be deleted in the end(there is a way with virtual tables, but i donĀ“t get them to work properly from the db-manager). go to db-manager and then to virtual layers and select your table with the trees; then start the sql-window Enter into the query field: SELECT ...


1

This is a point clustering problem. I would suggest to: merge two datasets into one feature class (use "Merge or Append") use "Grouping Analysis" tool to cluster the feature class Use "Mean Center" tool to calculate the mean center of your points by setting the "Case Field" as the clusters field. This workflow can be chained either using Python or ...


1

here is an alternative to your solution #store field values in a new list newlist=[] with arcpy.da.SearchCursor(fc, ("valueField")) as scursor: for row in scursor: newlist.append(row[0]) #find the boundaries between classes newlist.sort() limits=[0] for j in range(newlist): if (newlist[j+1]-newlist[j])>2.5: ...


1

Whenever you use an aggregate function with a GROUP BY clause and multiple results are available for the aggregate function, the last of the values is the one that's returned. That's why you're getting "wheat" for the pk_uid 168. What you can do to get the actual Max() value for the correct landuse is use a sorted subquery, and do the GROUP BY in the outer ...


1

The Logistics Issue: There are really two things that you need to get a GIS organization started: The network: There is a greater percentage of public sector GIS employees in the workforce right now than private sector. Therefore, attempts to build a GIS network should focus on inclusion of these employees. In my experience, an e-mail list is the most ...


1

While this isn't really a technical question related to this form, I think it is a really good question. How I would start is to use the power of social media. Begin by making a Google Page and Google Group. If you have people/members in your area that you would like to be apart of it, send them join requests. Now you will have some formality, and a ...


1

you could also use Qspatialite in QGIS. The SQL window is just as Mapinfo one. Up to you after to make your SQL request with a groupby command on the wanted column.



Only top voted, non community-wiki answers of a minimum length are eligible