How to filter out osm data made by specific users - osmosis or a better suggestion

I am trying to find the code for a query in osmosis that will allow me to download only contributions made by certain OpenStreetMap users. I was thinking to use osmosis to filter out all the contributions made by some friends and I, in order to have some metrics on how many edits we made on OSM for a certain project. If anyone has done this in osmosis, or perhaps know of a better way, your advice would be much appreciated. I think the code should look something like this in osmosis, however this particular code is not working:               osmosis --rbf in liberia-latest.osm.pbf --nkv keyValueList="username.JohnDoe1" --wx ourcontributions.osm


How to access the map in QGIS Web Client WEB interface

Once you have done all the instructions in this link below, I can access the WMS in QGIS smoothly http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/ Now how do I get access to the map in the web interface? what would be the way to enter in the browser bar? Modeled this link below WebMap IDEAL O meu projeto esta salvo em: C:\OSGeo4W\apps\qgis\bin\01.qgs Qual seria o meu erro?Once you have done all the instructions the link below, I can access the WMS in QGIS smoothly


Create world file from kml

I have a KML file for a NASA image. I want to create a world file from it so I can use the image in say QGIS. Is it possible to extract the key info (bounding coordinates) from the KML? It seems to be made up of lots of links to smaller tiles of the image There is already another post on here (I can't post any more links, but search for "export-georeferenced-image-overlay-from-kml" which points to **WorldFileTool** and a **KMZ to worldfile** converter The first (WorldFileTool) seems to never link to the all important zip file The second throws an error when I run it. Hence I am a bit stumped. I can georeference it by hand if needs be, but I had hoped the KML might give me the easy answer. Any suggestions would be great.


Maritime route prediction avoiding land masses

I am working on a project where the following functions have to be implemented:   1. Predicting the locations of the ships (in maritime environment) at a future time. (Can be done with Kalman filter, IMM filter and some other algorithms.) Ships can be in any part of the world.    2. Avoiding landmasses during prediction.   3. Finding the shortest paths along the shorelines. I am totally done with the first part which is predicting without considering the shoreline information. I have problems with the functions 2 and 3. **Function 2** At times, the predicted location can fall into the landmass area which is totally unacceptable. I am using the coastal area shapefile http://openstreetmapdata.com/data/coastlines. This file has converted XY values of the world shoreline data. I have loaded this shapefile into postgreSQL and used postgis to read it from the database. My idea is to go through all the polygons (shoreline defined based on polygons) and check whether the line connecting the present location and the predicted location crosses the polygon. If it crosses, that means we have to find where the ship intercepts the shoreline first. But if I follow this approach going through all the polygons, it is going to take forever. (It has around 62000 polygons and each of them has thousands of points). Any advice on this? I thought about initially dividing the world map into hierarchical areas (Level 1: 10 polygons; Level 2: each polygon has 10 polygons inside). But I am not sure how to divide the world map into the levels of polygons I require. Is any functionality of postgis helpful for this? Or any other libraries for this purpose? I believe this kind of functionality should be available already. But I am not able to figure it out so far. **Function 3** Since now we know where the ship intercepts the shoreline first, we can predict its route along the shoreline using the shortest path algorithm given we know the destination information. But to do this, you need to divide the shoreline map into grids so the shortest path can be used. So how can you make grids based on this along the shorelines? I am not doing image processing here. What I have is this shapefile now. Or should I go with some image processing approach and make the grid shorelines? If so please provide some links.


Getting syntax error in Label Expression

I am receiving the SyntaxError: invalid syntax(string, line 26)(last line in this case) when I am trying to make this label expression for use in ArcMap. As far as I can see, everything looks right. I believe the indentations are correct and I've tried them in a few different places to make sure. Any ideas?               def FindLabel ( [SWSID] ):       import arcpy       myDataTable = "Muskoka_100miRadial_Combined" #insert data table name       myComponent = "Muskoka Airport" #insert component name       myScreeningLevel = "50" #insert exceedance  level       myQuerySelect = '"SWS_ID"' + " = '" + [SWSID] + "' and " + '"component"' + " like '" + myComponent + "%'"       myFieldsQuerySelect = "OBJECTID; Tavg_First; Tavg_Last_; Tavg_Perce; SF_First_D; SF_Last_da; SF_Percent; SD_First_D; SD_Last_da; SD_Percent; Rain_First; Rain_Last_; Rain_Perce"       mySortQuerySelect = "SWSID"       myText = ""       mxd = mxd = arcpy.mapping.MapDocument("CURRENT")         for table in arcpy.mapping.ListTableViews(mxd):          if table.name == myDataTable:            rows = arcpy.SearchCursor(table, myQuerySelect, "", myFieldsQuerySelect, mySortQuerySelect)            myText = "<BOL>" + [SWSID] + "</BOL>\n" + "<ITA>" + myComponent + "</ITA>" + "\n"            currentState = ""            for row in rows:              if currentState != row.OBJECTID:                 currentState = row.OBJECTID              if float(row.SF_Percent_Comp) <= float(myScreeningLevel):                myText = myText + str(int(row.Tavg_First)) + ' ' + str(int(row.Tavg_Last_)) + ' ' + str(int(row.Tavg_Perce)) + "</CLR></BOL> " + "\n" + str(int(row.SF_First_D)) + ' ' + str(int(row.SF_Last_da)) + ' ' + str(int(row.SF_Percent)) + "<BOL><CLR red = '255'>" + "\n"+ str(int(row.SD_First_D)) + ' ' + str(int(row.SD_Last_da)) + ' ' + str(int(row.SD_Percent)) + "</CLR></BOL> " + "\n" + str(int(row.Rain_First)) + ' ' + str(int(row.Rain_Last_)) + ' ' + str(int(row.Rain_Perce)) + "</CLR></BOL> " + "\n"              else:                myText = myText + str(int(row.Tavg_First)) + ' ' + str(int(row.Tavg_Last_)) + ' ' + str(int(row.Tavg_Perce)) + "</CLR></BOL> " + "\n" + str(int(row.SF_First_D)) + ' ' + str(int(row.SF_Last_da)) + ' ' + str(int(row.SF_Percent)) + "</CLR><BOL>" + "\n"+ str(int(row.SD_First_D)) + ' ' + str(int(row.SD_Last_da)) + ' ' + str(int(row.SD_Percent)) + "</CLR></BOL> " + "\n" + str(int(row.Rain_First)) + ' ' + str(int(row.Rain_Last_)) + ' ' + str(int(row.Rain_Perce)) + "</CLR></BOL> " + "\n"             return myText:


Unable to load shapefiles fully using shapefile.py

I am trying to load my shapefiles directly via Python rather than loading them from Arc Catalog to ArcMAP. I load these modules first:               import sys     import os     import arcpy     import numpy      Then I add a path using sys.path.insert               sys.path.insert(0, 'C:\\Users\\folder')     import shapefile      I assign a address to my `.shp` file here and load it using the `shapefile.Reader`               Shape_Link = "C:\\Users\\folder\\Nashville_Flood_Extents"     Sat_Img = shapefile.Reader(Shape_Link)      However, when I try to do fun stuff like this               Sat_Extent = arcpy.Describe(Sat_Img).extent      I get errors stating that _Describe input value is not valid type_ . I understand that somehow the shapefile has not bee fully loaded, i.e. when I have ArcMap open, it does not show up in my table of contents so that I can simply use `arcpy.Describe("Sat_Img").extent`. Does anybody know know how I can load the shapefile using Python fully so that it apprears in the table of contents and I can apply methods to it?


Label problem on QGIS

It's my first question here so, I hope not to be too bad at it. I'm using QGIS 1.9.0-Master on mac osx. _I think I have some question and some bug issues, so also posted a message onhttp://hub.qgis.org/._ I've spent my day on a big issue for my work. I'm doing maps of hydrology segments in different parts of France. For that I have 5 layers with different informations. I need a label for each layer, BUT, I need the label of just a few objects (the ones that intercept marinas in my case). With a lot of difficulties I managed to get almost rid of the un-wanted labels... Main 3 problems: In the print composer, labels are not restricted by the frame of my composition, in fact most of the labels are cut. Moving the content of the map, is worst with label moving along. Any advice ? Another bug with labels, when using a character ")" to wrap the label, this character disappear from the label ! I just reported the bug on http://hub.qgis.org/ Last but not least, "hide", "move", "rotate" or "pin" options for labels, are not available in any of my layers.But I can "edit" the label text. Thank you very much. Arthur


st_intersects on postgis

I'm trying to write a command to see whether a given point lies within a multipolygon boundary (in this case, a watershed). I have a table of watershed boundaries and another table with the point I'm going to use to see which watershed the point lies in. Would `st_intersects` be the correct command to run? (if so, how would I do that?). If not, what would be the best command to use? I'm new to postgis/postgresql so any help would be greatly appreciated. Here are what the tables look like: **Table A has point data:** ![enter image description here](http://i.stack.imgur.com/HJiwz.jpg) **Table H has polygons:** ![enter image description here](http://i.stack.imgur.com/ILtsu.jpg)


LAS sample file for electric utility poles

Does anybody know a souce where I can find a sample LAS file that has electric utility poles? Like seen here - http://resources.arcgis.com/en/help/main/10.1/index.html#//015w00000040000000


OSM2PO Routing - reroute when traffic jam

is possible to force osm2po to reroute when traffic jam or other problem is detected on the route ? Or is it possible to tell osm2po routing to avoid some node/way even when it is best route ? thanks Matus ps: i'm not java programmer so i prefer non java solution :-D thanks


I need recommendations for route planning software, preferably open source

While not productivity _per se_ , finding a _solution_ to my specific issue will lead to greater productivity and a better use of my time. As part of my freelance business, I do real estate photography. There are times when I'm trying to pack fifteen shoots into a day, and need to plan the best route between locations, and with travel times, to see if fifteen shoots are even reasonable to accomplish in a single day. Let's assume for this post that I know the amount of time I'll be spending at each location; the only unknown is travel time between locations. I've been loading the addresses into Google maps, eyeballing the best route and rearranging the multiple endpoints, then copying travel times back into an Excel spreadsheet that calculates a timed itinerary for my day. I am annoyed and frustrated that I need to do this, as the multiple iterations of a route can take 30 to 45 minutes to plan out. From my research, I've found route planning and fleet management systems designed for delivery companies that are proprietary and cost-prohibitive. I've also found add-ins for GPSs that can plan routing for "up to five!" destinations. Assuming I have that particular GPS brand and pay for annual software updates. I'm looking for something that would take a list of addresses, load it into Google maps, and spit back the most efficient route with addresses and travel times preferably as an Excel or CSV file. A plus would be the ability to specify "most efficient" by time or mileage, or a fuzzy-logic magic blend of the two. If it were open source, awesomeness. Has anyone ever run into anything that might meet my needs? I've not seen anything...but I may be using the wrong search keys in Google, too. Any suggestions would be appreciated.


ArcGIS Android HelloWorld MapView InflateException

I'm new to ArcGIS Android i'm trying HelloWord app but its giving me exception.. I checked libraries in project build path, Android Tools> Fix Project Properties, ArcGIS Tools> Fix Project Properties This code worked for me in Real device but exception in Emulator.. I did every thing giving here.. i did all these but still same error plz help me to fix it... Here is stack trace.. `07-15 16:44:36.639: E/AndroidRuntime(1600): FATAL EXCEPTION: main 07-15 16:44:36.639: E/AndroidRuntime(1600): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hello/com.hello.HellowordActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.android.map.MapView 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.access$600(ActivityThread.java:123) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.os.Handler.dispatchMessage(Handler.java:99) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.os.Looper.loop(Looper.java:137) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.main(ActivityThread.java:4424) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Method.invokeNative(Native Method) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Method.invoke(Method.java:511) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 07-15 16:44:36.639: E/AndroidRuntime(1600): at dalvik.system.NativeStart.main(Native Method) 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.android.map.MapView 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.createView(LayoutInflater.java:606) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.Activity.setContentView(Activity.java:1835) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.hello.HellowordActivity.onCreate(HellowordActivity.java:18) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.Activity.performCreate(Activity.java:4465) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 11 more 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: java.lang.reflect.InvocationTargetException 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Constructor.constructNative(Native Method) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 07-15 16:44:36.639: E/AndroidRuntime(1600): at android.view.LayoutInflater.createView(LayoutInflater.java:586) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 22 more 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: java.lang.ExceptionInInitializerError 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.map.MapView.a(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.map.MapView.<init>(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 25 more 07-15 16:44:36.639: E/AndroidRuntime(1600): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load runtimecore_java: findLibrary returned null 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.Runtime.loadLibrary(Runtime.java:365) 07-15 16:44:36.639: E/AndroidRuntime(1600): at java.lang.System.loadLibrary(System.java:535) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.core.internal.util.e$1.initialize(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.io.a.a(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): at com.esri.android.map.MapSurface.<clinit>(Unknown Source) 07-15 16:44:36.639: E/AndroidRuntime(1600): ... 27 more `


GeoServer + OpenLayers: How can I sum points in a selected polygon in my WMS layer

I have two layers: one representing admin boundaries (multipolygon), and the other representing population (multipoint). I've made it possible to select a polygon to display. For the displayed polygon, I'd like to display total population, which means summing all the points that belong inside the selected polygon. Any pointers on how to proceed? Thanks in advance.


Why does adding DWG from AutoCAD Civil 3D 2012 freeze ArcMap 10.1?

I use AutoCAD Civil 3D 2012 and ArcMap 10.1. I am trying to add a .dwg file into ArcMap and no matter how I try (drag and drop from Catalog window, Add Data) ArcMap freezes and locks up. Any ideas?


Data-type detection in ArcGIS table loading

When adding tables layers from Excel files, ArcGIS attempts to guess the data- types: > Microsoft Excel does not enforce field types for values during data entry > like standard databases do. Therefore, the field type specified in Excel is > not used in determining the field type exposed in ArcGIS. Instead, field > type in ArcGIS is determined by a scan of the values in the first eight rows > for that field. If the scan finds mixed data types in a single field, that > field will be returned as a string field and the values will be converted to > strings. Does anyone know what heuristic rules are used here?


How to render area that crosses 180°?

The problem is that the Chukotka Peninsula is located in the Western Hemisphere. So it is on the left side of Natural Earth Datasets. It needs to be moved to the right. I tried to use following srs(Coordinate system in which the map is rendered) - centered on 11°E :               +proj=mill +lat_0=0 +lon_0=11 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs      And get this result (notice horizontal straight lines): ![world](http://i.stack.imgur.com/IHfMs.png) Obviously I did something wrong. This is similar unanswered question: http://lists.berlios.de/pipermail/mapnik- users/2009-January/001497.html I have tried some actions from there as well. How can I get the world to wrap around a different meridian? Do I need to process the data through org2org or something? * * * More images with +lon_0=+-15 : ![world1](http://i.stack.imgur.com/5hdrZ.jpg) ![world2](http://i.stack.imgur.com/uUPtf.jpg) Images from linked question from mailing list : ![world3](http://i.stack.imgur.com/qRYMZ.png) ![world4](http://i.stack.imgur.com/OZf56.png) What's the problem with this pictures? How do I make it right?


Open .NET implementation of the OGC Geometry Object Model from Simple Feature Access 1 specification?

I am looking for a .NET implementation of the geometry object model described in _OGS's Simple Feature Access, Part 1_ specification. Preferably lightweight. I don't need WKT support, just the capability of instantiating spatially referenced geometries and the ability to determine basic spatial relationships between them. Any suggestions? Thanks.


Is there a "Tabulate Area" function in QGIS?

I have a raster file about land usage in northern italy (crops / urban areas ecc..) I have defined some buffer zones around some given points of a vector layer and I'd like to calculate the % of those areas occupied by each value of the raster file in order to make an estimate on the average usages of the selected areas (like 70% crops, 30% urban, etc..). I know that in ArcGIS there is a Spatial Analyst function to do so called "Tabulate Area", but I can't find such feature in QGIS. If anyone can help me I'd be so grateful.


How to use Domain Codes set in a Feature Class when opening the Feature Class in MS Access

If I set domain codes on a feature class, does this translate into MS Access as well? For example, I set a domain code and use it on a field in the feature class, I can then go into ArcMap, start an edit session and click on cells in the field and I get the drop down set by the domains. What I want to know is, can you open the feature class in MS access and use that domain drop down? I tried this and the drop down doesn't populate. I'm wondering if there's something I need to enable to get this? Thanks, Mike


How to publish my map on the web?

I want to publish my map is created in QGIS 1.7.4 version on to the web.Can u pls suggest me how to publish the map with proper documentaion and screen shots if possible?


How to integrate OpenLayers and ArcGIS Server?

I am using the OpenLayers JavaScript API within a web application. I am displaying non-base layers hosted on an ArcGIS server. When I load the ArcGIS layers, I load them using OpenLayers.Layer.ArcGIS93Rest and by specifying the export service URL. The layer loads perfectly. However, when the user clicks on a feature, I want to be able to display a popup showing information about the feature that the user clicked on. Can anyone explain the best way to retrieve feature information? Thanks in advance!


Are there tools in ArcGIS for drawing compass bearings, and which projection should be used to create a map showing them?

I have a requirement to create a map (or multiple maps) showing four different locations with a bearing compass drawn around each one, oriented towards Grid North. I was told that each of the original four points will need to have a circle centred on it, with ticks representing 360 degrees. 0 degrees will be pointing to Grid North. The idea is that if one of these locations was in Toronto, Canada (let's say) the student could take a string with one end on Toronto, have the other end of the string on London, England, and be able to tell you that it's something like "The direction from Toronto to London is 19 degrees from North" (this is an example, I don't know if this is true or not). ![image](http://i.stack.imgur.com/CUT7j.jpg) I'm confused about how to do this on paper, but perhaps I'm just over-thinking things. **Can I use the Vertical-Perspective projection?** Gnomonic is highly distorted a large distances which is what this map will have to show. I read that Vertical-Perspective is similar to Gnomonic, and that Gnomonic preserves true direction, but haven't come across anything saying that Vertical- Perspective preserves true direction. **Is there a tool in ArcGIS that I can use to generate the compass?** I've drawn them manually, but if there was a tool to generate it, I would be high appreciative.


I have a shapefile containing three types of polylines, how can I color each type with different colors?

I have a shapefile containing three types of polylines, how can I color each type with different colors ?


Get tag/feature/landuse meta information for latitude longitude in openstreetmap

I need the possibility to find the underlying ground information of a given location (set by latLng) - not an area! I already tried the nominatim reverse search, but it lacks the landuse information. Here's an example query: http://nominatim.openstreetmap.org/reverse?format=json&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1 How do I enforce the output of the landuse here, which would likely be "residential"?


GDAL C/C++ API and filtered pyramid tile generation

I have been tasked with adding functionality to an existing C++ developed toolset whereby a source dataset (typically a single GeoTIFF) needs to be split into tiles at various resolutions ('zoom' levels). Obviously this necessitates the generation of pyramid tile sets. Being completely new to the world of GIS I am finding there is quite a learning curve, hence would be grateful of any guidance with my particular problem. So far I have developed a routine that generates the pyramid, and this is very much based on the gdal2tiles Python script. However, this made use of the RasterIO API calls and consequently the resulting tiles don't look so good when scaled down - i.e. very blocky and akin to a 'nearest-neighbour' sampling method. My question, is there a method (exposed via the C/C++ API) that allows me to generate these tiles with bilinear or cubic filtering automatically? Or do I have to interrogate the band data myself and write the appropriate filtering kernels? Due to the restraints imposed, I am unable to make use of the Python scripts and have to realise this functionality purely through the C/C++ API.


Filtered list in ArcGIS toolbox

My goal is to grab a bunch of feature classes, select the first feature class, list the fields, and return that list to parameter 1 as a filtered list. My ArcGIS toolbox is setup with 2 parameters. The first parameter is a multivalue featureclass The second parameter is a string with filter set to: "Value List" which is empty. I'm hoping to populate this. When I run the following code:               def updateParameters(self):              if self.params[0].value: #when user inputs feature classe(s)                fcs = self.params[0].value.value # getting list of fcs as string?                spl = fcs.split(";") #splitting list of fcs                fields = arcpy.ListFields(spl[0]) #getting list of fields from 1st featureclass                self.params[1].filter.list = fields #return list of fields to param 1      When I input the fcs into param 0, I get this error: ERROR updateParameters Execution Error: Runtime error : 'ValueTable' object has no attribute 'value'


Boundless OpenGeo Applications: ERROR 404

I've installed Boundless OpenGeo Suite on my Win7 64-bit machine. OpenGeo Jetty and OpenGeoPostgreSQL services are up and running. Apache and Tomcat are also installed and running (XAMPP). I can enter Boundless PgAdmin and work on databases. Web page localhost:8080 return Apache Tomcat Home.   But if I try to access Boundless GeoApplications, an error occurs: > **localhost:8080/dashboard return HTTP Status 404 error: The requested > resource is not available.   >  localhost:8080/geoserver return HTTP Status 404 error: The requested > resource is not available.   >  localhost:8080/geoexplorer return HTTP Status 404 error: The requested > resource is not available.   >  localhost:8080/geowebcache return HTTP Status 404 error: The requested > resource is not available.   >   >  ** **EDIT:** I read a similar post, but the OS was Linux, I use Win7 instead and I do not know how to fix the procedure. Also in my case, if I install GeoServer as separate service (from geoserver.org) it works fine.      Please can anybody help me? Thanks in advance


How to apply a specific Rendering to an Image and export to JPEG?

We have a specific process which generate an interpolated single band 32-bit Float Raster in Erdas Imagine (.IMG) format. This process generates an image every hour. We wish to apply a specific stretched renderer, which stretches from Green to Red, to the single band raster and then save it as a JPEG file. I have found that it can be done through the UI in ArcMap by applying the .lyr file, and then exporting to JPEG 2000. The Jpeg 2000 is converted to the regular JPEG image by python. We now want to automate this process and run it using some open source or free tool. Is it possible to do something like this in GDAL or some other command line tool?


IFeatureDataset.CreateFeatureClass Error

I'm working on a webservice in ArcObjects 9.3. It works fine when deployed on IIS, but when I try to debug some unit tests I keep getting the same error: > The remote procedure call failed. (Exception from HRESULT: 0x800706BE) The error occurs when calling the CreateFeatureClass(..) method throught the IDataset interface.               public void CreateOutputFeatureClass(string featureClassName)         {             var masterFeatureClass = Helpers.GetMaster(Session, ServerContext);             IFeatureClassDescription fcDesc = new FeatureClassDescriptionClass();             var ocDesc = (IObjectClassDescription)fcDesc;             var featureDataset = featureWorkspace.OpenFeatureDataset(Session.Dataset);             featureDataset.CreateFeatureClass(featureClassName, masterFeatureClass.Fields, ocDesc.InstanceCLSID,                 ocDesc.ClassExtensionCLSID, esriFeatureType.esriFTSimple, masterFeatureClass.ShapeFieldName, "");                     }      Based on other posts I have been reading about this error this has something to do with user permission, but I am not sure.


How is device-responsive layer selection working for you?

I ran into problems getting layer selection to work with data categories that I didn't document well in this process, but I would just like to show my results here in case people are interested in adding responsive navigation buttons to their maps. Here is my result: http://jsbin.com/sihayino/4/edit (Ultimately, I'd like to add a custom base map—still figuring out how to keep the delicate balance I have here while adding that icing to my cake). Has anyone a better method for incorporating layer toggling for viewing map layers on mobile devices/tablets? If not, it's no big deal. I'm pretty ok with this.


Overlay Vector Layer on Raster Layer

How can I overlay a Vector Layer on a Raster Layer and assign NoData Values on the Raster where the Vector Layer does not cover the Raster Layer? (preferable with ArcGIS)


OpenGeo Client SDK set up for Windows 7 - what is ant path?

I am relatively new at this and so these questions may seem a little basic to most. I have installed the OpenGeo Suite which includes the Client SDK on Windows 7. I have also installed JDK6. But I am not sure how to proceed with the following: "This machine also requires Apache Ant installed and on the path. To verify this, type ant -version at a terminal prompt." What is meant by 'on the path'? And do I install Apache Ant binary or Source? "The instructions below assume that you have added the bin directory of the Client SDK to your system path. This will allow you to run the suite-sdk command from anywhere on your file system." What exactly is meant by system path? Thanks in advance for any suggestions!


How to deploy custom .dll commands in ArcMap 9.3.2?

In ArcMAp 9.3.2, I am trying to bring in an acreage calculator .dll buttom that I have used on previous versions. The .dll doesn't show up on the list of available custom addons. Is this a registration problem? I'm at a loss of what could be causing the .dll to not be available on the list.


ArcMap- Create a symbology from RGB with colors name

I have a number of features loaded on a mxd I would like to create a script or model builder to assign each row containing a value in the coloum "ENTE" with a RGB color which must be represented in the map and the corresponding color name (unique). The solution could be to have a dBase file attached that contains the RGB values in a column and in the other, the name of the color. In dBase file will contains about 3000 lines in which the colors are repeated in groups of 20 (ie, have a base of 20 colors) I can not understand how I could assign color and assign its name to the single feature not randomly. thanks


ArcGIS Statistics tool problem

I have an excel file for average rainfall by month and I added that on ArcMap. while I tried to check the statistics the tool is passive for last 3 months and I checked the data on arcmap, they are aligned left instead of right. I can check the statistics for those which are right aligned but not for left aligned. Anybody can suggest me why they are left aligned. I did multiple times for this with different sheets for same data but the result is same. Thank you


How to compare two sets of points in QGIS?

I have two point layers with XYZ data; one set are points measured in the field and the second set is a Lidar data set. I want to check the accuracy of the Lidar in comparison to the measured data.   Is there a way to do so without creating grids? That is, comparing the vectors and not the rasters? Note: I found similar questions but either there was no answer or it referred to ArcGIS for Desktop.


How to get sql error from postgis when a plugin fail to load vector layer?

I am writing a plugin for qgis that load a sql layer from postgis database. I am disappointed that when the layer fails to load i can't find a way to get the sql error message from database server. The only way is to have a look to QgsMessageLog. Is there a way to get it from python?


Is there any autocomplete filter widget for QGIS connecting to PostGIS?

In QGIS, there is Value Relation widget for fields, that contain references to data in external tables or views. While it works fine for small number of choices, it can quickly become overwhelming, if there are many of them (e.g. when trying to relate multiple businesses with one map item. It seems, that this is a case for autocomplete widget, similar to http://ivaynberg.github.io/select2/ but I am not aware of such a widget and Google didn't help me. Do you know about such plugin, or should I turn to custom programming?


Leaflet Marker Dragend Bug/Difficulty

I am having a problem with leaflet markers. The problem is that when I drag a marker with a lower z-index under another marker with a higher z-index and let it go, it makes another marker. I have a click event that adds a marker to the map when I click it. Any help is greatly appreciated. This happens in Chrome and Internet Explorer 11. This does not happend in Firefox. Another problem I noticed was that when I would drag a marker outside the browser window and relase in Firefox, it would mess up things up. JSFiddle http://jsfiddle.net/eaflores/x9JzP/


Python: how to create a point shape-file from a text file

_I'm writing a python code to read the points in a **polygon shape-file** and save them in a **point shape file**._ **I'm not sure about my approach so if you have a better idea (even if it is totally different from mine) please let me know.** So first I made a text file and stored the points' (x,y) in that .txt file. then I tried to make a **point shape-file** from the text file but it gave an error.   here is the code (just the last part):               creat point shape-file from text file      import fileinput     import string     import os     env.overwriteOutput=True     outpath="C:/roadpl"     newfc="newpoint.shp"      arcpy.CreateFeatureclass_management(outpath, newfc, "Point")     infile="C:/roadpl/roadL5.txt"     cursor=arcpy.da.InsertCursor(newfc, ["SHAPE@"])     array=arcpy.Array()     for line in fileinput.input(infile):         point.X, point.Y = line.split()          line_array.add(point)     cursor.insertRow([arcpy.Point(array)])     fileinput.close()     del cursor      Here is the error:               Traceback (most recent call last):       File "C:\roadpl\P_Code_L5", line 49, in <module>         point.X, point.Y  = line.split()       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\_base.py", line 87, in _set         return setattr(self._arc_object, attr_name, cval(val))     RuntimeError: Point: Input value is not numeric      I made the input file (.txt file) from a polygone shapefile using:               cur = arcpy.SearchCursor("C:/roadpl/L5P.shp", ["SHAPE@"])     f=open("C:/roadpl/roadL5.txt", "w")          for row in cur:              geom = row.shape         row = geom.getPart()         for part in row:             for point in part:               print >>f, (point.X, point.Y)     f.close()


Extracting data from Natural Earth using GeoTools java class?

I wrote a small java class to extract country boundaries from naturalearthdata.com data. My problem is that the coordinates do not match with OSM map, the whole polygon is shifted... e.g. according to the data extracted, the most southern point of Czech Rep. is 48.557915752000014,14.31574589000013 and here it is displayed on openstreetmap, about 1km far away from what I expect: http://www.openstreetmap.org/search?query=48.557915752000014%2C14.31574589000013#map=14/48.5579/14.3158 If I understand well, OSM uses wgs84, naturalearth uses wgs84 so I don't need to do any transform ? Is there something that I am missing? Here is the class:                   import java.io.File;         import java.io.IOException;         import java.net.URL;         import java.util.ArrayList;         import java.util.Iterator;         import java.util.List;              import javax.imageio.ImageIO;              import org.apache.log4j.Logger;         import org.geotools.data.FeatureSource;         import org.geotools.data.shapefile.ShapefileDataStore;         import org.geotools.feature.FeatureCollection;         import org.geotools.feature.GeometryAttributeImpl;         import org.geotools.geometry.jts.JTS;         import org.geotools.geometry.jts.JTSFactoryFinder;         import org.geotools.referencing.CRS;         import org.geotools.referencing.crs.DefaultGeocentricCRS;         import org.geotools.referencing.crs.DefaultGeographicCRS;         import org.opengis.feature.Feature;         import org.opengis.feature.Property;         import org.opengis.geometry.MismatchedDimensionException;         import org.opengis.referencing.FactoryException;         import org.opengis.referencing.crs.CoordinateReferenceSystem;         import org.opengis.referencing.operation.MathTransform;         import org.opengis.referencing.operation.TransformException;                   import com.vividsolutions.jts.geom.Coordinate;         import com.vividsolutions.jts.geom.CoordinateSequence;         import com.vividsolutions.jts.geom.Geometry;         import com.vividsolutions.jts.geom.GeometryFactory;         import com.vividsolutions.jts.geom.LineString;         import com.vividsolutions.jts.geom.MultiPolygon;         import com.vividsolutions.jts.geom.Point;         import com.vividsolutions.jts.geom.Polygon;         import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;              public class Converter {             static Logger logger = Logger.getLogger(Converter.class);                  static void extract(Feature feature,String iso2) throws Exception{                  logger.info("extract "+iso2);                       GeometryAttributeImpl geometry=(GeometryAttributeImpl)feature.getProperty("the_geom");                  MultiPolygon multiPolygon=(MultiPolygon)geometry.getValue();                  logger.info("polygons:"+multiPolygon.getNumGeometries());                            for(int i=0;i<multiPolygon.getNumGeometries();i++){                       logger.info("---------------------------");                       logger.info(iso2+"-"+i);                       Polygon polygon=(Polygon) multiPolygon.getGeometryN(i);                            LineString lineString=polygon.getExteriorRing();                       logger.info("points: "+lineString.getCoordinates().length);                                 System.out.println("points for "+iso2+"-"+i);                            Coordinate min=lineString.getCoordinates()[0];                       for(Coordinate coordinate:lineString.getCoordinates()){                            System.out.println(coordinate.y+","+coordinate.x);                            if (coordinate.y<min.y)                             min=coordinate;                       }                            System.out.println("min="+min.y+","+min.x);                  }             }                                 static void extract(String shapefile,String nameAttr,String nameMatch) throws Exception{                   ShapefileDataStore ds = new ShapefileDataStore(new URL("file://"+shapefile));                   FeatureSource fs = ds.getFeatureSource();                   FeatureCollection fc = fs.getFeatures();                        logger.info("features found:"+fc.size());                   Iterator iterator = fc.iterator();                        while (iterator.hasNext()) {                       // Extract feature and geometry                       Feature feature = (Feature) iterator.next();                           Property propertyName=feature.getProperty(nameAttr);                      if (propertyName==null){                          logger.error("property "+nameAttr+" not found. valid properties are:");                          for(Property property:feature.getProperties()){                               logger.info("  "+property.getName());                             }                           }                      showProperty(feature,"NAME");                      showProperty(feature,"ISO_A3");                           String name=((String)feature.getProperty(nameAttr).getValue());                      logger.info("found "+nameAttr+"="+name);                      if (nameMatch.equalsIgnoreCase(name) || name==null)                          extract(feature,name.toLowerCase());                        }             }                       static void showProperty(Feature feature,String what) {                 Property propertyNameName=feature.getProperty(what);                  if (propertyNameName!=null)                      logger.info(what+":"+propertyNameName.getValue());                  else                      logger.info(what+" not set");             }                       public static void main(String ... args) throws Exception{                    logger.info("start");               extract("/material/naturalearthdata/ne_10m_admin_0_countries/ne_10m_admin_0_countries.shp",                       "ISO_A3","cze");                  }


vb.net arcobjects validate topology ITopologyExtension and esriTEEventHint not declared

I am trying to use arcobjects with vb.net to validate a topology (already defined). I am caught even when I use the sample provided by ESRI. The code I use for accessing a topology is:               Dim topoUiD As UID = New UIDClass     topoUiD.Value = "esriEditorExt.TopologyExtension"     Dim topologyExt As ITopologyExtension = CType(m_application.FindExtensionByCLSID(topoUiD),      ITopologyExtension)     Dim topology As ITopology     topology = CType(topologyExt.CurrentTopology, ITopology)      The code I use for selecting errors is as follow:               topologyExt.ClearActiveErrors(esriTEEventHint.esriTENone)     topologyExt.DelayEvents(True)     While Not ((topoError = eErrorFeat.Next) Is Nothing)         topologyExt.AddActiveError(topoError, esriTEEventHint.esriTENone)     End While     topologyExt.DelayEvents(False)      I get the following errors: (1) ITopologyExtension is not declared (2) esriTEEventHint is not declared I want to check what is missing in the code? Is it the arcObjects library, if yes, what library should be used. I am a beginner in arcObjects. Please help me on it, thanks.


QGIS web client: "Object Identification" initially toggled on

I'm running a QGIS web client and a QGIS server. I want to modify the initial settings of the QGIS web client so that the "Object Identification" mode is toggled on from the beginning (just like someone clicked the according button). I believe this can be solved with one simple command at the right place but I don't know JavaScript and couldn't solve it by trial and error until now. Does anyone know how?


esri google maps api - Create a single GPolyline from an array of features

I'm using the esri google maps extension api... I have a **esri.arcgis.gmaps.FeatureSet()** (of type esriPolyline) containing an array of features ( **esri.arcgis.gmaps.Feature()** ). Is there a simple way to create a single GPolyline from the array of features? or since feature[i].geometry is a GPolyline, I guess I am asking is there a simple way to create a single GPolyline by joining/merging multiple GPolylines? nb: The features returned from arcgis are not ordered... so I have to re-order the features before creating the GPolyline...


How to publish model in toolbox as Geoprocessing Service?

I am using ARCGIS 10.0. I have created a model . This models takes three shape files and return the result in the form of shape file. I run this model and found it works fine and a shape file is created and visible in the result window and I can add it to my table of contents window. I then publish this model as a Geo-processing service and then accessed this service. The model runs successfully as the message from the server is submitted executed and successful. There are four files created in the arcgisjobs directory of the server definition, message , result and status. These are .DAT files of which the result file is largest. However I cannot see any shape file created neither in the result window nor in the arcgisjobs. The only thing I can see in the result window is that name of out file with message . I added this to my table of contents and upon looking at its properties found that it has a type of inmemory feature class, however, it does not contain any data. What do I need to do so that the output will have some data. regards nadeem


Unable to load the GADM data in QGIS

I have downloaded the shapefile of Mexico's Admin Boundaries from the GADM site but I am not able to load it in QGIS. It keeps giving me the following error, > /Users/smaranh/Downloads/MEX_adm/MEX_adm2.prj is not a valid or recognized > data source But I simply downloaded the shapefile and loading it in the QGIS, then why is there a problem with the projection? Can somebody guide me pls?


Get extents of vector shape features in python

i am just wondering if it is possible to iterate through vector features and return the extent per feature without clipping the vector shape? The code looks like this and comes from the PyQgis-Documentation. How can i return the extent of every vector feature in a loop.               provider = vector.dataProvider()                 feat = QgsFeature()                 allAttrs = provider.attributeIndexes()                 provider.select(allAttrs)                 while provider.nextFeature(feat):                     geom = feat.geometry()                     # --> return extent or (xmin,ymin,xmax,ymax) ?


How to open existing sqlite DB in QspatiaLite plugin?

Using QspatiaLite plugin in QGIS I'm able to create a new database and work with it (load/edit/import/export data). But how can I add a connection to an existing database? How to add an existing database to the drop-down-menu of the available database connections?


Storing Shapes in database

What is more effective? Storing Shapes as shape column (http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/topology_basics.htm) in database? Or maybe store shapes in seperate tables and join them?


Editing represetation question

I'm new with editing so I need help. I have several lines (one feature class) which share the same location (cables) but I want to represent them as lines that are next to each other because they have different properties. How exactly do I do that? Using representation rules? What if we're talking about two different feature class? I use ArcEditor licence, ArcGis 10. Thank you


How to load Ordnance Survey OpenSpace in QGIS?

The version of gvSIG that I have on my Android tablet will load OS OpenSpace layers and I wonder whether or not it would be possible for QGIS desktop to do the same? And if so, how? I have my own OpenSpace API key. This appears to be the (long) line in gvSIG's 'layers.txt' file that does the job of fetching the layers: > 101|Ordnance Survey (UK) > OpenSpace;6[>],http://openspace.ordnancesurvey.co.uk/osmapapi/ts?FORMAT=image/png&KEY=#KEY#&URL=#URL#,image/png,11,0,200,0.0,0.0,0.0,0.0,1000000.0,1000000.0,EPSG:27700,2500.0:1000.0:500.0:200.0:100.0:50.0:25.0:10.0:5.0:4.0:2.0:1.0, > ,1.1.1,88013ECD7A8F379FE0405F0ACA607F60:8824326E25F94E17E0405F0AC86047BC,http://www.prodevelop.es/maps/map.htm|http://www.gvsigmini.org/maps/map.htm


FME: No attributes exported when writing to SHAPE file

**Setup** :   I have some input data (SHAPE) which I use a _Clipper_ transformer on. Depending on the result of the Clipper, I assign a value to an attribute. In the end I assign the two results/streams to a SHAPE _writer_. **Problem** :   When I run the project my resulting SHAPE file has no attributes. **Observations** :   * If I open my output (by clicking on the arrow/triangle next to the OUTPUT) on the transformers before my writer, the attributes are available and the same for both the streams.    * If I select _Fanout By Attribute_ in _Properties_ in my writer, all my attributes are available. If I select the _User Attributes_ tab, no attributes are listed. Through these observations, my attributes seems valid _(supported by the transformers and the Fanout)_ and unique thus I see no reason why the writer shouldn't export them. **Solution** :   Like **GIS-Jonathan** suggest, I have added my writer and selected the _static schema_. Then I right click my writer and select _Copy Attributes From ..._ and select the desired source. Now I have all the attributes I want.


Feature to Line on feature selections with ArcPy

I'm trying to collapse parallel polylines (dual carriageways in a shapefile of roads) to single centrelines. I'm aware of cartography's dual lines to centerline tool, but I find Feature To Line (Data Management) slightly more reliable. The challenge is that whichever function is used requires a large tolerance (e.g. 10m+) so must be applied to custom selections of data in order to avoid creating new artifacts between unrelated pairs - hence the need for custom selections, which as far as I can tell these functions can't handle. Grateful for any advice from high ArcPy wizards on how best to approach this. I'm pretty new to ArcPy so any advice on e.g. creating temporary layers to work with would be very helpful. As a starting point please just assume a polylines shapefile. The planned workflow is to rejoin these with the other road data once they've been collapsed. Many thanks in advance.


Synchronize Google Earth to ArcMap and vice versa

I found this old script that worked okay in 9.3, but since I've upgraded to 10.1 the VB code can't work. It basically allows you to quickly pan in Google Earth to find a feature, then you click on a button and it pans ArcMap to your current extent in GE. Does anyone know of a python script that will accomplish this?


Sum of point attributes inside hexagons using QgiS UI

I'm very new to Qgis so I would very much appreciate any help you can give me. I have a point shapefile that corresponds to locations of animals captured. I've joined a table to this shapefile with additional information on each attribute, namely nb. animals caught in each point. I have another shapefile (hexagonal grid) and my goal is to sum the nb. animals caught for each point that falls inside each hexagon. In a preliminary search on the web, I found that maybe "join by location" could help me do this, but the problem is that I'm getting an "incorrect field name" error, for a field that doesn't even exist in any of the original tables and, on the other hand, it won't let me select the specific field I want it to sum.. Any suggestions? Is there any way I can do this without going into writing scripts mode? Thank you very much. Catarina


Why are attributes missing in overlay tab QGIS 1.8.0?

I want to add a diagram overlay onto a shapefile layer. When I look at the attribute table, all the correct columns are shown. However, when I open the layer property box, the attribute columns I want to display are not available in the drop down list. Would this be because there are some NULL values in the attribute table? How do I get around it?


How to create a grid whose vertex coordinates are shown on an attribute table in Arcmap?

I have a specific area to study. Before starting on my field work, I have to create a 310m X 310m grid of the area. Later on I have to get the coordinates of each point of the grid in an attribute table (each angle of each square!). I tried `fishnet`; but first, it does not cover the area exactly (there are a lot of rectangles outside of the study area); second, when I tried to get the x, y coordinates, it gave an error message (the calculated value is invalid for the row with ObjectId=0...); and third, the output shows the centers of each rectangular polygon, which I do not need. I am a newcomer to the field, so any help regarding my problem will be deeply appreciated. (I hope I have narrated my problem well.)


How to snap Vector Layer projection to Raster layer projection in QGIS?

I have raster in correct projection. I used ShapeFiles, and marked objects(manually), but i found out that my vector layers have different projection, so they have different size and position. Is there a way to correct it using QGIS functional? Thats what i see http://cs408121.vk.me/v408121585/1099/RIWFC75E7Ec.jpg Then i tried to convert vector projection to raster projection and got that: http://cs408121.vk.me/v408121585/10a9/J3yKLpdfCV0.jpg I hope files are not blocked by social network.


Change text format and visibility

I need better visible names of towns, because at the big scale is bad reading --> i want to setting visibility and format. For example name "Ústí nad Labem" is good visible but another big city in my country are less visible than i want. It is possible change format and visibility ? I use OSM as source.


How to share a hosted feature service with an application on ArcGIS Online?

According to the ESRI REST API documentation on authentication, a registered application can log in to AGOL via an App ID and App Secret and will then have access to the data that has been shared with it. > Applications that target end users who are unknown to the ArcGIS platform > use app logins to connect to the platform. In this case, the application > must use both an APPID (OAuth 2 client_id) and an APPSECRET (OAuth 2 > client_secret). You are responsible for building the application in a way > that keeps the APPSECRET secret, including from malicious users who download > and inspect the iOS or Android application or view the source of the > JavaScript application using developer tools. A malicious application that > has access to the application's credentials (APPID and APPSECRET) can access > billable services on ArcGIS, which will be billed to the application. For > most JavaScript, iOS, and Android applications, this implies that the app > must have a server side application component that keeps the application > credentials secure and performs work on behalf of the app. > > The server side application component that has access to the application's > credentials can obtain a token using a single request. The OAuth 2 grant > type is set to client_credentials. The actual POST request is made to the > portal's OAuth 2 token endpoint. > > For arcgis.com:               https://www.arcgis.com/sharing/oauth2/token      > Parameters:               client_id=APPID&     client_secret=APPSECRET&     grant_type=client_credentials      > Successful authentication directly returns a JSON response containing the > access token that allows the application to work with resources that are > accessible to the application (that is, have been shared with the > application). Use of the client_secret as previously described is mandatory. In the section above they specifically mention `"resources...that have been shared with the application"`. I have not found anywhere in any documentation how to actually share resources with an application. How do I share a hosted feature service with a registered app so that my app can access secured services without my users logging in?


QGis raster terrain analysis - The curvature filter puzzles me

I am a french Master student at university Grenoble INP, and during my master project I have worked on DEM (raster) terrain analysis. Thus, I have read the source code of several QGis-1.7.4 raster filters computing slope, aspect and curvature. There is a formula in the filter computing the total curvature that puzzles me. The source file is in the current version of QGis, with the following path: qgis-1.7.4/src/analysis/raster/qgstotalcurvaturefilter.cpp The purpose of this filter is to compute the total curvature of the surface in a nine-cells window. The function code is as follow:               float QgsTotalCurvatureFilter::processNineCellWindow(         float* x11, float* x21, float* x31,         float* x12, float* x22, float* x32,         float* x13, float* x23, float* x33 ) {            ... some code deleted ...            double dxx = ( *x32 - 2 * *x22 + *x12 ) / ( 1 );       double dyy = ( -*x11 + *x31 + *x13 - *x33 ) / ( 4 * cellSizeAvg*cellSizeAvg );       double dxy = ( *x21 - 2 * *x22 + *x23 ) / ( 1 );            return dxx*dxx + 2*dxy*dxy + dyy*dyy;     }      I'm ok with the "dxx" formula, and with the return expression. But I think that the "dyy" and the "dxy" formulas are inverted: this makes the total result asymmetric regarding x and y dimensions. Am I missing something or should I replace the double derivatives expressions by:                 double dxx = ( *x32 - 2 * *x22 + *x12 ) / ( 1 ); // unchanged       // inversion of the two following:       double dxy = ( -*x11 + *x31 + *x13 - *x33 ) / ( 4 * cellSizeAvg*cellSizeAvg );       double dyy = ( *x21 - 2 * *x22 + *x23 ) / ( 1 );       return dxx*dxx + 2*dxy*dxy + dyy*dyy; // unchanged      Could you tell me your opinion on these formulas, if they are incorrect as I thought or if I am wrong? In this last case, do you know why the formulas have to be asymmetric regarding x and y? Thanks! Best regards


Does QGIS have these CAD editing functions?

I tried QGIS for the fist time today and it seems quite capable for the task that I have in mind. However, I really miss some basic editing functionality from another GIS software that I have to use at work:   1. When creating a point or a node of a line or polygon, I expect to be able to right-click somewhere, get a context menu, and select an option that gives a dialog box that lets me **edit the coordinates**. It is filled with the coordinates where the cursor was when I right-clicked (after snapping). I can change the values or just accept them and press enter to create the point/node.     2. An **orthogonal tool** , where I fist place a base line between 2 points and then right-click somewhere, get a context menu, and select an option that gives a dialog box that lets me edit the abscissa and ordinate. It is filled witht the values where the cursor was when I right-clicked (after snapping). I can change the values or just accept them and press enter to create the point/node.     3. When creating a node of a line or polygon (except the fist node), I expect to be able to somehow tell the program that I want the **node to be placed on a line** that passes through the last point that i created in the line or polygon, and is parallel or orthogonal to another line that I pick.     4. **Trim and extend** tools. When a line or polygon is selected and the trim tool is active, clicking on another line or polygon should delete the part of the clicked line or polygon that is on that side of the selected line or polygon. When instead the extend tool is active and the end of a polygon is clicked, it should be extended until it reaches the selected line or polygon. These are features that I use all the time and find it very difficult to work witout. Have I just overseen them in QGIS or are they just not implemented yet?


ArcGIS vs. MapInfo vs. GeoServer

I want to bring up this question (again?). This may not be a burning question as it used to be. I have used ArcGIS for several years. It is the well-acknowledged leader in the GIS market, constantly pushing new technologies and architecture change, releasing new APIs for easier development, moving into 3D, build rich symbology, active and wide user community. It has its peculiarity, but does provides the most comprehensive products to build your solution. I know very little about MapInfo. However, What I recently have learned about MapInfo suggests MapInfo is not as bad as I imagine. It has a suite like ArcGIS. MapInfo Pro is probably equivalent to ArcMap. Geocoding provides USPS- certified addresses. Routing J Server provides routing. MapXtreme 2008 using the Pictometry Navigator TM API delivers bird's eye view. But I feel the architect is old: not SaaS, still on SOAP, mainly server-based, making the front-end rather static. The company is not doing well and the SW dev is hurt. No upgrade on MapXtreme since 4 years ago?! To me GeoServer seems a simply a mapping server or platform. Besides mapping, you will have to write most things yourself. It's good for some non-GIS folks to add some maps to their sites. Even mapping, the symbology is limited and editing SLD is such a pain. Cheap or free is good, but you end up paying for writing the code if you want to do something sophisticated. A little disappointing, to be honest. Anyone interested in adding/commenting/arguing?


How to add attribute data up?

_Sorry if this question is too simple/easy for you guys, but I'm still learning QGIS and pretty much teaching myself where I can._ **Is there a way to add data from 2 columns into one new column inside QGIS ?** I have cattle population for each province in a certain country, and buffalo populations for each province in another column (I entered all these manually) - what I'm looking to do is to make a new column (within the same shapefile/database) that combines both cattle and buffalo populations in each province. I've tried using the field calculator, get error messages all the time - not sure if I have my functions wrong. With the field calculator, I've been trying to enter a simple function of               Catt Pop + Buff Pop      with a new output field as Real number data, but I get error messages such as: "Invalid expression syntax. The error message of the parser is: 'syntax error, unexpected COLUMN_REF, expecting $end'" Secondly - if I can't do this in QGIS, is the only way to open the relevant dbf file in open office and then edit it and then save and load again? From the manual that I read to learn GIS, this can be done but is not recommended (by the guys who wrote the manual) - does anyone have any links to any foolproof guides on how to do this anyway since I've never done it? Thank you so much for your time.


How to set up a Workspace setting in Geoserver using Curl

I have successfully created a workspace + store + raster layer in Geoserver using Curl in PHP. If I go back to Geoserver's UI and enter the Workspace that I have just created, the Settings: 'Enable' and any of the 'Services' are UNchecked (empty). I would like to enable them by using Curl. If you visit: http://docs.geoserver.org/latest/en/user/rest/examples/curl.html# Apparently the only -simplest?- way of creating a workspace in geoserver is by using the XML tags: `<workspace><name>your name</name></workspace>` If I try to add new tags to the XML expression above, such as for instance `<enabled>True</enabled>` it gives you an error. `[500] No such field org.geoserver.catalog.impl.WorkspaceInfoImpl.enabled` So, Have anyone successfully configured those options of the Workspace by using Curl? For instance enabling WMS Services for that workspace? By the way this post does not help too much: Is it possible to select a service (WMS / WFS) through the Geoserver REST-API?


Good algorithm to detect "wrong" features in a vectorial coverage

I am working with a bunch of shapefiles. Each shapefile consisting in rectangles with an integer attribute representing the strength of a signal. I serve these vector files as overlays on a base map, applying different colors based on the integer attribute (like a heat map, or a coverage map). I have a problem with data: it contains "holes". The term "hole" here can be easily explained with an image: ![Holes in the data](http://i.stack.imgur.com/A9BFV.png) That is a screenshot of a portion of my data loaded in QGIS. I've applied a simple style: just use orange for a range of values between X and Y. Otherwise, no color applied. The white squares surrounded by blue circles are probably measurement errors. Each square represent 250m in the real world. It doesn't really make sense getting a measure of X in a point (i.e.: -55 dbM) and 250 meters beyond a value way lower (or higher), out of the represented range. So, I'm basically looking for an algorithm to "detect" this pattern: One vector containing a integer value of -10000 (the "anomaly") but surrounded by vectors containing "normal" and coherent values. I want to avoid a simple dumb loop, checking all the vectors based on their position. I manage several GBs of data, and this can take forever. Is there any known algorithm to detect this kind of problem in vectorial files? **UPDATE** : There are some suggestions in comments. But I missed one important part: the space that surrounds the shapefile (the big white space around the shapefile) is considered "water", and a value of "no coverage" is allowed. So, I just need to get rid of the small holes (in blue in the image), but keep the surrounding space unchanged. That makes things more difficult... Many thanks in advance


Securing ArcGIS Server 10.x On .NET - User Store Point At LDAP

I have the fun job of securing ArcGIS Server, and one of the requirements is to use LDAP for authentication and authorization for services... For ArcGIS Server installed on Java backend it looks to be a very simple task - LDAP is an option under User Store section. It does not appear to be as straight-forward for .NET backend. I know that I need to set up a custom ASP.NET membership provider in the ArcGIS Manager applications config file, but thats about all I know. I've thoroughly searched ESRI's site for any type of "how-to" with no luck. I am hoping someone can point me to a good link or give me any other useful info on how to accomplish this.


Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. After publishing my layers as wfs/wms and opening the table in the browser date vlues are displaying with a trailing 'Z'. Is this a product of the geotools data store api that geoserver is using? I think the geotools data store api is throwing a blanket over the data reading date as datetime, timestamp etc and the 'z' gets displayed for zulu time. I could be totally off on my geotools assumption but in PostgreSQL 'z' represents zulu or utc. If the data source values are stored as date and have no time component why is there a trailing 'Z' in the date field?![Here multiple date values display with a trailing 'Z'](http://i.stack.imgur.com/ikPkJ.jpg)


IO Performance of ArcPy in virtual machine

The following script just copies a file into RAM, performs some simple operations and writes the result back to hard disc:               import arcpy     import random     import time          arcpy.management.Delete("in_memory")     input_table = "C:\\data\\entrypoints\\table.shp"     memory_table = "in_memory\\table1"          # input from disc     t0 = time.clock()     arcpy.management.CopyRows(input_table, memory_table)     print time.clock() - t0          # some examplary operations and conversions     arcpy.management.AddField(memory_table, "NewField", "FLOAT")     tab = arcpy.da.TableToNumPyArray(memory_table, "*")     for row in tab:       row[0] = random.random()          # output to disc     output_table = "output_table"     t0 = time.clock()     arcpy.da.NumPyArrayToTable(tab, output_table)     print time.clock() - t0          arcpy.management.Delete("in_memory")      I used this script on a table with 150K rows and 4 integer columns (~5MB filesize) stored on a SSD. Reading a binary file of this size takes less than 1 second in C++ or Python. However, in ArcPy `CopyRows(...)` takes around 5 minutes (measured with Python's `time.clock()`). For the output, the performance is similarly bad. I am quite puzzled about this. I already tried other alternatives to the input (e.g. using UpdateCursor and da.UpdateCursor but I could not achieve similar times). Furthermore, I read about running the script externally, but this makes things worse. The script above is as fast as I can get. Am I doing something terribly wrong here? How come file-IO is so slow in ArcPy? Is there any solution to this or do I have to write a convenient IO by myself? **Edit:** As hinted by @Jason Scheirer, the result of the internal computations can be written directly to disc, no need to go via internal memory again. **Update:** I had the problem checked on a alternative environment by a client (organization with >50 Arc* users). In their native Windows environment the performance was equally bad. So I assumed the problem was not related to my system. However, it turned out that on my Windows inside a virtual machine the _problem is solved_ by keeping the data on a local hard drive, dedicated to the vm. I never experienced performance issues with other applications accessing the parent (or a remote) file system. So I was misguided, sorry for that! I am curious what causes the bad performance on the client organization's environment... Will adapt the title and description ASAP.


Big Satellite Image Processing

Im trying to run Mort Canty's http://mcanty.homepage.t-online.de/ Python iMAD implementation on bitemporal RapidEye Multispectral images. Which basically calculates the canonical correlation for the two images and then substracts them. The problem I'm having is that the images are of 5000 x 5000 x 5 (bands) pixels. If I try to run this on the whole image I get a memory error. Would the use of something like pyTables help me with this? What Mort Canty's code tries to do is that it loads the images using gdal and then stores them in an 10 x 25,000,000 array.               # initial weights     wt = ones(cols*rows)           # data array (transposed so observations are columns)     dm = zeros((2*bands,cols*rows))     k = 0     for b in pos:     band1 = inDataset1.GetRasterBand(b+1)     band1 = band1.ReadAsArray(x0,y0,cols,rows).astype(float)     dm[k,:] = ravel(band1)     band2 = inDataset2.GetRasterBand(b+1)     band2 = band2.ReadAsArray(x0,y0,cols,rows).astype(float)             dm[bands+k,:] = ravel(band2)     k += 1      Even just creating a 10 x 25,000,000 numpy array of floats throws a memory error. Anyone have a good idea of how to get around this? Greetings


LayerSwitcher() not working with Group Layers from Geoserver

i have used LayerSwitcher() before and it has worked fine but I am now trying to use it with the group layers in Geoserver and the map blanks out.               tiled = new OpenLayers.Layer.WMS(                         "Geoserver layers - Tiled", "http://niles.iplantcollaborative.org:80/geoserver/wms",                         {                             LAYERS: 'Shapefile.py',                             STYLES: '',                             format: format,                             tiled: !pureCoverage,                             tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                         },                         {                             buffer: 0,                             displayOutsideMaxExtent: true,                             isBaseLayer: true,                             displayInLayerSwitcher: true                         }                      );     var imagery = new OpenLayers.Layer.WMS(                     "Global Imagery",                     "http://maps.opengeo.org/geowebcache/service/wms",                     {layers: "bluemarble"}                 );                     map.addLayers([tiled, imagery]);                          // build up all controls                     map.addControl(new OpenLayers.Control.PanZoomBar({                         position: new OpenLayers.Pixel(2, 15)                     }));                          map.addControl(new OpenLayers.Control.Navigation());                     map.addControl(new OpenLayers.Control.Scale($('scale')));                     map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));                     map.addControl(new OpenLayers.Control.LayerSwitcher());                     map.zoomToExtent(bounds);      The moment I comment out the LayerSwitcher(), the map is rendered fine. Also, I tried adding a new WMS, imagery (in the code above), and if I try to do the following,               map.addLayers([imagery, tiled]);      I am only able to see a broken image. Can we not add a layer through code with group layers? Where am I going wrong?


How do I delete a point (not on a polygon)?

I want to delete points that is not part of a polygon. I can add points using Capture Point, but I can't delete them. The following solution does not work for points:   1. Select your layer   2. Enabled Editing   3. Choose the Node Tool   4. Click a point on your polygon   5. Use Command-click & drag to select multiple points with the marquee tool. (might be shift-click on Windows)   6. Use Delete key to delete the selected points (Fn+Delete on MacBook Pro)


Which web application framework is easiest for building website displaying lot of geospatial data?

I am building a simple website that displays a lot of geospatial data (which is routed through Geoserver). I was trying to use Drupal-6 to build the website component (non geospatial descriptions) but had plenty of issues dealing with openlayers and other modules as well as deploying it properly. My goals are simple - to display geospatial data (with Google maps background) and a normal website with a big menu and different explanatory content. Which web application framework is easiest (for a non web programmer) to achieve these two goals based on your experience


Normalizing landsat image pixels prior to classification?

I have 5 different years (all in the same month) of Landsat TM imagery to perform classification on and I would like to know whether there is a technique to normalise the pixels in each image so my training sites can remain the same for all 5 images. I understand this is a common technique to perform multiple-date image normalisation using regression but I am unaware of how to apply the technique. I am using both `ERDAS Imagine` and `Arcmap 10.1` for my analysis. What tool do I run for this?


What is the PostGIS equivalent of ArcGIS "Intersect" tool?

I am looking for the PostGIS ST_ _function_ that will give me the same results as running the ArcGIS Analyis-> Overlays-> Intersect tool on two polygons.


Flash a graphic using JSAPI AMD style

This should be simple, but not sure why I'm not getting it. Does anyone have a stub for showing how to flash a graphic? I want to be able to call it from a button in the JSAPI UI. I am using the AMD, hopefully this isn't steering away from it.               function showResults(featureSet) {     //remove all graphics on the maps graphics layer     map.graphics.clear();          //Performance enhancer - assign featureSet array to a single variable.     var resultFeatures = featureSet.features;          //Loop through each feature returned     for (var i = 0, il = resultFeatures.length; i < il; i++) {         //Get the current feature from the featureSet.         //Feature is a graphic         var graphic = resultFeatures[i];              // allow different symbols         markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 28,         new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,         new dojo.Color([255, 255, 255]), 2),         new dojo.Color([255, 0, 0, 0.85]));         lineSymbol = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID,         new dojo.Color([255, 0, 0]), 10, esri.symbol.CartographicLineSymbol.CAP_ROUND,         esri.symbol.CartographicLineSymbol.JOIN_MITER, 5);         fillSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,         new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,         new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.85]));              // figure out which symbol to use                                                                                if (graphic.geometry.type === "point" || graphic.geometry.type === "multipoint") {             symbol = markerSymbol;         } else if (graphic.geometry.type === "line" || graphic.geometry.type === "polyline") {             symbol = lineSymbol;         } else {             symbol = fillSymbol;         }         //g = new esri.Graphic(evt, symbol, null, null);         //selGraphicsLayer.add(g);              graphic.setSymbol(symbol);              //Set the infoTemplate.         graphic.setInfoTemplate(infoTemplate);              //Add graphic to the map graphics layer.         map.graphics.add(graphic);              //zoom to graphics          var graphicsExtent = esri.graphicsExtent(map.graphics.graphics)         if (graphicsExtent !== null) {             map.setExtent(graphicsExtent.expand(5));                  //flashFeature(graphic, 8, symbol);                                                            }         }     }


Point Shapefile Spatial reference

I am trying to get real coordinate reference to the set of points I have created and it has no spatial reference in it. I am trying to do this using C#. I did some readings and I think I can use ISpatialReference Interface (?) or IProjectedCoordinateSystem Interface? How should I go about to create the code for it? Thanks!


GXP: FeatureManager is not firing WFS GetFeature requests when setting EPSG:3857/900913

I 've created a web map viewer using OpenLayers, ExtJS, GeoExt and GXP. I've added a LayerTree (gxp_layertree) that shows layers from various WMS servers (GeoServers). I've also configured a FeatureManager (gxp_featuremanager) with 'autoLoadFeatures = true' and a FeatureGrid (gxp_featuregrid). The problem appears when I click on a layer tree node: the FeatureManager doesn't "autoLoadFeatures", it just fires a WFS DescribeLayer request to get the column names for the FeatureGrid. Trying to isolate the problem for a couple of hours by commenting and changing code I've discovered it works perfectly with projection setted to EPSG:4326, but not with EPSG:3857 or 900913. Do you have any idea about why this is happening or how to solve it?? I need the map projection to be 3857 because I have Google base layers. Thanks in advance. Cristian.


How to specify coordinate reference system (CRS) for scalebar that is different to project CRS?

Is it possible to specify a coordinate reference system (CRS) for the scalebar that is different to the project CRS? For example, my project CRS uses geographic coordinates (lat/long), the reason being that I need a lat/long graticule on the map. However I would like the scalebar to be expressed in kilometres (i.e. projected distance units, rather than angular measures). If this isn't currently possible, has this been flagged as a feature for future releases? (And what is the best way to do so?) An alternative solution would be for QGIS to have the capability to specify the CRS of the map grid / graticule, as in ArcMap. **Note** : This is not simply a question about how to select scalebar units (e.g. miles / kilometres / metres).


CartoDB layer selector template

I would like to create a HTML file where I have a layer selector dropdown list that would be able to display one layer from a specific CartoDB visualization (this visualization has several layers in it, but I just want to display one layer at a time on the API) I have no development skills, so I am looking for a template to do this. Anyone here knows a template that I could use to do the job?


I am getting NULL values when I use "point sampling tool"?

I am trying to extract values from a raster using a point shapefile, but I am getting NULL values. I think that NULL values are obtained because the Coordinate Reference System (CRS) are not the same for the raster and the point shapefile. However, they are ok when "on the fly reprojection" is activated on the properties of the project. Do you know if different CRS could be the responsible of the NULL values? If the answer is Yes, how could I change the CRS? I have tried to change it in the properties of the layer, but they don't overlap even when they have the same CRS!! Thanks in advance


Route to cover entire network

I have a road network where I have to cover every road for visual inspection. I need to design a route map for this task. What tools are available to a QGIS user? How would you describe the workflow in this situation?


Why jsonp is disabled by default in GeoServer?

> JSONP EXCEPTIONS=text/javascript Return a JsonP in the form: > paddingOutput(...jsonp...). See WMS vendor parameters to change the callback > name. Note that this format is disabled by default. http://docs.geoserver.org/latest/en/user/services/wms/reference.html **Is there any security, performance or vulnability issues with jsonp enabled?**


What does "PostgreSQL layer has no primary key." when loading layer from database manager mean?

I have a complex join that I have working in the database manager but when I try and load it nothing appears and I found this in the logs: `PostgreSQL layer has no primary key.` What is actually wrong? ![screen shot of the SQL window](http://i.stack.imgur.com/Yn4tX.png)


How to edit a vector layer extent?

I'm working on QGIS 2.2, and I would like to make a vector layer extent bigger (thus the clip option is not suitable) to match exactly my mask layer extent. I would like the new added area to be empty. I can't seem to find a way to edit the extent. Any help would be much appreciated. Thanks


How can I clone or duplicate a feature within a feature class

Is there a way to copy selected features, then paste them into the same feature class (and then edit some attributes)? e.g. If I have a land parcel that has more than one owner, how can I create multiple instances of that feature without having to import or load it for each owner? I just want to copy and paste it then edit the 'Owner' field.


Problem with layer order in OpenLayers and Google styled maps

I'm using OpenLayers with Google styled maps. My biggest problem is KML polygon layer which needs to be under roads layer but it isn't (see prtscr). What am I doing wrong? ![enter image description here](http://i.stack.imgur.com/tg2aP.jpg) This is my coding:                            <title>OpenLayers Google (v3) Layer Example - demo with styled maps, traffic, fusion tables</title>


How to create a new Spatialite database in QGIS

I've been trying to create a new spatialite database within QGIS 1.8 (SpatiaLite Version 3.0.1; QSpatialite 6.0.3) and keep getting this error: "The SQL query seems to be invalid. no such table: views_geometry_columns" and then "This DataBase seems to be a valid SQLite DataBase but not a valid SpatiaLite One, Would you like QSpatiaLite to automatically transform it to SpatiaLite (information won't be lost) ?" and after "Yes" comes "Unable to convert Database to SpatiaLite". What am I doing wrong? There was no problems with old version (QGIS 1.7.4 and QSpatialite 5.0.3). Please advise regarding creating a new Spatialite database. Thank You! * * * Spatialite-gui did the trick. You just have to have right SRID. Here is the SRID list http://drupalcode.org/project/geo.git/blob/ee3f75649e4b01dfd27d8e35b222a2b51c93d706:/srid.inc Thank you all for your effort and time!


QGIS style "- x x -"

Please suggest how to draw a style like **\- x x -** (dash cross cross dash), with a dash length 25 mm and gap between dash and cross is 2mm


How to prevent ArcCatalog's "create pyramids" popup from appearing every session

For some reason, my ArcCatalog isn't remembering the setting for "always create pyramids". I see this dialog whenever I try to preview a raster without pyramids (in a new ArcCatalog session) despite hitting "use my choice and do not show this dialog in the future". The setting lasts for this ArcCatalog session, but is forgotten when I close and restart. ![enter image description here](http://i.stack.imgur.com/u2kJN.png) Is there a registry setting or similar to control this?


How can you auto-increment in a Python Script (not Field Calculator)?

I want to autoincrement values in a field within a Python script. I've done this using Field Calculator and the code referenced here. I tried using this code in the Python script below but it is not working.               #Import modules     import os, sys     import arcpy          #Set variables     workspace = "D:\\GIS\\data.gdb"     arcpy.env.workspace = workspace     table_name = "data_table"      field = "KEY_2" #Short integer field          #This is the function I want to use on my KEY_2 field     rec=0      def autoIncrement(field):          global rec         pStart = 10               pInterval = 2          if (rec == 0):               rec = pStart               return rec          else:               rec += pInterval               return rec          field = autoIncrement()      I get a TypeError when I run this code:               Traceback (most recent call last):       File "C:\Python26\ArcGIS10.0\pythonwin\pywin\framework\scriptutils.py", line 312, in     RunScript         exec codeObject in __main__.__dict__       File "D:\Python\scratch\sc3.py", line 23, in <module>        field = autoIncrement()     TypeError: autoIncrement() takes exactly 1 argument (0 given)      I've moved things around in the script a bit but have not yet gotten my field to populate. Anyone have a suggestion? Here's my final code, based on blord-castillo's answer:               #Import modules     import os, sys     import arcpy          #Set variables     workspace = "D:\\GIS\\data.gdb"     arcpy.env.workspace = workspace     table_name = "data_table"      field = "KEY_2" #I made this a text field     rec=0          def autoIncrement(pStart = 10,pInterval = 2): #Using default values instead of setting     inside function         global rec         if (rec == 0):               rec = pStart               return rec         else:             rec += pInterval             return rec          incrementCursor = arcpy.UpdateCursor(table_name) #There is no guarantee of order here     for row in incrementCursor:         row.setValue(field, str(autoIncrement()))         incrementCursor.updateRow(row)          del incrementCursor


TypeError in leaflet on zoom in or out

I am working on an application that renders land parcels from PostGIS as polygons in Leaflet. I have an event handler set for 'viewreset' on the map:               this.leaflet_map.on('viewreset', this.viewport.regenerate, this.viewport);      The `this` in this case is an object I've created, called `pt_map`. `viewport` is an object I've created to wrap the methods for regenerating the view based on the current map bounds. My code works on initial load, as well as on panning the map. However, when I zoom in or out, I get the following error in line 4842 of leaflet-src.js: > Uncaught TypeError: Cannot call method 'latLngToLayerPoint' of null Any ideas? My full code is available at https://github.com/CoherentLogic/ptarmigan/blob/experimental/web/ptarmigan/parcels/layers.js


Using qgis modules in standalone application with PySide?

I want to make small standalone application using PySide and QGIS python modules to display satellite images and do standard GIS operations, like creating new shape file and placing polygons or points in it. I installed QGIS 2.2 and added paths to python folder and qgis .dll's. `PYTHONPATH`: i added ;C:\Program Files\QGIS_2.2\apps\qgis\python; - path to python folder inside QGIS. `path`: ;C:\Program Files\QGIS_2.2\apps\qgis\bin; - path to .dll's like qgis_core.dll and qgis_gui.dll. When im trying to `import qgis.core`, i get following:               Traceback (most recent call last):       File "F:/Downlods/PyCharm_Projects/Project_1/Testing_Area.py", line 1, in <module>         import qgis.core       File "C:\Program Files\QGIS_2.2\apps\qgis\python\qgis\__init__.py", line 26, in <module>         import sip     ImportError: No module named 'sip'      So, its telling me there is no 'sip'. I dont know, is there is some problem with my 'PYTHONPATH' or 'path'? Or its just will not work with PySide?


Tilemill Legend not displaying title and only filling in 5 out of 9 categories

Title says it all, here's the code ![enter image description here](http://i.stack.imgur.com/Ya6ii.png) Actual look of the legend ![enter image description here](http://i.stack.imgur.com/nKxYj.png)


Get attributes from intersecting lines to label generated intersection point

I have an urban road network (as a feature class), consisting of only polylines. I have to make a database of all the intersections between the streets. The problem is that as I generate those intersection points, I don't know how to address the names of the streets as an attribute for each point. For example, if I have streets with names "1" and "2", the point "x" at their intersection should be named "1,2" or so, if I'm not mistaken. Thank you!


Italicizing scientific names in a legend

I am trying to Italicize a scientific name in my legend (ArcMap 10.2). I can not figure out how to Italicize one word only without having the rest of the description being italicized as well. Is it possible to italicize only one word in a legend description?


How to calculate x and y variance values?

I'm trying to define the best suitable cell size to use in the kernel density estimation in the Geospatial Modelling Environment (GME) for ArcGIS. To calculate the best suitable cell size the following is advised (somewhere else): > A cell size that is too small will result in a very large output raster ... > that takes a long time to calculate. I suggest the following rule of thumb > to calculate a reasonable bandwidth: take the square root of the x or y > variance value (whichever is smaller) and divide by 5 or 10 ... So, how should I proceed to the the x and y variance values? All the best HNL


copy feature class and retain selected fields with arcpy

I've got a featureclass (fc) that I want to copy, but only retaining a selected number of fields, let's say field 9, 11, and 12 from the total of 15 fields. I want to use arcpy and suspect that fieldmappings are somehow required for this. I currently have:               fm= arcpy.FieldMappings()     fm.addtable(fc)     sel= range(0,9)+[10]+range(13,16)     for i in sel:         fm.removeFieldMap(i)      However, this gives:               RuntimeError: FieldMappings: Error in removing a field map from field mappings for RemoveFieldMap      I can't quite see what I'm doing wrong? Perhaps it would be nicer to somehow select the fields I want and add these to a new fieldMapping object? All suggestions are welcome, thanks in advance! Update. As suggested below, I now have the following:               inFields= ["fA", "fB", "fC"]     inTab= 'testFc'     fm= arcpy.fieldMappings()     fieldMap= arcpy.FieldMap()     for field in inFields:          fieldMap.addInputField(inTab, field)     fm.addFieldMap(fieldMap)     arcpy.featureClassToFeatureClass_conversion(testFc, outDir, testOutFc, field_mapping= fm)      This works, a new featureclass is created. However, it contains only field fA. The python output reads:               Executing: FeatureClassToFeatureClass L:/GEOProjects/2Working.gdb/testFc :/GEOProjecten outDir testOutFc     # "fA "fA" true true false 8 Double 0 0 ,First,#,     L:/GEOProjects/2Working.gdb/testFc,fA,-1,-1,     L:/GEOProjects/2Working.gdb/testFc,fB,-1,-1,     L:/GEOProjects/2Working.gdb/testFc,fC,-1,-1" #     Start Time: Thu Oct 24 10:21:42 2013     Succeeded at Thu Oct 24 10:21:58 2013 (Elapsed Time: 16.00 seconds)      It seems that ony fA is being copied to the new featureclass. Any suggestion as to why this can be?


How to create NSIS installer QGIS with Microsoft Visual C++?

I want to know, there is a way to generate QGIS NSIS installer with a Release build generated with Microsoft Visual C++? It is possible to generate the installer in Windows Operating system?


QGIS 1.8 does not launch

QGIS 1.8.0-1 does not launch (nor its companions: Browser, Grass, etc.) neither on machine with Win XP SP3 nor with Win 7 (GRASS installed separately works well). Console displays a message on launch: "'findstr' is not recognized as an internal or external operable program or batch file". I tried all solutions suggested here earlier with no result. Could anybody advice I'd be grateful. Ian.


Assign Sink ID to upstream features in a geometric network

Looking for a way to automatically assign an 8-character Sink ID to every upstream feature in a geometric network. There are over 500 sinks and about 5000 points and lines upstream from those sinks. Would be great to click on any point or line and see what the Sink ID is, or quickly select records based on which sink they are upstream from. A similar question is here: How do I assign attributes from hydrologic sinks to upstream features?


How can you identify the feature OID from a geometry object

I know arcpy allows you to access geometries directly using the CopyFeatures_management method. Note in their code sample for the Geometry object, it is very simple to copy the geometries to in-memory objects of type Geometry (and extremely fast). The geometry object of course relates to the geometry/shape and completely bypasses attribute information. My question is whether there is a way to identify the OID of each geometry cheaply? A little background in what I am trying to perform:   1. For all feature classes in a geodatabase   2. Read through each feature's geometry   3. Go over the points in the geometry   4. Calculate the distances between the points   5. If the distance is below a threshold, that specific feature needs to marked for review (meaning I need either the OID/FID or any other field to identify it). As I am still in ArcGIS 10.0, I would prefer to not use cursors that seem to work a lot slower than simply dealing with the geometries.


Arcpy FeatureClassToFeatureClass_conversion is causing ArcDesktop to Crash

I am new to coding in python and specifically Arcpy. Through trial and error I was able to piece together this code that was working fine yesterday until I installed service pack 5 for ArcGIs Desktop 10.0, on a 64 bit Windows machine. The reason I decided to install this service pack is because the code was incapable of doing more than ~60 iterations of the loop without stopping unless everything on my machine was closed except ArcCatalog. I saw on a discussion board that updating to a new service pack might solve my problem. Now my problems is the machine crashing halfway through one loop. Through trial and error I have determined that using the line of my code which calls on the FeatureClassToFeatureClass_conversion crashes ArcCatalog. The only thing that I can trace the problem back to is upgrading to service pack 5.               import arcpy     arcpy.env.scratchWorkspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\Scratch'     arcpy.env.workspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW'          import os          xcelFiles = arcpy.ListFiles('*.xls')     count = 1          arcpy.env.workspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW'          for count in range(0, 140):         fileName = xcelFiles[count]         tableName = fileName[:-4] + '_Table_View'         layerName = fileName[:-4] + 'Point_Layer'         xyName = fileName[:-4] + '_pts'         tempName = 'LW' + fileName[11:-4]              shpPath = r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW\Shape'         spRef = r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"'              points = arcpy.MakeTableView_management(fileName + '\\sheet1$', tableName)              b = arcpy.MakeXYEventLayer_management(points,"F2","F3",tempName, spRef, "F4")         arcpy.FeatureClassToFeatureClass_conversion (b, shpPath, tempName)      I have not included the rest of my code as this last line causes the program to crash. Thanks Fred


Automating non-trivial workflow in SAGA-GIS

My problem: I have two DEMs, one rectangular and containing the other. Both are given in grid formats and the outer one has gridsize 50m, the inner one 10m. I want to 'embed' the smaller one in the larger one, merge them and export the whole merged grid as .xyz files with grid size 50m. All this I can do manually in SAGA-GIS, using the following steps:   1. Import the outer grid using the module "`io_grid`" - "Import Surfer Grid" (ID 3)   2. Import the inner grid using "`io_gdal`" - "GDAL: Import Raster" (ID 0)   3. Use the splendid mosaicking tool "`grid_tools`" - "Mosaicking" (ID 3)   4. Export the resulting grid using "`io_grid`" - "Export Grid to XYZ" (ID 5) Now I want to automate all this using `saga_cmd`. I managed to turn the first two steps into a script quite easily:               io_grid 3 -FILE=G:\path_to_file\foo.grd -NODATA=0 -NODATA_VAL=-99999.000000     io_gdal 0 -FILES=G:\path_to_file\bar.adf      Step 3 is tricky though. The SAGA-generated example for the module `grid_tools 3` suggests to do something like that:               grid_tools "Mosaicking" -GRIDS=memory;memory -TYPE=7 -INTERPOL=0 -OVERLAP=1 -BLEND_DIST=10.000000 -TARGET=1 -USER_XMIN=0.000000 -USER_XMAX=0.000000 -USER_YMIN=0.000000 -USER_YMAX=0.000000 -USER_SIZE=1.000000 -USER_COLS=0 -USER_ROWS=0 -USER_GRID=NULL -GRID_GRID=      In the SAGA GUI, I simply choose the input grids manually in this step (with a drop-down menu - interactively). But it seems to me that I have to name the imported grids, which I did not do in the script. But how do name them. And how can I tell `grid_tools "Mosaicking"` to use the two before-loaded grids?