title: How to write a script that re-projects vector datasets in a folder?

text: This is probably a novice question, but I am a novice with python. I am trying to write a script that re-projects vector datasets in a folder. However there are rules in which to do this. They are:   * Must re-project shapefile vector datasets in the folder to match the target dataset's projection.    * Must append "_projected" to the end of each projected dataset name. For example: CityBoundaries_projected.shp.    * Must skip projecting any datasets that are already in the target projection.    * Must report a geoprocessing message of which datasets were projected. In this message, the dataset names can be separated by spaces. In the message, do not include datasets that were skipped because they were already in the target projection.    * **Must not contain any hard-coded values such as dataset names, path names, or projection names.**   * Must be made available as a script tool that can be easily run from ArcToolbox by someone with no knowledge of scripting. The part I am struggling with is the bolded requirement b/c I cannot hard code the projection I want all of the files to have. I need it to assign the projection of the remaining shapefiles from that of the targetFC. So I don't know what to assign to my "outCS" variable. Oh...and I cannot use the batch projection tool. I have to make a variation of a batch project tool by running the Project tool inside a loop. Here is a sample of my script. Any help would be greatly appreciated.               import arcpy     import os          #set up the paths     targetFC = r"C:\MGIS\geog485\Lesson2\Lesson2\CountyLines.shp"     folderToExamine = r"C:\MGIS\geog485\Lesson2\Lesson2"               #get spatial reference for the target feature class     targetDescribe = arcpy.Describe(targetFC)     targetSR = targetDescribe.SpatialReference     targetSRName = targetSR.Name          # Get a list of my feature classes     arcpy.env.workspace = folderToExamine     listOfFCs = arcpy.ListFeatureClasses()          #Loop through the list of FCs     for currentFC in listOfFCs:     #Read the spatial reference of the current one     currentFCDescribe = arcpy.Describe(currentFC)     currentFCSR = currentFCDescribe.SpatialReference     currentFCSRName = currentFCSR.Name          if currentFCSRName != targetSRName:         print "Spatial references don't match"     else:         print "Spatial references do match"          if currentFCSRName == targetSRName:         continue     else:         # Determine the new output feature class path and name         **outCS =**          arcpy.Project_management(currentFC, outCS)         rootName = currentFC[:-4]         print rootName         print rootName +"_projected.shp"


title: What is the most efficient way to create a shapefile from resultset using geotools

text: I am facing a problem to write to shapefile (geotools) with respect to time, memory etc. My workflow is something like reading spacial data from database Oracle with attributes and coordinates (can any point,line,polygon (very large data)) for that i am writing one record to shapefile and then flush the featurecollection so that ditch the outofmemory problem i am using DefaultTransaction. but when i do that it works fine for about 700 features but then the commit function takes more time to write to shapefile what i observed on starting about 2 min and then time keep increasing about 10 to 15 min to 30 mins and keep going... i try different thing like writing chuck in featuer (500) to shapefile but no help. I also observed that the total size of the shapefile writen through geotools is far more then writing shapefile using like arcobject or mapobject java. here is my code please tell me if there is anyother way to write to shapefile in efficient way... Transaction transaction = new DefaultTransaction("create");                       String typeName = newDataStore.getTypeNames()[0];             SimpleFeatureSource featureSource = newDataStore.getFeatureSource(typeName);             SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;             featureStore.setTransaction(transaction);                  while( _resultSet.next() )             {                 setRecord();                      SimpleFeature feature = featureBuilder.buildFeature(null);                 featurecollection.add(feature);                 featureStore.addFeatures(featurecollection);                          transaction.commit();                     featurecollection.clear();             featureCount++;                 if (featureCount % 10 == 0)                  {                     _logger.info("Rows Processed: " + featureCount);                 }                  }                  reportResults(featureCount);                  transaction.close();         }      * * * A part from that i also see an amazing thing using geotools when we call transaction.commit() it first copy features in to temp space but the amazing thing is that after about 4000 feature the temp files size is about 3GB. why is that i have no idea.. any comments on this will help me to understand the problem. i tried it for 75000 points and 8000 lines (each line contains about 200 points). For lines this commit() function is behaving very badly.. by the way this is the mimimum size of data which i am testing using geotools.


title: how to calculate polygon area in arcengine

text: i'm new to use Arcengine 9.3 . i would like to create an application to calculate the selected polygon in combobox such that the user click to a button and polygon area saved in dbf . how can i write the codes with c# in arcengine ? thank you


title: GPS Module Without Velocity or Altitude Limitations

text: I am looking for a GPS module that I can use in a high-altitude project. The problem I have discovered is that GPS manufacturers are required to place a set of restrictions on GPS modules. The restrictions set a maximum speed and altitude at which the device should stop functioning. Basically, this limits someone's ability to build a cruise missile. From what I understand, it is not illegal to have a GPS receiver without these limitations, it is illegal to export it from the U.S. without considering it a weapon. If I am not mistaken, GPS is also used to track some satellites in orbit, so as long as the orbiting satellite is not in geo-synchronous orbit or further. Obviously, these GPS receivers do not have the limit, as both the height and velocity would far exceed the mandate. Does anyone know of a GPS unit that does not have these limitations, or, is there a unit that allows you to flash the firmware and manually remove the limitations? Link to mention of limitations: http://en.wikipedia.org/wiki/CoCom#Legacy


title: How can I find positions on my land?

text: I have about 2 acres of land, wooded and brushy. There was a survey and the corners have rebar. I am working on a site plan for house construction. I have two related problems:   1. Finding a spot on the land, by reference. E.g., 10' from the E boundary, and 40' from the S boundary.   2. Marking certain features down on a map. E.g., a particular tree that I want to keep - where is it in relation to the borders? Between the terrain and the brush, I can't run a string between the corner rebar. I picked up a cheap GPS (Bushnell ONIX 350), but I don't think I can get enough accuracy out of it for this purpose. At this point, I'd be happy to get measurements within 1 foot of error. I'm looking for cheap solutions. Any ideas?


title: Issues Using Dropbox to Sync File GeoDatabases

text: I've been able to accumulate a large free dropbox account and use it to Sync my GIS databases across several different PC's. I've just started doing this and havent had any problems thus far. But I am getting some red flags of warning that are scaring me. There seems to be several duplicate files in the GeoDatabases. Usually something like: a00000017.gdbtable (GIS-HP duplicate Copy) I can manually delete these files with no problem, but I have no idea why they are popping up. Also, instead of removing file locks, Dropbox keeps saying it is renaming them. So when I release one lock and gain another, it renames the file instead of deleting it and creating a new one. Although it still does delete the lock file when I have fully disconnected from the GeoDatabase. Like I said, I haven't had any issues so far, but I am worried about long term data corruption while using Dropbox. Has anyone used Dropbox and found problems using it to sync GIS data? Thanks!


title: Why are the Raster z-value changed when reprojecting?

text: i have raster data with height values (z). when i try to reproject/warp the raster to gauss kruger 3, the z-values are changing (several meters). (the data is already gk3, but i have to reproject them, because the clipper function does not work without) why is that?


title: Create in memory polygon with RasterToPolygon

text: I need to create a number of polygons in a loop from a raster. Essentially, the loop will call a function a number of times which needs to convert it to a polygon:               def myfunc(raster):              #do some raster processing         return arcpy.RasterToPolygon_conversion(raster, "in_memory\poly")      But the object it returns seemingly has nothing in it? The end result is I want to create a single shapefile from all the polygon features I will create. It seems silly to call RasterToPolygon, writing out a temporary shapefile for each polygon and then collecting them altogether as they will easily all fit in the RAM available. Is there any way to output a Polygon geometry from RasterToPolygon ?. I.e, can I not do some thing like this:               poly = arcpy.RasterToPolygon_conversion(raster, arcpy.Polygon)


title: How to symbolize features in QGIS?

text: Why is a shapefile shown as coloured independent features in ArcGIS shown in a single colour in Quantum GIS? What can I do to display this layer (wwf ecoregions) with the different ecoregions specially coloured?


title: reclassify vector data from multiple source data fields (ArcGIS) (ModelBuilder)

text: I am using ArcGIS 10.1 and ModelBuilder. I am not familiar with Python. My question is very similar to ReClassify Vector Data Between Values . However that question is about reclassification using the values from one other field. I have experience of using this type of reclassification within the Calculate Value Tool. However I wish to base a reclassification on the values from more than one source data field. For example from two fields - "Land" and "WellYield". ideally I'd like to be able to run classifications from 2 or 3 source fields. I know the following code is wrong because i have not defined the "Land" field. e.g. parser: Python                   Expression:         Reclass(!WELL_YIELD!, !Land!)              Code Block:         def Reclass(WellYield, Land):           if (WellYield == 'Make'and Land == 'Natural'):             return 'Greenspace'           elif (WellYield =='Multiple'  and Land == 'Natural'):             return 'Not Greenspace'      Any help or tips on the correct code would be much appreciated. I have just been testing some outputs by trial and error. The above code seems to work now for classifying by different data fields. I will test further by three fields. Any insights or advice would still be appreciated.


title: Add TMS layer to OpenLayers

text: I have found some examples but haven't managed yet to adapt them to my needs... I have an image that is served as TMS (tiles already statically rendered): http://humadat.alwaysdata.net/tms/khorog/tiles What would be the right syntax to display it in OpenLayers? On this example: http://openlayers.org/dev/examples/tms.html It looks quite different, as if the tiles are dynamically rendered by a python script... I tried something like this               layer = new OpenLayers.Layer.TMS( "TMS",         "http://humadat.alwaysdata.net/tms/khorog/", {layername: 'tiles', type:'jpg'}      );      But no success so far


title: Why is using Bing Maps with QGIS free but not with ArcGIS?

text: Since the end of 2013 a free use of Bing Maps in ArcGIS is no longer possible. You have to obtain a Bing Maps key directly from Microsoft. In QGIS (with OpenLayers plugin) it is possible to use Bing Maps (and also Google Maps) without a Bing Maps key and without a fee. Why it is possible to use Bing Maps with QGIS for free while you have to pay for it with ArcGIS (Desktop)? ESRI source: http://downloads2.esri.com/ArcGISOnline/docs/bing_faq1.pdf


title: Making Geoprocessing Service results table sortable using ArcGIS API for JavaScript?

text:
Im aware a sort() function exists, just not sure where it should be placed in my code. I have a function that draws routes on the map and i'm getting my results that are in my table from those routes. Do I put sort() after the lines are drawn, before the table is populated? or after the table is populated. Here is my code that populates my table.               myMap.Search = {         gpGetStats: new esri.tasks.Geoprocessor(gpURL),         getRouteStats: function () {             console.log(dojo.byId('resultsLayer').value)             var params = {                 "ZIP_CRID": dojo.byId('resultsLayer').value             };             resultsLayer.Search.gpGetStats.execute(params, resultsLayer.Search.handleStats);         },                   handleStats: function (results, messages) {             console.log(results);             // content.sort();                  var content = "";             content += '
';             content += '
 ZIP CRID 	 Bus 	 Res 	 Tot 	 <200 	 DS Key
';                  dojo.forEach(results[0].value.features, function (crid, i) {                 console.log(crid.attributes.ZIP_CRID + ', ');                 content += '
' + crid.attributes.ZIP_CRID;                 content += '	 ' + crid.attributes.BUS_CNT;                 content += '	 ' + crid.attributes.RES_CNT;                 content += '	 ' + crid.attributes.TOT_CNT;                 content += '	 ' + crid.attributes.LT_200_IND;                 content += '	 ' + crid.attributes.DS_KEY + '
';             });             content += '
';                  dojo.byId('details').innerHTML = content;         },     }      Also a Dojo Grid would be acceptable


title: How to create contiguous area cartograms in QGIS or R?

text: Here is what I want to achieve (on the right): ![http://junkcharts.typepad.com/.a/6a00d8341e992c53ef0162fd6913e8970d-pi](http://i.stack.imgur.com/bwHHe.png) I am looking for a tool or a method to transform a shapefile (with QGIS or R) into this form. And please be aware: It's not just clipping a hexagonal grid or a grid of hexagons! Each hexagon should represent an equal number of a measure (e.g. each hexagon represents 5,000 trees). Maybe you know about scapetoad! http://scapetoad.choros.ch/ So I basically want to produce a similar output to scapetoad - but with a more restricted grid(?). edit: The mentioning of QGis and R is not a restriction - it's just where I was looking for a solution. Of course I am happy with any tool, method or advise!


title: How to avoid Displacement of Marker Symbols with X-Offset

text: I'm trying to mimick a line symbol style that is comprised of the line and 2 alternating markers. I use an interval placement of 10 units for the 'blocks' (custom svg) and 5 for points, thus every second point is covered by a block. With this trick all marker are aligned at the line properly. However, I'd wish to make the 'blocks' bend along with the line - Is there any way I can achieve this? ![enter image description here](http://i.stack.imgur.com/k3v0l.png) # EDIT: I found a way by using a custom dash pattern (dash 5, space 5) and vertical marker lines with interval 5, instead of my custom svgs. This works perfectly well - but now I don't know how to add the point markers. I could use a simple marker with interval 5 and offset 2.5, but this is buggy because then the points wouldn't align along the line, where it bends.. ![enter image description here](http://i.stack.imgur.com/nvvQc.png)


title: How to handle crashes on save causing "Project file read error: unexpected end of file at line 1 column 1 for file [pathway]"?

text: QGIS 1.8.0 Tried to save a project and as I saved it gave me the "QGIS has experienced an error and needs to close"   Next time I went to open the project I got this (well I was going to post an image of the error but apparently I need a "10 reputation" to do that) suffice to say it says: "Project file read error: unexpected end of file at line 1 column 1 for file [pathway]" The project file now says 0KB for the file size. Any idea how to get my project restored? Why are the crashes happening? QGIS has been crashing more and more frequently especially when saving, trying to split features, and when opening the print composer. No error messages other than the generic "QGIS has encountered and error and needs to close."


title: Spatial query tool for laymen

text: I know nothing about GIS, but I have what I think is a GIS problem. From spending a few hours googling my problem, I think what I need to do is perform a spatial query, but I'm not sure how to go about it. Essentially, I have some crime data (a list of specific incidents, the time date that they occurred and the address where they occurred) that I'd like to look at in relation to one particular neighborhood. I have an outline of the neighborhood on a map, which is specific enough that I could translate it into a polygon that describes the outline of the neighborhood. I'd like to filter the crime data I have to see which specific incidents happened within the bounds of this neighborhood. I think this is a spatial query, but I'm not sure. I'm looking for some guidance on the problem in general. It appears that there are some free tools online for these kinds of things (Google Fusion Tables?) and I have access to ArcGIS and MS SQL Server. I'm familiar with SQL Server, but not ArcGIS and it doesn't look like something I could pick up and learn in a day or two, but I'm not sure. Again, any guidance, no matter how general or specific, is appreciated. Thanks!


title: How can I display features at the map-scale corresponding to an attribute?

text: Suppose one had a large dataset of features of vastly different sizes - perhaps political boundaries ranging from country to county. It would be useful to be able to display only the large countries at a distant scale while increasingly displaying smaller boundaries as the map is zoomed. In ArcMap, the only way I know how to accomplish this is by creating multiple copies of the layer in the Table of Contents and choose the maximum and minimum display scales. However, **can I set an attribute, say _display_scale_min_ and _display_scale_max_ where it specifies at which scales the individual feature should be displayed?** This wouldn't add too much complexity because the database could quickly narrow the results given the current map scale. It would be handy because the display scale could be programmatically assigned. It would also be handy when one feature class had several scale-dependent classes (such as having eight or so ways to simplify the display of roads).


title: Obtaining OS MasterMap time series data

text: I am trying to do a research project on changes in Land Cover in a London borough over time. I have access to OS MasterMap data through Digimap (the service that provides this data to universities in the UK), but I can't see a way to download a time series of data directly. I've noticed that the tables that are produced from the OS MasterMap data have a couple of fields that give the date the feature was changed, and whether the feature was New or Updated at that point. However, I can't see a way to use this data to produce previous versions of the map data. Is this possible to do? It would seem strange for them to include these fields if there was no way to process the data to make them useful, but I can't see anywhere that they say (for example) what was there beforehand, if this feature is new. I have heard that the British Library have snapshots of OS MasterMap data from various times, but these are only available as images, not as GIS data. Does anyone have any ideas as to how I could obtain a time series?


title: How to calculate distance between two points with esri.geometry?

text: The function http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#namespace_geometry/esri.geometry.getLength should calculate distances between points. When I am trying to calculate distance between points having 100 meters between them               p1=new esri.geometry.Point(3997030.6690969253, 7444299.320646087, new esri.SpatialReference({ wkid: 102113 }));     Object     p2=new esri.geometry.Point(3996951.455397143, 7444142.154020177, new esri.SpatialReference({ wkid: 102113 }));     Object     esri.geometry.getLength(p1, p2)     176.00045037719127      I am getting 176 which is wrong. Projection is Web Mercator (WKID 102113). **UPDATE** @Krystian found that `getLength` uses just Pythagoras theorem to calculate length. So it gives length in projection meters. How to obtain distance in real meters?


title: Dynamically generated map overlay with map server - what's the best option?

text: I'm facing a problem and would like to ask your help finding the best online mapping solution! **Project details:**   * The User can pick 1 from several hundred territory based functions to map its values. A good example: Population.   * Every function represents data on a group of territorial units. These units can be very large (i.e countries or continents) and can be very small (settlements). Every unit is represented as a (multi)polygon.    * The user can filter on what territorial units he wants to display. In other words he can filter the areas to be displayed. Based on the values of the selected function and the selected areas, the map to be created will be a 30% transparent Choropleth map overlay. This adds a dynamic behaviour, so static maps are not an option.   * The User is allowed to select huge numbers of territories. I.e: all settlements of a country. This introduces several thousands of polygons to display.   * I have high resolution ESRI shapefile data on each unit. I can convert them to any GIS format. **The current implementation:** uses Google Maps with Fusion Tables layer added. The Fusion Table is generated dynamically with regard to the following procedure:   * A pre uploaded base fusion table is used, which holds all geometry data for all possible areas. An areaId primary key is part of the table   * A dynamically generated fusion table is uploaded runtime which holds the values and area ids for the selected function.   * When this dynamic table is created, we can get the fusion table to display by joining the dynamic table with the base table .   * Colors are calculated runtime and applied as conditional formatting in the view layer  **The problem:** When you generate a new fusion table google needs some time to cache the generated map tiles on server side. So far i didn't find a solution to get feedback on these map tiles are already generated or not when displaying the map to the User. When displaying the map for the first time(and most probably the last time..since they are generated runtime) the user won't see the Choropleth map("Data may still be loading" message on map tiles), he has to refresh the page several times to get the map displayed correctly. And altogether this solution is very slow. Takes 10-25sec to upload data to Fusion Tables service and another 2-20sec to get the tiles cached on google's servers. **What i have tried:**   * KML Layers on Google Maps: wouldn't take KMLs larger than 10M. The caching issue is still present   * Creating polygons on client side: is an overkill for the browser for large shapes like continents and for the cases when 3000-4000 smaller shapes like settlements are displayed.  **Looking for:** a mapping server solution that i can install and use on the project's server to dynamically generate these map tiles. The solution would qualify if the whole process wouldn't take more than 10sec. The raster layer behind the Choropleth map should be preferably Google Maps but not necessarily. **Any suggestions are most appreciated and thanks for your help in advance!**


title: How to subset raster image using gdal?

text: I have read pixel values of an raster image using GDAL libraries in visual studio 2010(vc++). Now I have to crop the image (subset) according to the grid given in shape file. I have got a code for cropping image on internet as given below, but its having some error in it. Please review it and help .               GDALDataset* crop(GDALDataset* poDS, int xoff, int yoff, int xsize, int ysize)     {             VRTDataset *poVDS = (VRTDataset*)VRTCreate(xsize, ysize);                  // Copy dataset info             const char* pszProjection = poDS->GetProjectionRef();             if (pszProjection != NULL && strlen(pszProjection) > 0)                     poVDS->SetProjection(pszProjection);                  double adfGeoTransform[6];             if (poDS->GetGeoTransform(adfGeoTransform) == CE_None)             {                      // Adapt the geotransform matrix to the subarea                         adfGeoTransform[0] += xoff * adfGeoTransform[1]                             + yoff * adfGeoTransform[2];                     adfGeoTransform[3] += xoff * adfGeoTransform[4]                             + yoff * adfGeoTransform[5];                          poVDS->SetGeoTransform(adfGeoTransform);             }                  poVDS->SetMetadata(poDS->GetMetadata());                  // Here I also copy metadata from my own domain             char **papszMD;              papszMD = poDS->GetMetadata(MD_DOMAIN_MSAT);                    if (papszMD != NULL)                      poVDS->SetMetadata(papszMD, MD_DOMAIN_MSAT);                   for (int i = 0; i < poDS->GetRasterCount(); ++i)              {                      GDALRasterBand* poSrcBand = poDS->GetRasterBand(i + 1);                      GDALDataType eBandType = poSrcBand->GetRasterDataType();                      poVDS->AddBand(eBandType, NULL);                      VRTSourcedRasterBand* poVRTBand = (VRTSourcedRasterBand*)poVDS- >GetRasterBand(i + 1);                      poVRTBand->AddSimpleSource(poSrcBand,                                      xoff, yoff,                                      xsize, ysize,                                      0, 0, xsize, ysize);                      poVRTBand->CopyCommonInfoFrom(poSrcBand);                           // Again, I copy my own metadata                      papszMD = poSrcBand->GetMetadata(MD_DOMAIN_MSAT);                      if (papszMD != NULL)                              poVRTBand->SetMetadata(papszMD, MD_DOMAIN_MSAT);              }                    return poVDS;      }


title: GRASS r.grow doesn't seem to change raster values at all

text: I have a raster map in GRASS that looks like this: ![Raster map with binary values](http://i.stack.imgur.com/KeLQz.png) The red cells have a value of 1, the yellow cells have a value of 0. I am trying to use the `r.grow` command to 'fill in' the gaps in the red lines, but it seems that whatever options I give the command, the output is either exactly the same as the input, or entirely 1, or entirely 0. The way to run the command that seems most sensible is:               r.grow input=extracted@PERMANENT output=gr8 radius=3.01      which, as far as I can tell, should grow all positive cells by 3 cells. However, it doesn't seem to do anything at all - the output map is exactly the same as the input map. Changing the `old` and `new` values doesn't seem to change it either. Am I doing something wrong here? I have read through the manual page for the `r.grow` command many times, but can't see what I'm missing.


title: Check if lat/long point is within shape

text: I'm a bit new to ESRI and GIS so forgive me if this is a simple question. Looking at this example ESRI Javascript sample (source code is here) I see you can click on a shape (via a published shape file) and if the point upon which you click is within a shape an action fires. Is it possible to send a lat/long via some mechanism and IF that lat/long is within the shape the same (or similar) action fires? or Can I see if a lat/long is contained within ANY polygon that is contained in a published shapefile. If my understanding of the ESRI javascript API is correct the point that the mouse is clicked does translate to a lat/long location.


title: Error running ArcHydro tools function in Arcmap

text: I am trying to run a function from ArcHydro tools in Arcmap 10.1; Sink evaluation. But before it can finish it returns an error message, that, frankly, I don't understand at all. It goes *System.runtime.interopservices.comexception (0x80004005): error hresult e_fail* . Can anyone help me solve this? I have tried all I can think of. Run the function from the toolbox instead of dropdown menus, shorten paths, restart Arcmap, reinstall AHT, open new map documents, restart my computer, wait till next day and see if it automagically have fixed itself... After searching this forum I found a possible duplicate, although it's got no answers. Now I'm all out of ideas, can anyone please help me?! ![enter image description here](http://i.stack.imgur.com/ada5I.png) I'm using ArcMap 10.1 SP1 basic license and Windows 7. EDIT: I think I have narrowed it down a bit, still not clear what's wrong though. Sink evaluation uses a series of functions in Arcmap, of which one is _Zonal statistics as table_. That's the one it gets stuck on. The input raster somehow does not exist, path unknown. I guess this is some intermediary raster. ![enter image description here](http://i.stack.imgur.com/HPqkt.png) EDIT2: After consulting the Archydro team, I got the advice not to use grids stored in a gdb (which I didn't). I have also tried to change target locations, thanks to @G.Oxsen. Unfortunately neither of those solved the issue. According to the Archydro team, GPL0 that I asked about earlier is an in-memory grid, so probably no problem there. I am currently pursuing that it is related to the installation of SP1. Anyone out there using AHT with SP1 and got Sink evaluation working? EDIT3: Uninstalling SP1 did not change anything, unfortunately. Still working on this, but with less intensity. Seems like I'll have to find workarounds... Final Edit: By reducing the number of sinks in need of processing I managed to get Sink evaluation running. Having the files not stored in a gdb seem to help as well, as mentioned earlier, and using integer grids. Changing the "Maximum number of uniqe values to render" in ArcMap Options (Customize menu), tab Raster --> Raster dataset is another tip that I got (from the ArcHydro Team). Restarting Arcmap after running every one or two functions also helps keeping things stable.


title: system runtime error from ArcHydro

text: I am getting the below error during execution of archydro. "system runtime interoperservices com exception (0x80004005): error HRESULT E_FAIL" I tried all options available on internet to solve this but no luck. What is the cause of these type of issues? Is this related to application or os ? What is the perfect fix if it is caused by arcgis/hydro or os ? I am using windows7, 64-bit, Arcgis10.


title: Combining Python and QGIS out of console

text: I was wondering if it's possible to use Python and QGIS out of QGIS environment (namely, avoiding the use of the console). I'm pretty new to QGIS, I've been always using ArcGIS 10.1. What I am looking for is a thing similar to that "arcpy" module, since I work with tons of data at a time. Moreover, I'd like to use a good IDE, any suggestion? I'm using qgis 1.8, python 2.7.2 32bit, windows 7 64bit. P.S.: I couldn't really come up with a solution, neither following the instructions found in http://www.qgis.org/pyqgis- cookbook/intro.html#python-applications. Hope someone will enlight me!


title: How to set page size in Arcpy?

text: It is possible to set Page size in arcpy, i'm looking for any tricky way to set the page size, using pure python or Arcpy. Thanks in advance


title: Issues Accessing ESRI File Geodatabase within Quantum GIS Desktop

text: I am trying to access ESRI file gdb from Quantum GIS. I am on Windows 7, 64-bit. I have found many useful threads on how to set up this functionality within Quantum GIS. The method I went for is described in this thread. I installed QGIS as part of the OSGeo4W package. I went for an 'Advanced' installation and added QGIS (v.1.8.0) + 'gdal-filegdb:OGR File GDB Driver' library. This has been installed with no issues. In QGIS, when I navigate to 'Add vector layer' window and choose File GDB as source type, I am able to preview contents of the file gdb in the following 'Select vector layers to add' window. Upon making my selection I can see the layer being displayed in table of contents, however after a short while qgis is crashing. I have attached couple of screenshots of this process: ![enter image description here](http://i.stack.imgur.com/MJlPt.png) ![enter image description here](http://i.stack.imgur.com/G0TrV.png) Does anybody have similar experience or else can suggest solution to this issue? Do I need the ESRI File Geodatabase API installed as well to be able to access ESRI file GDB? Many thanks, Magda


title: Data Driven Pages and exporting PDF using Python

text: I am able to zoom into `map_index` shapefile rows for a group of mxd documents in layoutview and export zoomed record as a PDF document at the same time. I tried to combine below codes to make the procedure possible but no luck. Below code is for zooming into map_index shapefile row values in layout view.               import arcpy     mxd = arcpy.mapping.MapDocument('CURRENT')     df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]     for row in arcpy.SearchCursor("C:\Users\Desktop\Maps\map_index.shp"):       df.extent = row.SHAPE.extent        df.scale = df.scale           for df in arcpy.mapping.ListDataFrames(mxd):     mxd.activeView = df.name     mxd.title = df.name     mxd.saveACopy(r"C:\Users\Desktop\Deneme\\" + df.name + ".mxd")     arcpy.RefreshActiveView()      Below codes is the export to PDF document               import arcpy     mxd = arcpy.mapping.MapDocument(r"C:\Project\ParcelAtlas.mxd")     ddp = mxd.dataDrivenPages     indexLayer = ddp.indexLayer     arcpy.SelectLayerByAttribute_management(indexLayer, "NEW_SELECTION",                                           '"PageNumber" >= 1 AND "PageNumber" <= 10')     for indexPage in ddp.selectedPages:     ddp.currentPageID = indexPage     ddp.exportToPDF(r"C:\Project\Output\Page" + str(indexPage) + ".pdf", "CURRENT")     del mxd      Can any one help me please? I dont know if its possible but any help would be appreciated.


title: Geoserver layer preview not working in windows

text: I've installed geoserver 2.2.4 on windows 7 , did a layer preview (with default line style) on roads layer. When I click on map , I get info below the map div with the road name , but the map itself is blank. Tried the same procedure on linux (ubuntu) , works fine. (But I need it to work on Win) Any idea ?! Log: http://pastebin.com/ptCxRQBk Screenshot : ![enter image description here](http://i.stack.imgur.com/ly3qD.png)


title: Copy Parallel - Problem

text: Our data is of pipelines and nodes wherein for each feature there is a line and a point node as end points. So while copying parallel lines, we need to customize the OOTB tool so as to copy specific number of lines and create a node point at end of each line. In general tool is working fine except for the scenario where it is a 'V' shaped feature i.e any angled feature. I have attached the data before using our customised copy parallel and after using the tool. I am working on ArcGIS 9.3.1 ESRI product. ![After copy parallel](http://i.stack.imgur.com/Fgrnt.png) ![Before copy parallel](http://i.stack.imgur.com/qTGc2.png)


title: ESRI Javascript APT FeatureSet input to custom Geoproecessing tool

text: I have an ESRI Javascript application that uses a geoprocessing service that uses a cutsom GP tool. Since I have a set of values to be passed to the GP service I am planning to pass in it as a record set instead of string values. These are just attributes and no geometry associated with it. I think I can use FeatureSet in Javascript to pass GP input parameters. Something like this. Let me know if this is the right way to pass record sets. I will have several records.               var attr = {"OBJETID:1", "Name":"Test", "Address:"Value2"};     var graphic = new esri.Graphic(null,null,attr,null);     var features= [];     features.push(graphic);     var featureSet = new esri.tasks.FeatureSet();     featureSet.features = features;      Now inside the custom GP function tool how do I set the paramaters to read the input? Following is what I am trying to do. Is this the correct approach?               IGPParameterEdit gpParameterEdit = new GPParameterClass();      IGPDataType gpDataType = new GPRecordSetTypeClass();// GPStringTypeClass();     IGPValue gpValue = new GPRecordSetClass();// GPStringClass(); ;      gpParameterEdit.Name = "legal_desc";     gpParameterEdit.DisplayName = "Legal Description";     gpParameterEdit.DataType = gpDataType;     gpParameterEdit.Value = gpValue;     gpParameterEdit.Direction = esriGPParameterDirection.esriGPParameterDirectionInput;     gpParameterEdit.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;      Then while Casting the value, How do I cast and read the values from the input featureset? Following is what I am trying to do and it is returning null for gpRecordSet.               IGPValue gpValue = parameterValueArray.GetGPValue(_parameterIndex);     IGPRecordSet gpRecordSet = (IGPRecordSet)gpValue;      Basically I am trying to see how to pass in set of attributes from JavaScript and read it in custom GP Tool. Now the return value I expect in the JavaScript application is a polygon graphic and no attributes. What is the best way to return the polygon? What I understand from my research is that I need to create in-memory featurecalss and return the polygon as feature. Is there a better way. All help appreciated.


title: sld parser for version 1.1.0 with Openlayers

text: I am using Openlayers 2.11 and need to style a layer with a sld file version 1.1.0. the error it says is **Uncaught Can't find a SLD parser for version 1.1.0**. i have also tried it with Openlayers 2.12.


title: ArcPy 10.1 PointGeometry.projectAs()

text: I'm trying to reproject an X,Y passed in from an Add-in. So far this works fine:               pointGeometry = arcpy.PointGeometry(arcpy.Point(x,y),srIn,False, False)     projectedPoint = pointGeometry.projectAs(srOut)      Based on `projectAs (spatial_reference, {transformation_name})` I should be able to pass in the transformation_name, but I have no idea where a list of constants may be (says it's a string)? In .NET I would use 'OSGB1936_To_WGS1984_2', for the transformation I am after. Thanks for any help Tony


title: Troubleshoot editing features in feature dataset with ArcMap / ArcSDE Oracle

text: I am having trouble editing a feature class that is in a feature dataset. We have added just the single feature class as a layer in ArcMap and are using the "Start Editing" function on the Editing toolbar to edit. ArcMap reports that "All data sources in the map are registered as versioned or you lack privileges to modify data sources which are not registered as versioned.". The database and feature dataset are versioned. We confirmed this with ArcCatalog. We are also unable to make non-versioned edits. We have selected to edit a version from the Editing toolbar options. `sdelayer` reports that the connecting user (also the schema owner) has SELECT, INSERT, UPDATE, DELETE permissions on the layer. Oracle's `dba_tab_privs` reports that we have SELECT, INSERT, UPDATE, DELETE permissions on the business table. If I connect to the geodatabase with the SDE user, I cannot grant new privileges to the schema owner to the feature dataset. ArcCatalog reports an automation error. If I connect to the geodatabase as the schema owner, I _can_ grant new privileges (to "myself") to the feature dataset. However, I don't know if they have made any effect. This is ArcGIS 9.3.1. What is left? Are there any sure-fire solutions? **UPDATE** : I copied the feature class to a new one (located outside the featuredataset), which I can edit. When I put the feature class inside the feature dataset, I can not. What has the final say on feature dataset permissions? I need to iron out what's causing ArcMap to think _"you lack privileges to modify data sources"_. The feature class in question has many (hundreds) of relationship classes. I suspect that these are the source of my troubles. I will ask a separate question about those...


title: Error adding data to Geodjango database: parse error... within geometry

text: I'm trying to insert some values into a Geodjango database, but getting errors. This is the table:               class Place(models.Model):         placeid = models.IntegerField(primary_key=True)         structidx = models.IntegerField(null=True, blank=True)         oscode = models.PointField(null=True, blank=True)         waste86 = models.CharField(max_length=120, null=True, blank=True)         objects = models.GeoManager()      And this is the code I'm using to insert data:               INSERT INTO domes_place (placeid, structidx, oscode, holding)       VALUES ('10', '1', '1', 'POINT(632000,141000)', 'N');      And this is the error:               HINT:  "POINT(632000," <-- parse error at position 13 within geometry      Please could someone tell me what I'm doing wrong?


title: PostGIS: Convert meters to arbitrary spatial reference units?

text: I'm writing a query that needs to be able to work with data of any SRID. The basic problem is very simple - I get two pieces of information:   1. A point (SRID = 900913)   2. A distance (unit = meters) I [would like to] transform these into the native SRID, and then run a query to find features within the given distance of the point:               proj_point = ST_Transform(point, (SELECT ST_SRID(geom) FROM table LIMIT 1));     proj_dist  = Something...  But what?          SELECT * FROM table         WHERE ST_Distance(geom, proj_point) < proj_dist         ORDER BY geom <-> proj_point         LIMIT 10;      My problem is the conversion of the units. I can look up the SRID of the native data and transform the point no problem. **But how do I do the same with the distance?** I've seen answers to related questions, but they have all involved reprojecting the queried data. Holy overkill! This should be doable with a single lookup and multiplication... Pointers, anyone? Thanks very much in advance!


title: OGR - Weird GeomType -2147483645 on polygon shapefile

text: I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this:               datasource = ogr.Open("c:\\temp\\data.shp")     layer = datasource.GetLayer(0)     print(layer.GetGeomType())      The print returns: > > -2147483645 I wonder what Geom Type is this. Is it an error in the data or is it a real Geom Type? **Edit:** After using ogrinfo as elrobis suggested I have this output: > INFO: Open of `C:\\\ArcGIS data\\\Mun_region.shp' using driver`ESRI > Shapefile' successful. > > Layer name: Mun_region Geometry: 3D Polygon Feature Count: 2 Layer SRS WKT: > (unknown) OGR_GEOMETRY: String (0.0) OGRFeature(Mun_region):0   >  OGR_GEOMETRY (String) = MULTIPOLYGON > > OGRFeature(Mun_region):1 OGR_GEOMETRY (String) = POLYGON


title: Join multiple shapes in a workspace based on a common field

text: I’m completely stucked!!! I’m working with meteorological data (wind) but I have to arrange the data for a program to be able to process it. I have text files, two per day (one with the wind direction and the other with the speed). I’m working with ArcGis 10, Model Builder and my little knowledge on python. I’ve already manage to calculate in a point shapefile the date and the information, if it’s direction or speed, because it was information available only in the filename. But now, I don’t know how to join the two files together. The fields schema I have it’s like: POINT_ID / DATE / WIND (dir or spd) / ID_DATE (unique field) // DIR / SPD I have like 1000 days to process and I have no idea how to continue!! The goal would be to make a join based on the ID_DATE field, so I have a unique file for each day instead of two, with the pertinent values of DIR and SPD (already calculated for each individual file). I need to implement an attribute join with the two tables (dir and spd). The problem is that I have like 1000 different days, therefore 2000 tables to join. I was thinking on something like reading the filename, where the date is within the name, and when finding two identical dates performing the join… So I need to read through the folder (or two separate folders with dir and spd) and indicate somehow the common attribute field or filename…. Thanks in advance


title: Problem with writing the srsName into gml output in OpenLayers

text: I am trying to write out my geometry in gml format after it is drawn in OpenLayers. Actually it is working fine, I get the gml like this:               <gml:Polygon>     <gml:outerBoundaryIs>     <gml:LinearRing>     <gml:coordinates decimal="." cs="," ts=" ">8.62975388121127,46.34818691143132 8.761589818711352,46.590322794368646 9.124138646836665,46.43911409951752 8.805535131211348,46.24951148519901 8.62975388121127,46.34818691143132</gml:coordinates>     </gml:LinearRing>     </gml:outerBoundaryIs>     </gml:Polygon>      But unfortunately I need it to have the coordinate system (srsName) defined in it, like this:               <gml:Polygon srsName="EPSG:4326" >     <gml:outerBoundaryIs>     <gml:LinearRing>     <gml:coordinates decimal="." cs="," ts=" ">8.62975388121127,46.34818691143132 8.761589818711352,46.590322794368646 9.124138646836665,46.43911409951752 8.805535131211348,46.24951148519901 8.62975388121127,46.34818691143132</gml:coordinates>     </gml:LinearRing>     </gml:outerBoundaryIs>     </gml:Polygon>      Here is my code:               draw.events.register('featureadded', this, function(evt) {        var feat1 = vectors.features;        var gml = new OpenLayers.Format.GML({                        format: OpenLayers.Format.GML.v3,                       formatOptions: {                            srsName: "urn:x-ogc:def:crs:EPSG:4326",                        }                  });        for (var i=0; i<feat1.length; i++) {        var geomtransformed = feat1[i].geometry.transform(new OpenLayers.Projection("EPSG:3857"), new OpenLayers.Projection("EPSG:4326"));        geomout = gml.buildGeometry.polygon.apply(gml,[geomtransformed]);        console.log(geomout)           }     });      This is working but the srsName does not appear in the gml. So could you please advise me if it is possible to transform vector feature to gml with writing the srsName into the gml, and if yes, how?


title: ArcCatalog 9.3 (ArcInfo) wont open

text: ArcMap, ArcScene and everything works fine and opens without problem. But, ArcCatalog cannot open. A window pops up and says- Microsoft Visual C++ Runtime Library. Runtime Error! Program: C:\Program Files (x86)\ArcGIS\Bin\ArcCatalog. This application has requested the runtime to terminate it in an unusual way. Please contact the application's support team for more information. PLEASE HELP!


title: How to count points in shapefile within polygons of another shapefile?

text: I'm creating a map with two shapefiles. One is a polygon of counties. The other is points of cities. I used the function intersect to group the cities in each county. I'm trying to get the **number** of cities in each county to show up in the legend. For example in County A there are 16 cities...In county B there are 7 cities...and so on. I'm trying to create a choropleth map that shows the number of cities in each county


title: Is there an ADO.NET 2.0 driver for the ESRI file geodatabase?

text: I am trying to make a connection to a file geodatabase to issue some SQL queries. I don't need any spatial functionality, we're just trying to get data out of tables. The application making the queries can use ADO.NET 2.0 drivers, which implement the `DbProviderFactory` classes to connect to various database and data sources. I have found this: https://filegdbdotnet.codeplex.com/ but it's ADO 1.1 and doesn't implement the factory classes. There's an Ole DB provider (`ESRI.GeoDB.OleDB.1`) but I think that requires an ESRI license to activate. I'd like to avoid using that if possible since we can't be sure that the target machine running the application will have that. Is there an ADO 2.0 driver for the file geodatabase?


title: Looping Summary Statistics on changing field name

text: I am trying to calculate summary statistics for a number of shapefiles, which is easy enough, but the field name for each shapefile is different. The field name is identical to the file name if that makes things easier. I'm trying to use the following script:               import arcpy, os     from arcpy.sa import *          arcpy.env.workspace = r'C:\Users\kellyj\Desktop\Projects\CostAnalysis\SHP'          for file in arcpy.ListFiles("*.shp"):         arcpy.env.overwriteOutput = 1         filename = file[0:-4]         print "Calculating " + filename         arcpy.Statistics_analysis(file, arcpy.env.workspace + "/" + filename, [[filename, "SUM"]], "")          print "Done"      How can I write this script so that I can use the file name as the statistics field?


title: List of GIS Challenges, Competitions or Puzzles

text: In software development there are tons of various challenges or competitions, just take a look at stackoverflow. Also, there are challenges with huge prizes involved, such as for netflix competition (data mining task for movie recommendations). Even more, in software development learning is usually by solving puzzles, varying from such simple tasks as reordering of a stack or reinventing dijkstra algorithm to more complicated, such as AI for checkers. These puzzles/competitions are not only great for competing, but they also 'force' you to search, study and improve your skills. After having a quickie with google, I couldn't find much. There was a poster competition, we can also say that TSP or VRP is somewhat of GIS challenges. It seems that ESRI also held some kind of competition. So my question is as following -- are there any competitions or (even more importantly) puzzles (for learning mostly) for GIS?


title: Export selected columns (to excel or dbf) in ArcGIS Desktop 10.1

text: It might be the very basic question.. I have lots of column in shape file and I need few columns. Therefore, I am trying to select using control and trying to export but it exports all the columns (I did not get “selected records “option while exporting) Image 1 :![Selected columns](http://i.stack.imgur.com/YcWmJ.png) -Tried using Arc tool-box (Data management tools and few more) but not getting suitable option  Researching on Google and going through following posts Post 1 ,Post 2 (I do not think its proper way) So any help will be great !! Thanks in advance : )


title: Calculating beta-diversity w raster data [renamed]

text: Using ArcGIS 10, it is not possible to generate a raster attribute table for 32-bit float values. Instead, I have tried the RasterToNumPyArray method, which crashes since the file input raster is so large (I'm talking >7GB). I've also tried converting the raster into an ASCII text file, and from there reading the file, line by line, into numpy arrays: e.g.               import numpy as np     file = open(r"c:/yourfile.txt", 'r')     array_list = []     for line in file:         array = np.loadfromstring(line.strip(), dtype = np.float32, sep = " ")         array_list.append(array)      My main issue is that this is still pretty slow since the file has 71058 columns and 27820 rows. Any advice? The troubling thing is that I can generate a list of unique values in ArcMap from symbolization, but there's no easy real way to move them into a table (besides copy and paste of each value). Many thanks!


title: Bounding box for PostGIS table

text: Is there an easy way to get the bounding box for an entire table in PostGIS? Thanks


title: Not showing multiple markers on OpenLayers

text: I want to show multiple markers on my Google map with OpenLayers. Below is my code :               for (var pointcount = 0; pointcount < jsonObj.length; pointcount++) {          if (jsonObj[pointcount].Long != null && jsonObj[pointcount].Lat != null) {              var markerslonLat = new OpenLayers.LonLat(jsonObj[pointcount].Long, jsonObj[pointcount].Lat).transform(WGS84, map.getProjectionObject(), 0);         map.panTo(markerslonLat);              markers.addMarker(new OpenLayers.Marker(markerslonLat, icon));              alert('  marker added. Long : ' + jsonObj[pointcount].Long + '    ||    lat : ' + jsonObj[pointcount].Lat);     }      But, it shows only last one. what i missed in code. Any help would be appreciated. :) Thanks.


title: Python Function for Altering shapefile's attribute datatype

text: I want to merge a few hundred shapefiles depending on geometry type, which are in several directories and subdirectories. i have written a python script and i am using mainly arcpy for the routines. But the process cannot be completed as there is a problem on the datatype of a common attribute in all shapefiles. In most of shapefiles the datatype of this attribute is **string** and in some other is **double**. I found the shapefiles with attribute datatype double, but these are a few, and cannot be done one by one. So i am looking for a function that changes the datatype of this attribute, filtering the current datatype. Thanks in advance.


title: What is the best way to parse ESRI geocoding results?

text: My project uses one of ESRI's ArcGIS online geocoding services to provide address searching capability. Specifically I use this locator (only through the premium subscription model): http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer Now, what I want to do is take the address candidates from the result set (when there are more than one, which is often) and choose the closest, best matching candidate for the user and present that to them rather than have them choose from a list of candidates. Take this simple example: Address:               50 22nd St, National City, CA      Returns the results, with the address, score and locator name for each:               --------------------------------------------------------------------     50 E 22nd St, National City, CA, 91950     – 90.97    – US_Streets     50 W 22nd St, National City, CA, 91950     - 90.97    – US_Streets     National City, CA                          – 100.0    – US_CityState     City Terrace, CA                           – 94.35    - US_CityState      For this example the best thing to do is present the user with a choice between `50 E/W 22nd St.` Right? I say that because taking `National City, CA` as the right choice would be inaccurate, even thought it has score of 100. Another example:               1700 Alondra Blvd, Compton, CA      Returns these results:               ---------------------------------------------------------------------     1700 W Alondra Blvd, Compton, CA 90220     – 90.97    – US_RoofTop     1700 E Alondra Blvd, Compton, CA 90221     – 90.97    - US_Streets     1700 W Alondra Blvd, Compton, CA 90220     – 90.97    – US_Streets     Alondra Blvd, Compton, CA, 90746           - 100      - US_StreetName     Alondra Blvd, Compton, CA 90220            - 100      - US_StreetName     Alondra Blvd, Compton, CA, 90221           - 100      - US_StreetName     E Alondra Blvd, Compton, CA, 90746         – 88.71    - US_StreetName     W Alondra Blvd, Compton, CA, 90220         – 88.71    - US_StreetName     W Alondra Blvd, Compton, CA, 90220         – 88.71    - US_StreetName     W Alondra Blvd, Compton, CA, 90746         - 88.71    - US_StreetName     E Alondra Blvd, Compton, CA, 90221         – 88.71    - US_StreetName     E Alondra Blvd, Compton, CA, 90220         – 88.71    - US_StreetName     Compton, CA                                – 100.0    - US_CityState     East Compton, CA                           – 95.48    - US_CityState     West Compton, CA                           – 95.48    - US_CityState      Do you return a choice between E/W as the previous example or do you try and make an educated guess and return `Alondra Blvd, Compton, CA` because `US_StreetName` is pretty reliable and shouldn't be ignored? My algorithm below will return `Alondra Blvd, Compton, CA` but perhaps it'd be more consistent to return E/W as a choice. You could also argue that you should just choose for the user and return `1700 W Alondra Blvd` as Google does. * * * Here is the algorithm that I use to determine the best address, most of the time. **The Algorithm**   1. Ahead of time make a list of your preferred locators and determine a minimum match score for each. You are to prefer the results from these locators over any others. Also, make an all-time minimum match score to filter all results by, as your fall back option. This is so that you avoid, really poorly geocoded results.   2. Iterate over your preferred locators one a time. Look at just those candidates whose locator is the locator your interested in during each iteration.   3. For each candidate compare the score with the current preferred locator's score to see if it meets or exceeds the locator's minimum match score.   4. If the candidate's score meets or exceeds the minimum match score for that candidate take that one candidate as your best match and return it to the user.   5. If the candidate's score does not meet or exceed the minimum match score, keep looking through the candidates.   6. If you haven't found a candidate whose score meets or exceeds the minimum match score for the current locator, keep looking through the locators for a match. // Usually a candidate is found in these first steps, but if not ....   7. Take your all-time minimum match score and iterate over your candidates removing any candidates whose score is below this all-time minimum match score.   8. Order this list of candidates by their score and return them all to the user to choose from. What is the best way to do this? How can I improve my algorithm? Thanks!


title: Why does the next() method fail after the last record, using arcpy.da.SearchCursor?

text: Using the older arcpy.SearchCursor, the `next()` method would return `Nothing` once the last record had been passed. Using the newer arcpy.da.SearchCursor, I'm finding that the next() method crashes the script if there are no more records. To illustrate:               import arcpy     fc = "C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcGlobeData\continent.shp"     fields = ["CONTINENT"]     where = "CONTINENT = 'Asia'"     with arcpy.da.SearchCursor(fc, fields, where) as cursor:         for i in range(0,5):             row = cursor.next()             print row      There is only one record in the cursor, so the first time it iterates the name is printed. But the second iteration throws a StopIteration error. How should we use `next()` with `arcpy.da.SearchCursor?`


title: gdal_merge.py with single band raster

text: I'm trying to mosaic the True Marble world imagery 250M geotiffs using gdal_merge.py though one of them doesn't have RGB bands like the rest and gdal_merge fails (same number of bands is listed as a requirement in it's documentation). This is the error I get:               python.exe : ERROR 5: TrueMarble.250m.21600x21600.B4.tif: GDALDataset::GetRasterBand(2) - Illegal band #      This is the tile causing the issue: `TrueMarble.250m. 21600x21600.B4` Should I use a different mosaic tool or should I try to coerce the tile into the format gdal_merge requires somehow?


title: Add MicroStation dgn to ArcGIS/ArcCatalog 10.1

text: I'm an iOS programmer but new to using ArcGIS 10.1. I'm having a problem loading my MicroStation dgn file to ArcCatalog. I've connected the folder containing my MicroStation V8i roadway design dgn to the Catalog Tree and tried to define a spatial reference as described in the ArcGIS 10.1 Resource Center. When previewed, the drawing looks like a small blob that I can't zoom or view. I'm stuck to determine what the problem is. I'd think that the drawing should display in full as read only. If anyone as any suggestions I'd greatly appreciate some direction here. Overall, I hope to overlay the dgn (drawing) over one of ArcGIS' basemaps. I can supply any information about my dgn or setup in ArcCatalog upon request. Thanks in advance for your time. *Here's a screenshot of how the preview of the drawing looks.  (https://www.dropbox.com/lightbox/home/Photos/Sample%20Album) I think the blob on the right hand side is the drawing but I can't be sure what's all there because I can't zoom in to see it better.


title: How to Create a Note System inside QGIS

text: I need to make something similar to a note system, where i can create a feature that will give me something similar to a note system (or a square in the map linked to a feature that will only show itself when editable) where i can type any notes. the point of this is to correct map details and i have a lot of employees that don't know how to correct them so i need a system in which if they see some errors in the map they will just have to place a feature (or something similar) close to the errors and then specify the errors (so it can then be fixed later on). there is one more thing, i said that adding a feature combined with a note system would be good because i need to have certain control over the overall notes or features, for example, in case that i need to search for it all at once or edit it all at the same time. if there is no such thing then maybe a recommended plugin would come in handy. i really appreciate any help given since this is a really good project of an entire state and a lot of people depend on improvements made by me so thank you in advance.


title: How to find the polygon inside which a point lies?

text: I have a layer with polygonal features. Each feature has attributes and values. I also have a list of co-ordinates and I would like to know which feature (or polygon) the co-ordinates lie in. Could someone please guide me on how to go about this? Is there a function in the API that can help me achieve my goal or should I use some computational geometry algorithm to do it myself? I know how to do the latter but it would save me some time if there was a built in function already. Thanks.


title: Using PostGIS functions in ArcGIS Desktop for Layer Definition Query?

text: I am connecting ArcGIS Desktop 10.2 to Postgis 2.0.3 with PostgreSQL 9.2.4. No SDE. I can load data with no problems and access the data in ArcMap. However I can't seem to use PostGIS functions within a layer definition query. For example:               ST_DWithin(location, ST_GeomFromText('POINT(-97.5 35.5)', 4326), 0.01);      Which works perfectly from PostgreSQL returns the error: > One or more layers failed to draw: Report: Failed to parse the where clause. This is strange, as if the exact same query is used to define the underlying source query for the layer it works fine. Am I missing something here. I used to have this working for Oracle no problem. What doesn't it like about PostgreSQL's query?


title: Points to Polygon

text: I've millions of points collected for lithology layer. They have used a coding for different types of rocks. I need to create a polygon around the extent of similar points. What is the easiest way to get the polygon rather than digitising manually. I was searching for tools that convert points to polygons but looks like there arent any. I've seen tools for converting line to polygons, polygons to lines and points but not for points to polygons. Your help in this regard is highly appreciated. Thank you.


title: Rectangle polygon is displayed as triangle

text: i am wondering why a rectangle polygon that i have created on an official german surveying website (downloaded as compressed shape in a zip-file) is displayed as a triangle when loaded in qgis. mighty this have somethting to do with the chosen refence system (wgs84)? at first this problem could temporarely be solved by starting the editing mode of this layer, but when ending editing the displayed rectangle is shown as a triangle again... thank you so much for any help


title: Are there newer routing algorithms (than Dijkstra, A*) in GIS databases?

text: There are works like Reach for A* from Microsoft researchers and Highway Hierarchies by Sanders and Schtolz (if I spell the name correctly) from Karlsruhe Uni. Both of them reduce the calculations order a lot, and speed up thousand times on large graphs (see the results in the linked documents). The latter work led to Open Source Routing Machine, which unfortunatly isn't popular enough and not adapted (I couldn't compile it although tried hard). At the same time, the dbs that I tried, Spatialite and PgRouting, according to their docs, offer just Dijkstra and A* algorithms. I've not even seen bi- directional search mentioned, which saves calculation time twice in my experience. Are there better algorithms for databases or other applications?


title: How is the data access cursor performance so enhanced compared to previous versions?

text: The data access module was introduced with ArcGIS version 10.1. ESRI describes the data access module as follows (source): > The data access module, arcpy.da, is a Python module for working with data. > It allows control of the edit session, edit operation, improved cursor > support (including faster performance), functions for converting tables and > feature classes to and from NumPy arrays, and support for versioning, > replicas, domains, and subtypes workflows. However, there is very little information regarding why cursor performance is so improved over the previous generation of cursors. The attached figure shows the results of a benchmark test on the new `da` method UpdateCursor versus the old UpdateCursor method. Essentially, the script performs the following workflow:   1. Create random points (10, 100, 1000, 10000, 100000)   2. Randomly sample from a normal distribution and add value to a new column in the random points attribute table with a cursor   3. Run 5 iterations of each random point scenario for both the new and old UpdateCursor methods and write the mean value to lists   4. Plot the results What is going on behind the scenes with the `da` update cursor to improve the cursor performance to the degree shown in the figure? * * * ![enter image description here](http://i.stack.imgur.com/2kXrN.png) * * *               import arcpy, os, numpy, time     arcpy.env.overwriteOutput = True          outws = r'C:\temp'     fc = os.path.join(outws, 'randomPoints.shp')          iterations = [10, 100, 1000, 10000, 100000]     old = []     new = []          meanOld = []     meanNew = []          for x in iterations:         arcpy.CreateRandomPoints_management(outws, 'randomPoints', '', '', x)         arcpy.AddField_management(fc, 'randFloat', 'FLOAT')              for y in range(5):                  # Old method ArcGIS 10.0 and earlier             start = time.clock()                  rows = arcpy.UpdateCursor(fc)                  for row in rows:                 # generate random float from normal distribution                 s = float(numpy.random.normal(100, 10, 1))                 row.randFloat = s                 rows.updateRow(row)                  del row, rows                  end = time.clock()             total = end - start             old.append(total)                  del start, end, total                  # New method 10.1 and later             start = time.clock()                  with arcpy.da.UpdateCursor(fc, ['randFloat']) as cursor:                 for row in cursor:                     # generate random float from normal distribution                     s = float(numpy.random.normal(100, 10, 1))                     row[0] = s                     cursor.updateRow(row)                  end = time.clock()             total = end - start             new.append(total)             del start, end, total         meanOld.append(round(numpy.mean(old),4))         meanNew.append(round(numpy.mean(new),4))          #######################     # plot the results          import matplotlib.pyplot as plt     plt.plot(iterations, meanNew, label = 'New (da)')     plt.plot(iterations, meanOld, label = 'Old')     plt.title('arcpy.da.UpdateCursor -vs- arcpy.UpdateCursor')     plt.xlabel('Random Points')     plt.ylabel('Time (minutes)')     plt.legend(loc = 2)     plt.show()


title: severe thunderstorms warnings dataset for europe

text: I'm looking at the possibility of using georef data on historic thunderstorms alerts. Does anyone know of a good (free ) source for this information? Thanks in advance


title: How to set Marker Line symbol for QgsVectorLayer by using Python?

text: QgsVectorLayer Right click->Properties->Style->Single symbol->click on simple line in tree node ->symbol layer type -> Marker line Kindly help me to set marker line symbol programmatically by using Python.


title: Exporting basemap in ArcMap, similiar to export a dataset

text: I am trying to export the basemap in ArcMap to use it with my mosaic dataset. I need these 2 to import and work with in **Unity 3D**. When I am exporting my mosaic dataset consisting of DEM files, I can right click on the dataset and click export. There I have the option to "use renderer" and "square", together with choosing to use either entire mosaic or current view dataset. However, from what I can notice, the only way to export the basemap is to click file - export. ## What is the problem:   * I need the exported DEM to match with the basemap when I export them as .png.    * If the exported basemap is different (different size/pixels) the basemap which is used as a projection over the imported DEM will not match (for example the sea will be projected into the mountainous region of my DEM) Could anyone help me match these 2? I do use photoshop to edit my DEM/basemap for importing into Unity (16bit, grayscale for DEM, etc). Maybe is it possible to photoshop the exported basemap to match with my DEM? Thanks


title: Distance Matrix tool in QGIS. How to get result in metric?

text: I'm trying to calculate the distance between points in layer with distance matrix tool. And keep getting strange results no matter what. Like this   **MASTER** ------------ **SLAVE** ---------------- **DISTANCE** --------- **SHOULD BE**   Metrotown ---------Knox Mountain ------ 0.036069979------------ 48.2 km   Metrotown -------- Central --------------- 0.048071058------------- 29.3 km   Metrotown -------- Rosedale ------------ 0.050883421------------- 60.1 km   Metrotown -------- Kelowna -------------- 0.051697257------------ 340.4 km   Metrotown -------- Ocean Park --------- 0.054471001------------- 29.1 km   Metrotown -------- Langley -------------- 0.055017692------------- 18.7km         First my thought was that the distance is in degrees not in meters. So I tried different CMSs but it didn't change anything. Than I tried to duplicate layer and calculate distances between points between two layers. But nothing changed. NAD83 CMS gave me another unrealistic result ( smth like 5665565, 5675656, etc) Is it even possible? What CMS I should use? I even tried to do this in postgis with ST_Distance and still getting same results. Thank you!


title: OSM data imported. Next?

text: The data was imported using the following command:               osmosis --read-pbf file="/usr/local/lib/geoserver-2.1.3/data_dir/argentina.osm.pbf" --write-pgsql database="argosm" password="1234.5" user="argosm"      And previously these commands were issued:               sudo su postgres               createdb argosm     createlang plpgsql argosm          psql -d argosm -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql     psql -d argosm -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql          psql -d argosm -f /usr/share/postlbs/routing_core.sql     psql -d argosm -f /usr/share/postlbs/routing_core_wrappers.sql     psql -d argosm -f /usr/share/postlbs/routing_topology.sql      The following tables have been created:   * nodes    * relations   * relation_members   * schema_info   * spatial_ref_sys   * users   * way_nodes   * ways Then I added a store in Geoserver, but the only layer I can see with Openlayers, QGIS and so on is "nodes". No rivers, streets, and no street names. I don't know what can I do with this data, or did I miss some step? All processes ended normally, no errors during import. Thank you


title: How to identify each circles in Google Maps API?

text: By the Google Maps Drawing API, I can create lot of circle and other shapes. addListner method helps to get the radius, latitude and longitude of the circle. Now I want to identify each circle for storing its coordinates and radius. The intention is when user clicks in circles, all these values stored in the input button for each circles and submit to database. How can I move forward ? ![enter image description here](http://i.stack.imgur.com/sXwYa.png)


title: Is there a ArcSDE for non-production use available?

text: I am trying to enter the market for GIS. I wish to test some of the things I have written against a ArcSDE server since that is what I used before I became unemployed and that is where my skill set is. For programming/servers there is a multitude of options if you need windows servers or database rental. Is there a ArcSDE equivalent?


title: How do I choose a specific position for ArcMap labels

text: ArcMap 10.1: Labels on tiles I have set up for data driven pages randomly locate around the page instead of in the centre or in the corner where I want them to be despite allowing overlapping labels and setting labels weight to high. How do I choose a position for these labels pls?


title: Convert Shapefile to MySql

text: I have used Grass GIS imported a .shp file; I now want to export this file to MySQL. I understood that MySQL will contain the function of all three the files necessary in a Shape file system (.shp - .db - .shx). The import works fine but when I try to export to MySQL I get the following error.               ERROR: Unable to open OGR data source 'Test'      At some stage there was also a message that indicated that MySQL or MySQL Spatial is not available. I have not used Quantum GIS before; I do however have purchased Globalmapper and want to use MySQL instead of Shapefiles. The database is too big to recapture all the info in MySQL I will have to find a way to convert the data.


title: How to access the icon of a feature retrieved from text in a vector-layer?

text: I`m using OpenLayers to show POIs on a map. These POIs are loaded from a textfile and I`m using a Vector Layer to get it onto the map - works great. Now I want to use the cluster strategy to have points clustered to one when the user is zooming out and the points get to close (see this great tutorial). Works, too. But only for a static image. I want to get the image that is defined in the textfile, but I`m not able to get this. The text file is in the normal format for OpenLayers.Format.Text. The image is defined in the column named icon and as I told, it is shown when not using clustering. According to the Source code of OpenLayers.Format.Text.js the value of the column icon should be stored in the externalGraphic-property. But this doesn`t seem to be the case. Here`s my code to try to get the Image:               var clusterStyle = new OpenLayers.Style({         externalGraphic: "${icon}",         graphicWidth: 24,     graphicHeight: 24,         description: "${description}"     }, {         context: {             icon: function (feature) {         if(feature.cluster)         {             feature.externalGraphic="/img/clusterimage.png";         }         return feature.externalGraphic;             }...      I`ve also tried other constructs like               feature.cluster[0].attributes['icon']      or               feature.externalGraphic=feature.cluster[0].attributes['icon']      to get the icon, but neither worked. So where is the icon stored, how to access it? Is there a qay to iterate the attributes-object? I`m using OpenLayers 2.12


title: Installation does not work

text: I tried to install QGis on my computer (Windows XP Professional) but it does not work at all. I do get the installation wizzard and I can complete that, but nothing happens. After completion, the program is not on my computer. I know that normally two shortcuts end up on your desktop because I did it before on another computer. Now I get nothing and I searched for it everywhere. The problem might be when you have to check which parts you want to install (there you can also download the Alaska and North Carolina datasets). The QGis Lisboa is checked there, but it is paler than the other ones because you cannot change it. I can not check it nor uncheck it. Maybe that is the problem? But what can I do about that?


title: Annotation/Label size adjusting to map scale in QGIS

text: ![enter image description here](http://i.stack.imgur.com/2wxVD.jpg)I'm trying to label the street names for a map I'm working on but I do not want the labels to automatically adjust to the map scale when zooming in or out. My question is: In QGIS how do I set a fixed scale for the labels so that it wont change with the map scale? In the labeling properties I have checked the box "Scale-based visibility" under the rendering tab but it doesn't seem to affect it at all.


title: Proper work flow to move manholes and pipes to surveyed location

text: I would like to know how to accomplish the following task using QGIS. I have an existing point shapefile representing sanitary sewer manholes and an existing polyline shapefile representing sanitary sewer pipes. All pipes are connected (snapped) to a manhole and all manholes are approximate location. Recently a survey crew collected GPS points (4,000) for some of the manholes. I need to move all manholes and pipes to their correct location. How can this easily be done using QGIS?


title: How to add USGS DRG WMS to QGIS?

text: Is there a WMS server, which I can be added to QGIS, that displays USGS DRGs? If so please explain how? Thanks


title: Data visualisation from OSM planet

text: In a similar idea to http://flowingdata.com/2010/05/25/world-atlas-of-flickr- geotaggers/ and http://flowingdata.com/2010/05/25/map-of-where-toursists- flock/ I would like to extract OSM planet data, say the coordinates of schools, and overlay them on a map so that when zoomed out you would get a kind of heatmap of where the world's schools are. Surely this should be relatively easy but I can't find a tool to do it. OSM planet does give coordinates of points by point type, after all, doesn't it?


title: How can I add an interactive map to a PDF?

text: I have been asked to add an interactive map to my company's annual report. The requirements are that it should have multiple layers that can be turned on and off, zoom in/out and pan functionality, and clickable points on the map that will display images. It must be entirely standalone as there's no guarantee that the reader will be connected to a network when they're viewing the document. Any suggestions? (I recognize that this isn't strictly a GIS question, but I'm hoping that someone out there has done something similar to this.)


title: QGIS Labels: letter or word spacing ignored after export

text: My line label have letter spacing of 3px (Layer Properties -> Labels -> Text -> Spacing -> Letter). In print composer everything is drawn like I want it but after export to svg, pdf, or image the letter spacing is simply ignored; the label is drawn without any spacing. Is that a known issue? Is it a bug? Or am I doing something wrong?


title: Is there a way to get create label classes similar to symbology classes?

text: Is there any way to get the same classes of label size as by the symbols? For example: i devided towns according to their population to 5 classes (as graduate symbolology), and want to label each class by different size of fonts. Thanks.


title: Geo-Tagged Tweets and Twitter API

text: When I do a timeline query using the Twitter API...               http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=MyTwitterName The geographic component of the reply looks like this: `<geo><georss:point>49.13786075 -122.85811069</georss:point></geo>` `<coordinates><georss:point>49.13786075 -122.85811069</georss:point></coordinates>` Does anyone know the difference between the geo and coordinates tags? I did look in the Twitter docs but couldn't see anything. Should it always have both, or is one preferred to another?


title: Geoserver GET request to the REST API without authentication

text: I am using Geoserver to serve a number of WMS layers. I am using jQuery's $.getJson('/geoserver/rest//featuretype.json') to programmatically populate a table with the available layers and their abstracts (Geoserver REST API). I am also iterating over a Geoserver reflect request to generate thumbnails. At this point, this requires authentication. Is it possible to access this information through the REST interface without authentication? Should I be making these request through PHP, Python, or cURL, instead of directly calling the URL in the JS? I understand the need to authenticate some of the REST URLs as they provide the login and password for the postgis backend in plain text.


title: OpenLayers GetFeatureInfo Error in Geoserver

text:
I was advised in a previous post to ask this question again using a small data sample My base layer is a postgis vector dataset in WGS84 When I click on the map I get the following an error in the nodelist could somebody help part of the error is here                       X and Y incorrectly specified Details:             org.geoserver.platform.ServiceException: X and Y incorrectly specified at org.geoserver.wms.featureinfo.GetFeatureInfoKvpReader.read(GetFeatureInf             oKvpReader.java:162) at             org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1230) at             org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:488) at             org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:231)             at             org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs             tractController.java:153) ava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)       My openlayers code is generated from a perl script the code below is the result of right click View Page Source.                                   <link rel="stylesheet" type="text/css"href="http://localhost:8080/geoserver/openlayers/theme/default/style.css"/>             <link rel="stylesheet" type="text/css" href="http://localhost:8080/geoserver/www/scale/scalebar-fat.css"/>                                            </style>
OpenLayers PostGis Layers

location

                       **Update New Error** The above works if suggestions by iant are used however if an additional layer is added and the veiwparams in the GetFeatureInfo are altered to incorporate this new layer an error similar to 3 layers selected but 2 veiwparams occurs when you click on the map. Please advise                           var L5678= new OpenLayers.Layer.WMS(                     "5678",                     "http://localhost:8080/geoserver/cite/wms",                     {                     VIEWPARAMS: 'kathy:5678',                     LAYERS: 'cite:Q_Results',                     transparent: 'true',                     isBaseLayer: false                     }                 );          Viewparams: 'kathy:10654,5678',


title: Area of polygon split by a line

text: I need a query that return the area of two polygons that have been split by a line. This is what I did so far:               SELECT ST_Area(ST_Split(surface.geom, limite_a.geom)) from surface,     limite_a   where surface.id = 945 and limite_a.id=123


title: What is the problem with the merge shapefiles tool in QGIS?

text: I'm having trouble merging shapefiles in QGIS. I'm using plugin ftools 0.6.1 and I get this: ![enter image description here](http://i.stack.imgur.com/nLzRq.png) Any workarounds someone may know of? Thanks


title: How to fill my column with consecutive numbers

text: I m very new to Qgis, so forgive this simple question. Searching in older topics didn t help either.So: I make a new column in my attribute table and it has a default value(for example 0). I want to (probably use the field calculator) and have the result,that row 1 has the value 1, row 2=2 and so on, just like a numbered index. I d be thankful for a code example for the field calculator(including the use of $rownum(I think I need this for switching to the line))


title: How to display relative concentration (heatmap) of point features in ArcMap?

text: Please bear with me here - I'm pretty new to GIS, and I'm having a lot of confusion about all the different terms I've seen thrown around. Here's my problem: I have a large dataset of point features, all within a arbitrary geographical area (in this case, the greater San Francisco Bay Area). The point features have no other information besides lat/long. What I want to do is display them in such a way that I can easily see concentrations. I _think_ what I'm looking for is called a heatmap, although I've also seen things like "kernel density", "point density" and other terms. The base of my map is several layers I got from a large dataset. That means that I don't really have a polygon layer that is just the area I'm looking at - the main layer is a polygon feature class of counties in the Western United States. I could extract just the counties I'm interested in if that would make this process easier. I'm looking for something like the images in dkwiens' post in this **thread**. What do I need to do? The simpler the explanation, the better - I've spent quite a while on Google looking for this, and while I've found a lot of stuff that seems like it's what I want to do, I haven't been able to translate it to my problem. **Edit** : I should mention that I think the closest I've gotten is with the point density tool. I set the "input point features" to the layer containing my points, the "Population" field to NONE (the other options are X and Y), and a cell size of 50. I've tried several values of Radius, both in map units and in cell units (whatever that means!). After running the tool, I get a layer that looks like the attached screenshot. But nothing actually shows up on the map. Here's the screenshot: http://i41.tinypic.com/35n7itu.jpg **Edit2** : I noticed that when I look at the generated "File GeoDatabase Raster Dataset" in ArcCatalog, the preview tab has nothing in it - just a blank white screen. Not sure if it's supposed to be like that or not.


title: How to convert existing lines to polygons with Arcobjects, preferably in C#?

text: Does anyone know how to convert existing line geometry to polygons with arcobjects as it works with the geoprocessing tool "feature to polygon"?


title: How to list Feature Classes of Multiple geodatabase in Multiple Folder?

text: I'm new in python scripting and try to list polyline feature classes of multiple Geodatabases. The Geodatabases are in many nested folders.For example in folder "A" I have 20 folders and in each folder i have 3 geadatabases. the question is that how can i list the feature classes of the geodatabases using Arcpy. I know simple Python codes to list feature classes in a folder such as :               import arcpy     from arcpy import env     env.workspace = ".././Data/6"     fclist = arcpy.ListFeatureClasses()     print fclist       I surf in this site and found a Q&A about How to list feature classes in multiple Geodatabases in a folder? . It was very useful but only for multi Geodatabases not multi folders. Thanks For Advanced .


title: Getting the Field Alias from a layer, from within a Map document

text: I've got a very simple script, that loops through all the layers in a mxd and loops through the fields, and prints out the Alias Name for the field, but I am having some problems, it seems to be printing the field alias of the feature class (in SDE) not the value I have changed it to in the map document... Here's the script               import os, arcpy          myMxdFolder = r"D:\Maps"     count = 0          for mxd in os.listdir(myMxdFolder):         #print mxd         if mxd.endswith(".mxd"):             #if mxd.startswith("COMPASS") or mxd.startswith("COLGIS"):             if mxd.startswith("COLGIS_City_Occupiers.mxd"):                 mxdoc = arcpy.mapping.MapDocument(myMxdFolder + os.sep + mxd)                 filePath =  mxdoc.filePath                 print filePath                 for lyr in arcpy.mapping.ListLayers(mxdoc):                     desc = arcpy.Describe(lyr)                     print lyr.name                     fields = desc.fields                     for field in fields:                         print field.aliasName      The output is               OBJECTID     UPRN     ADDRESS     OCCUPIER     SHAPE      but the Aliases in the map document i have set it to are:               OBJECTID     HIGHLIGHT::UPRN     Address     Occupier     SHAPE      and that is what I was expecting, have a missed a trick somewhere in the code? Cheers Halil


title: Vector layer feature destroys after geometry transform

text: I want to get drawn polygon coordinates.               var myLatLonSquare = vectorLayer.features[0].geometry.transform(map.getProjectionObject(),                           new OpenLayers.Projection("EPSG:4326"));      after zoom drawn polygon disappears because of geometry transform. how can I solve this problem without disappearing drawn polygon? Thanks


title: qgis python app how to add edit feature button?

text: I'd like to develop a QGIS Python app for plotting points and editing the attributes. I've started with the tutorials here: http://blog.qgis.org/?q=node/59 and read the cookbook http://www.qgis.org/pyqgis-cookbook/index.html. I'm guessing it's fairly simple to add "edit feature", "add point", "move point" and "delete point", but wondered if anyone would like to share some code, or point me to an example I can borrow. The main reason I want to develop an application at this stage is because of the way QGIS' edit ui thing messes up the date input and null input on my lovely qt4 ui. Any help appreciated Mini


title: QGIS Analyst Create Finished Product for MapInfo Client

text: I use Esri in my day job and am learning QGIS for work on the side. I have a Client that uses MapInfo for creating Posters and Presentations. I have never used MapInfo. I am digitizing geology data that my client would like to be able to drop into his MapInfo templates. But I don't know how I can get the symbology, labels, legend, north arrow, etc..., to transfer over. How do others who work with these programs do this? It seems that data (SHP, TAB, or geometries and projections) can be passed back and forth between the programs, but map layouts and symbology, get lost in translation. The only way I can think of doing it is by creating an image of my finished product that can be centered and scaled in his template. Or, I only digitize the data and leave the symbolizing to him, although this is undesirable for both of us. Any tips would be greatly appreciated.


title: Add-in installed, but its elements not appearing in ArcMap

text: I'm creating an Add-in for ArcMap 10.1. When I export file _testproject.esriaddin_ and install (whether double-click or from _Customize Mode > Add From File_ dialog), message of success appears. But then, I can't find any of my elements in _Customize Mode_ dialog (no _Java Tools_ or _Java Commands_ category, no toolbar in toolbars...). I found this topic, which seemed to be about the same problem. There, the solution was to select JRE: Java SE 1.6 instead of 1.7. I set this in my project, but the Add-in is still not working. What could be wrong? Here is my java class for the button:               package cz.upol.geoinformatics.veselka;          import java.io.IOException;     import javax.swing.JOptionPane;          import com.esri.arcgis.addins.desktop.Button;     //import com.esri.arcgis.arcmapui.IMxDocument;     import com.esri.arcgis.framework.IApplication;     import com.esri.arcgis.interop.AutomationException;          public class Button1 extends Button {         private IApplication app;         //private IMxDocument projectDocument;              /**          * Called when the button is clicked.          *           * @exception java.io.IOException if there are interop problems.          * @exception com.esri.arcgis.interop.AutomationException if the component throws an ArcObjects exception.          */         @Override         public void onClick() throws IOException, AutomationException {             JOptionPane.showMessageDialog(null, "Hello, World!");         }              @Override         public void init(IApplication app){             this.app = app;             //this.projectDocument = (IMxDocument)app.getDocument();         }     }      Here is how it looks after deploy to ArcMap: ![Add-in Manager in ArcMap](http://i.stack.imgur.com/R3Z97.png) I use ArcGIS + SDK 10.1 on Windows 7 32bit and Eclipse 4.3   Did I forgot to mention some details? * * * Edit: Here is my another screenshot: (You can see, that category _Java Commnads_ is not listed in Categories) ![Screenshot Eclipse + ArcGIS Customize window](http://i.stack.imgur.com/CnKH3.png)


title: automated utility network region selection with variables?

text: I am working to develop an automated process of generating polygons at various points along a utility network as part of a dam-failure risk analysis project. I am working with a full license of ArcGIS 10.2.1. The polygons are going to be diamond shaped, with one endpoint at an arbitrary position on the network (the dam) and another at distances of 1, 3, and 5 miles downstream, depending on the maximum probable discharge from a failure event. The polygons need to pull data for their geographic contents from a large number of files which I am unable to load into the mxd all at the same time (key infastructure, structures, population etc). These files are all shps and rasters. This process needs to be performed on thousands and thousands of dams. I have been unable to find a solution to this kind of problem in any of the literature as of yet, so any suggestions/thoughts/ruminations would be extremely valuable to me. Thanks, all.


title: Why is the data missing in my new shapefile?

text: I've made a new shapefile from a part of a attribute table. Marked all the rows that i needed and clicked on "save selection as", added the new layer in my project. All the data is missing, there is only the headlines of the columns. I save the new shapefile like this: Format: ESRI shapefile Encoding: System Layer CRS And the same projection as all the other layers, SWEREF99 12 00. I'm used to work in ArcMap, and I'm now working in qgis, is there a difference in the programmes of how i do this kind of things?


title: km measurement in qgis with EPSG 4326

text: I'm struggling with a small issue. I'm working with the master version of QGIS and I have some layers loaded in my project. All the layer are in 4326 projection and the _on the fly_ option in NOT activated. I want to take some metric measures with the **measure tool** , so I choose Meters as the default unit in the project properties. But length and areas measurements are clearly wrong. If I take a look again at the project properties, degree are set as default canvas unit. If I'm not wrong, with QGIS 2.2 I was able to take metric measurements even if all the layers were in 4326 projection. Am I missing something or there is a bug? Thanks


title: Read .nc file with time range

text: I have a .nc file and I want to split this file for a given time . I have a Var (time,lat,long) I am using read with Range to split my variable. For instance, I need to keep only the last time.               ranges.add(new Range(743,743));     ranges.add(new Range(0,varShape[1]-1));     ranges.add(new Range(0,varShape[2]-1));     dataArray = v.read(ranges);      I write this data to a new file and I have a problem with the result in which my new file doesn't match the old at the same time and I don't know why . ![enter image description here](http://i.stack.imgur.com/jKM33.png)


title: How to vary the transparency of symbols within a single layer in ArcMap?

text: I have a polygon layer which I am drawing in ArcMap using a graduated color symbology: ![enter image description here](http://i.stack.imgur.com/pSyC2.png) Is it possible to vary the transparency between the classes, so that the transparency tapers off with the color ramp? For example, draw the first range (0.175 - 0.225) with no transparency, but the last range (0.45 - 0.52) with 50% transparency. This is the effect I am trying to mimic, taken from Google Earth as a polygon KML: ![enter image description here](http://i.stack.imgur.com/Vk35b.jpg) One workaround could be to create a separate layer for each class using a definition query, vary each layer's transparency, then group them together. Is there a less cumbersome approach?


title: Where to download US zipcode polygons?

text: I need US zipcode areas (polygons) for a web map implementation. Can you tell me where to find it (free or paid)? Thanks!


title: How to convert projected coordinates to lat/lon using Python?

text: I assume this is a basic question but I can't seem to find or recognize the solution. This site returns Point: X: -11705274.6374 Y: 4826473.6922 when you searching with the first key value of 000090 as an example. I guess this is a spatial reference and I kinda get what that is. I am looking for instructions or examples of how to convert this to Latitude and longitude using Python.


title: Mac OS 10.7 QGIS 1.8 Desktop Install Problem

text: I've downloaded QGIS-1.8.0-2.dmg and the required GDAL Complete 1.9 framework package and GSL framework. The frameworks are installed; however, when I try to start the installation of QGIS-1.8.0-2.dmg, I receive this warning: "...disk images couldn't be opened", reason: not recognized. Any help is appreciated. Thanks.