title: Issue with Mosaic to New Raster tool

text: I am having a major issue with the Mosaic to New Raster tool when importing ASC files. It processes the first few files but not all of them. I thought it was a space issue and tried to split the input but this doesn’t help. For ex the output when I run the tool directly and in the python window is out1 ![enter image description here](http://i.stack.imgur.com/CJ0lA.jpg) [code] Direct tool               arcpy.MosaicToNewRaster_management("L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8120000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8121000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8122000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8123000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8124000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8125000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8126000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8127000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8128000_1k_1m_DEM_ESRI.asc;L:/Data_Admin/temp_dataset_storage/LiDAR/FinalSupply/Atherton_Tolga_Walkamin_Mareeba_Bilwon/ASCII_DEM/asc/331000_8129000_1k_1m_DEM_ESRI.asc","P:/2011/Job_106_TRC_FireHazard_Mapping/Working/data/1_Mosaic DEM","Mosaic2","PROJCS['GDA_1994_Transverse_Mercator',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]","8_BIT_UNSIGNED","#","1","LAST","FIRST")      [/code] Python Code - Direct in Arcmap python window [code]               >>> List          ['L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8115000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8116000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8117000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8118000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8119000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8120000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8121000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8122000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8123000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8124000_1k_1m_DEM_ESRI.asc', 'L:\\Data_Admin\\temp_dataset_storage\\LiDAR\\FinalSupply\\Atherton_Tolga_Walkamin_Mareeba_Bilwon\\ASCII_DEM\\asc\\331000_8125000_1k_1m_DEM_ESRI.asc']          >>> arcpy.MosaicToNewRaster_management(List, v1_Mosaic_DEM, 'Name',"PROJCS['GDA_1994_Transverse_Mercator',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]", "32_BIT_FLOAT", "", "1", "LAST", "FIRST")          <Result 'P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Working\\data\\1_Mosaic DEM\\Name'>      [/code] So both processes are loading all the required asc files into the tool but they are not being merged and weirdly the result DEM’s are in different zones of the band. I tried to break the files up in to bands as I thought it was a space issue but actually I need each mosaic to be made of about 100 tiles. When I tried the process by splitting into bands, it just processed the first few tiles of each region as in the graphic above. The full script I need to run is attached and produced the output below (this prompted me to try to split into bands). I have over 250GB of free space on my C: and terabytes on Z:\ (the scratch disc) ![enter image description here](http://i.stack.imgur.com/dH6pW.jpg) Best,               # Import arcpy module     import arcpy, csv     from arcpy import env          env.scratchWorkspace='Z:\\scratch'          #model_1_2.py          def model_1_2 (RN, RootPath, List, FileList):             # Local variables:                  for File in FileList:                     List.append(RootPath+"\\"+File[0]+"_1k_1m_DEM_ESRI.asc")                  #v1_Mosaic_DEM = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\1_Mosaic DEM"             v1_Mosaic_DEM = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Working\\data\\1_Mosaic DEM"             MosaicDEM = v1_Mosaic_DEM+"\\"+RN             #MosaicDEM = RN             slpe_ = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\3_Slope of Mosaic\\slpe_"+RN             asp_ = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\2_Aspect of Mosaic\\asp_"+RN                  #print List             #print "\n"+v1_Mosaic_DEM+", "+MosaicDEM+", "+slpe_+", "+asp_                  ## STEP 1                  # Check out any necessary licenses             arcpy.CheckOutExtension("spatial")                  # Process: Mosaic To New Raster (1.1)             print "Mosaic Processing..."             arcpy.MosaicToNewRaster_management(List, v1_Mosaic_DEM, RN, "PROJCS['GDA_1994_Transverse_Mercator',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',147.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]", "32_BIT_FLOAT", "", "1", "LAST", "FIRST")             print "Mosaic Created "+ str(MosaicDEM)+"\n"                  # Process: Slope (1.2)             print "Slope Processing..."             #arcpy.gp.Slope_sa(MosaicDEM, slpe_, "PERCENT_RISE", "1")             print "Slope Created "+ str(slpe_)+"\n"                  # Process: Aspect (1.3)             print "Aspect Processing..."             #arcpy.gp.Aspect_sa(MosaicDEM, asp_)             print "Aspect Created "+ str(asp_)+"\n"                  # Check in any necessary licenses             arcpy.CheckInExtension("spatial")                  ## STEP 2                  # Check out any necessary licenses             arcpy.CheckOutExtension("3D")                  # Process: Reclassify (2.1)             print "Aspect Reclass Processing..."             asp__r = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\4_Reclassification_aspect_slope\\asp_"+RN+"_r"             #arcpy.Reclassify_3d(asp_, "Value", "-1 90 1;90 180 2;180 270 3;270 315 4;315 360 5", asp__r, "DATA")             print "Aspect Reclass Created "+ str(asp__r)+"\n"                  # Process: Raster to Polygon (2.1.1)             print "Raster to Polygon...Aspect"             asp__v = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\atwm.gdb\\asp_"+RN+"_v"             #arcpy.RasterToPolygon_conversion(asp__r, asp__v, "SIMPLIFY", "VALUE")             print "Aspect Polygon Created "+ str(asp__v)+"\n"                  # Process: Dissolve (2.1.2)             print "Disolve Processing..."             asp__d = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\atwm.gdb\\asp_"+RN+"_d"             #arcpy.Dissolve_management(asp__v, asp__d, "", "", "MULTI_PART", "DISSOLVE_LINES")             print "Aspect Dissolve Created "+ str(asp__d)+"\n"                       # Process: Reclassify (2.2)             print "Slope Reclass Processing..."             slpe__r = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\4_Reclassification_aspect_slope\\slpe_"+RN+"_r"             #arcpy.Reclassify_3d(slpe_, "Value", "0.00053947966080158949 5 1;5 10 2;10 20 3;20 30 4;30 1488.7900390625 5", slpe__r, "DATA")             print "Slope Reclassify Created "+ str(slpe__r)+"\n"                  # Process: Raster to Polygon (2.2.1)             print "Raster to Polygon...Slope"             slpe__v = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\atwm.gdb\\slpe_"+RN+"_v"             #arcpy.RasterToPolygon_conversion(slpe__r, slpe__v, "SIMPLIFY", "VALUE")             print "Slope Polygon Created "+ str(slpe__v)+"\n"                  # Process: Dissolve (2.2.2)             print "Disolve Processing..."             slpe__d = "P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Output\\Mosaic_FINAL_deliverable\\LIDAR\\ATWM\\atwm.gdb\\slpe_"+RN+"_d"             #arcpy.Dissolve_management(slpe__v, slpe__d, "", "", "MULTI_PART", "DISSOLVE_LINES")             print "Slope Dissolve Created "+ str(slpe__d)+"\n"                       # Check In any necessary licenses             arcpy.CheckInExtension("3D")               RootName = ['BiKh', 'Mba', 'Wlkm', 'TlgTnr','Ath']     for RN in RootName:             RootPath = r'L:\Data_Admin\temp_dataset_storage\LiDAR\FinalSupply\Atherton_Tolga_Walkamin_Mareeba_Bilwon\ASCII_DEM\asc'             List = []             FileList = csv.reader(open('P:\\2011\\Job_106_TRC_FireHazard_Mapping\\Working\\data\\'+RN+'-AOI.csv'))             model_1_2 (RN, RootPath, List, FileList)             print "\n \n Completed model for: " + RN + "\n \n"


title: Place recognition with WiFi

text: I'm looking for some algorithm able to better recognize the geometry place only exploiting wi-fi antennas. I read about place recognition is divided in two classes: geometry and fingerprint. I'm interested to use fingerprinting one and I'd like to develop an intelligent system able to learn more and more which is the correct set of right values (e.g. rssi, mac, response rate...) identify the place. I'm not interested to geo-referentiate the place but only to recognize the place. What kind of technique should I consider? Statistical learning (MLE, bayesian models...) or I can think to use classification algorithms like support vector machine or others? can I think to explore fuzzy system for my purpose?


title: Would it be possible to construct a stand-alone grass.script python package?

text: I would like to migrate dependency on ArcPy to grass.script without requiring the full installation of Grass. Would it be technically possible to have a portable directory containing grass.script and all the libraries it depends upon?


title: What restrictions on KML/KMZ upload exist in Google Maps API v3?

text: I am currently using the google maps api v3 to load kml files into my web application. The file I am having trouble with is a KML which is 274 KB big. It will not load (uncompressed the file is about 8mb). If I take out elements from the file to shrink it, then i does load in my web app. But when i use *http://maps.google.com/?q=http://myapp/kml/mykml.kmz, then the KML loads perfectly. If someone can shed some light on this it will be greatly appreciated


title: GeoServer in Windows x64 - war file installation versus Windows installer?

text: After running a GeoServer war file installation in Tomcat for some time in Windows Server 2008 x64, I've become increasingly unhappy with Tomcat's chronic memory issues and leaks. Now that the GeoServer Windows installer appears to run in a 64-bit environment as a Windows service when used in tandem with a 32-bit JVM, I'm looking into abandoning the war file in favor of the Windows installer. What are the pros and cons of the Windows installer versus the war file in a 64-bit Windows environment?


title: Creating a simulation of how people moving around a site

text: I am working on a project aiming to create a geographic simulation for how people interact around a site. **Situation:** There are x people in an enclosed area (such as a zoo). There are y locations to visit (attractions). **Scenarios:** I want to simulate how busy each location would get with the following decision-making approaches:   * When no location set, person goes to the next closest unvisited location   * When no location set, person goes to random unvisited location   * When no location set, person goes to recommended location (from app, interactive sign, etc) **Outcome:** I want to know what leads to the best overall situation. In my case, I want to reduce overcrowding. Is there any open source software, approaches I should consider for modeling this? I would prefer to do this in Python, though am open to any other options.


title: Intersect between polygonal shapefiles error

text: I'm encountering a problem when I try to intersect two different shapefiles. They are all new shapefiles I created to descibe the land cover and the land use of a city. The problem occurs when I intersect them to create a new single shapefile in which the original areas are divided and have information of both land uses, that I have to use for the CORINE legend. When I use the intersect tool, it create a new shapefile but left out some areas that were in both files and must have an intersection. I tried to obtain the missing shapes from a difference between this new intersect shapefile and one of the orginals, but even in this way qgis only recognized some polygons and rejected the others. If I repeat this procedure I can improve the output, but I'm not able to include some areas. The file have the same kind of geographical reference and the same dimension. I also don't understand why the output changes if I use one shapefile first or the other when I tell it which file to intersect. The intersection should be the same? The images of the files are posted below: the first two are the input shapefiles and the last is the output. It's clear that there are some missing areas, like the big wooded area lower right. ![enter image description here](http://i.stack.imgur.com/JdfN5.png) ![enter image description here](http://i.stack.imgur.com/aF8Ob.png) ![enter image description here](http://i.stack.imgur.com/r5LI4.png) After running a geometry validator: ![validator dialog](http://i.stack.imgur.com/AKRuo.png) ![new result](http://i.stack.imgur.com/zFIqY.png)


title: Applying styles to categorized layer using QGIS

text: Apologies if this is an easy question from a QGIS novice but I have categorised a layer so I can attach reference numbers and names to the various points but I would like all the points to have the same colour and only be differentiated by their number. Unfortunately QGIS automatically sets it to colour each item as part of a range of colours and I cant seem to find a way of making them all the same colour.


title: ArcGIS 10.1 Remove (or SetNull) areas of overlapping rasters

text: I have one raster layer that is a site suitability layer for a county. Then I have two feature classes (one for roads and one for hydrology) that I need to remove or just set to Null from the site suitability raster. This is because the site suitability is for producing crops which obviously cant grow in water or on roads. I have converted each feature class to a raster, but now I can't figure out how to get rid of the roads and water from the site suitability layer. I've tried a few things with the Raster Calculator and Set Null tools but I haven't had any luck. I'm probably doing something wrong because each time I end up with a result that is just whatever feature I am trying to remove from the site suitability layer. Any help is greatly appreciated!


title: Is it possible to change the style on a WMS layer using QGIS?

text: Apologies from a QGIS beginner but I have added a WMS layer of polygons to fill in the gaps of an existing data set I have. the problem is that I want all of this data to have the same style (colour etc) and the WMS layer which comes up as orange cross hatching doesn't seeem to be able to be modified to a single colour for example. Is it actually possible to change the style of a WMS layer in a way that is possible for beginners?


title: Options for displaying PostGIS vectors in OpenLayers

text: I am very new to web-mapping, so this question may be a little misguided. I want to have a very simple web interface using OpenLayers (or even Google Maps if that will be easier) which can display a number of point and polygon tables that are currently in PostGIS. I want this to be as simple (and as low maintainence) as possible:   * I don't want to have to create tiles (unless there is a very good reason), or have a massive, complex layer of middleware.    * Performance doesn't need to be phenomenal, as this is for internal use and thus doesn't need to scale beyond a couple of concurrent users.   * Styling of the vector layers is of minimal importance.   * Open source tools are much preferred as I have almost no budget for this. What is the recommended approach for this?


title: How to overlay country map on google world map in openlayers?

text: Hi I am creating one map.So i want to overlay country map on google world map.I am trying with OpenLayers.Layer.wfs() function.but i am not getting perfect solution.If anybody knows the solution please give me reply.


title: Back from ArcGIS 10 to 9.3- problem

text: Recently I have experienced a few problems with ArcGIS 10, so I switched back to 9.3, thinking that my live will be back to normal... and it is not. I am using at the time tool made by Venkatesh Merwade, producing river batymetry with sections - great tool by the way. When I realized that the tool will not work under 10, I switched back to 9.3, so I could work. And it turns out that now when I try to use it under 9.3 I receive an error HRESULT E_FAIL ![enter image description here](http://i.stack.imgur.com/UI8mB.jpg) Would anyone know whats wrong??? Please help. Tomek


title: How to dissolve overlapping polygons?

text: I have a query regarding the dissolving of polygon features in ArcGIS 9.3. I only have the bare-bones license and an extremely basic knowledge of VB. I have a large shapefile with around 4500 polygons and I want to know if there is anyway of dissolving the ones that overlap? I basically want to turn this layer into a shapefile that contains seperate areas, so where one polygon is on its own it will remain but where multiple polygons overlap they dissolve into 1, with each separate area having its own set of attributes. The shapefile changes quite frequently and up until now I have been going through them all and manually dissolving overlapping areas using the editor tool but I'm sure there's a much quicker way of doing it! Any insight into how this might be achieved would be greatly appreciated. Cheers, Tom * * * Thank you all very much for the excellent responses. I've had a go using the dissolve tool and joining the exported attribute table and this works perfectly! I thought the dissolve tool only worked on attributes and not spatial location so that's extremely useful to know. Also the model builder code is Cheers again, Tom


title: How to clear spatial reference identifier?

text: I created a table in oracle with a sde.st_geometry column. I followed the instructions of ArcGIS help to register the table into geodatabase. My table creation statement is:               create table tbl_Comm_Cove      (     ID                   NUMBER(10,0)         not null,     Name                 CHAR(200),     Devi_Num             CHAR(8),     Code                 CHAR(200),     Unit_Grid            CHAR(10),     GID                  CHAR(200),     Belo_Road            CHAR(200),     Inst_Time            DATE,     Mana_Depa_ID         NUMBER(10,0),     Owne_Depa            CHAR(200),     Main_Depa            CHAR(200),     Mate_ID              NUMBER(10,0),     Diam                 NUMBER(10,2),     Devi_Stat_ID         NUMBER(10,0),     "Desc"               CHAR(200),     Shap_ID              NUMBER(10,0),     Init_Time            DATE,     Chan_Time            DATE,     Note                 CLOB,     constraint PK_TBL_COMM_COVE primary key (ID)     );     /     alter table tbl_comm_cove add loc sde.st_geometry;     /     CREATE INDEX tbl_comm_cove_idx ON tbl_comm_cove(loc)     INDEXTYPE IS sde.st_spatial_index     PARAMETERS('st_grids=1,3,0 st_srid=0');     /      My registration command is:               sdelayer -o register -l tbl_comm_cove,loc -e p -t st_geometry -R 0 -C id,sde,0 -i sde:oracle11g -s localhost -u XXXXX-p XXXXX      As you can see, I assigned a SRID to my spatial information column "loc". Now I want to delete this assignment. I tried to do this in ArcCatalog by clicking the "Clear" button in the "XY coordinates" tab of the "Properites" dialog, but when I reopen the ArcCatalog, the assignment is still there. What should I do? My oracle version is 11.2.0, Arcgis version is 10.0.


title: How do I order polygons so their IDs are contiguous from NW to SE?

text: Census Tract IDs are ordered in large areas, but patchy across the state. I need to assign a new ID that flows in an order from one end to the opposite end (i.e, NW to SE) where polygons are touching. Any suggestions?


title: Create Tiles for a raster(georeferenced) to use in leaflet

text: I have raster, with each pixel containing some data. What i want is to split a large image with each pixel's color is determined by its value, to show on leaflet layer.How to go about this ? raster 'Size is 19839, 17000'


title: PgRouting TRSP functions issue

text: I have tried to use the pg_trsp functions to compute the shortest path from an edge A to an edge B. When I call pgr_trsp, I need to inverse the order of edge in the call like this               SELECT * FROM pgr_trsp ('SQL_QUERY', B, 0.5, A, 0.5, true, true, null)       to give the right shortest path? Is there any explanation for this? Also my graph is an one-way directed graph and if I set reverse path option to false, it gives me the wrong path? Any helps will be appreciated.


title: Best practice - alternative for ToCs

text: I'm working on a map design that integrates many (around 300 separate map layers) datasets that need to be made available to users within the same map (just for viewing). I've looked at creating a table of contents with high level and sub categories but it just seems very clunky. We are harvesting the datasets as web map services. The wms urls are stored in an oracle database where they are configured into 9 main categories to provide a top level summary table of contents. We also have an advanced table of contents (also configured in Oracle) which arranges the dataset layers within the main category list. The whole thing is becoming unmanageable and not at all user friendly but we still need to make all the datasets available. Does anyone have any good guidelines/best practice/inspirational ways of dealing with large sets of data on a map?


title: Osmosis, Save to different schema

text: Does anyone know how to use osmosis to save to a different schema? I used the pgsnapshot_schema_0.6.sql to create a blank data table, but it always creates it in the public schema. I need to create these table in the 'gis' schema. Can this be done? Thank you


title: Get XY value from TiledMapService Layer Tile

text: I have an ESRI TiledMapService layer and I have attached an event handler to the TileLoaded. Given the level, row, and column, how can I get the envelop of the tile in map coordinates? I'm using the ESRI Silverlight API... **What I am trying to do:** I have a polygon (in the same coordinates of the TiledMapServiceLayer) and I want to examine each tile as it comes in and cut out the pixels of the tile that intersect with the polygon. Any help would be great!


title: Is there a way to programatically create a Mobile Project for ArcGIS for Mobile?

text: I need to build a tablet application using ArcGIS Runtime for Windows Mobile. Is there a way to create a mobile project usable by the ArcGIS for Mobile app without having to use the Mobile Project Center? I need to be able, with a single click, to generate a shapefile (or pgdb), convert it to a mobile cache and be able to generate a mobile project out of it.


title: New SQL Monitor Showing Database Deadlocks, Should I be alarmed?

text: We recently installed a SQL Monitoring tool that is raising High Alerts for SQL Server Deadlocks on my SDE database at random times during the day. Using the information provided in the Alert I have found that the deadlock is relating back to the SDE_state_locks Table. SQL info: SQL Server 2008 R2 (x64) ArcSDE 10.0


title: calculate {minimal} distance between polygons in R

text: I have calculated the surface area of species distributions (merging polygons from shapefiles), but since this area can be comprised of quite distanced polygons, I would like to calculate some measure of dispersion. What I have done so far is to retrieved the centroids of each polygon, calculated the distance between those and used these to calculate the coefficient of variation, as in the dummy example below;               require(sp)     require(ggplot2)     require(mapdata)     require(gridExtra)     require(scales)     require(rgeos)     require(spatstat)          # Create the coordinates for 3 squares     ls.coords <- list()     ls.coords <- list()     ls.coords[[1]] <- c(15.7, 42.3, # a list of coordinates                         16.7, 42.3,                         16.7, 41.6,                         15.7, 41.6,                         15.7, 42.3)          ls.coords[[2]] <- ls.coords[[1]]+0.5 # use simple offset          ls.coords[[3]] <- c(13.8, 45.4, # a list of coordinates                         15.6, 45.4,                         15.6, 43.7,                         13.8, 43.7,                         13.8, 45.4)          # Prepare lists to receive the sp objects and data frames     ls.polys <- list()     ls.sp.polys <- list()          for (ii in seq_along(ls.coords)) {        crs.args <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"        my.rows <- length(ls.coords[[ii]])/2        # create matrix of pairs        my.coords <- matrix(ls.coords[[ii]],nrow = my.rows,ncol = 2,byrow = TRUE)        # now build sp objects from scratch...        poly = Polygon(my.coords)        # layer by layer...        polys = Polygons(list(poly),1)        spolys = SpatialPolygons(list(polys))        # projection is important        proj4string(spolys) <- crs.args        # Now save sp objects for later use        ls.sp.polys[[ii]] <- spolys        # Then create data frames for ggplot()        poly.df <- fortify(spolys)        poly.df$id <- ii        ls.polys[[ii]] <- poly.df     }          # Convert the list of polygons to a list of owins     w <- lapply(ls.sp.polys, as.owin)     # Calculate the centroids and get the output to a matrix     centroid <- lapply(w, centroid.owin)     centroid <- lapply(centroid, rbind)     centroid <- lapply(centroid, function(x) rbind(unlist(x)))     centroid <- do.call('rbind', centroid)          # Create a new df and use fortify for ggplot     centroid_df <- fortify(as.data.frame(centroid))     # Add a group column     centroid_df$V3 <- rownames(centroid_df)          ggplot(data = italy, aes(x = long, y = lat, group = group)) +       geom_polygon(fill = "grey50") +       # Constrain the scale to 'zoom in'       coord_cartesian(xlim = c(13, 19), ylim = c(41, 46)) +       geom_polygon(data = ls.polys[[1]], aes(x = long, y = lat, group = group), fill = alpha("red", 0.3)) +       geom_polygon(data = ls.polys[[2]], aes(x = long, y = lat, group = group), fill = alpha("green", 0.3)) +       geom_polygon(data = ls.polys[[3]], aes(x = long, y = lat, group = group), fill = alpha("lightblue", 0.8)) +        coord_equal() +       # Plot the centroids       geom_point(data=centroid_points, aes(x = V1, y = V2, group = V3))          # Calculate the centroid distances using spDists {sp}     centroid_dists <- spDists(x=centroid, y=centroid, longlat=TRUE)          centroid_dists                 [,1]      [,2]     [,3]     [1,]   0.00000  69.16756 313.2383     [2,]  69.16756   0.00000 283.7120     [3,] 313.23834 283.71202   0.0000          # Calculate the coefficient of variation as a measure of polygon dispersion      cv <- sd(centroid_dist)/mean(centroid_dist)     [1] 0.9835782      Plot of the three polygons and their centroids ![enter image description here](http://i.stack.imgur.com/VrJOe.jpg) Im not sure if this approach is very useful since in quite many cases, some of the polygons (as the blue one in the above example) are quite large compared to the rest, thus increasing the distance even further. E.g. the centroid of Australia have almost the same distance to it's western boarders as to Papau. What I would like to get is some input on alternative approches. E.g. how or with what function can I calculate the distance between polygons? I have tested to convert the SpatialPolygon dataframe above to PointPatterns (ppp) `{spatstat}`to be able to run `nndist() {spatstat}` to calculate the distance between all points. But since I am dealing with quite large areas (many polygons and large ones), the matrix gets huge and Im not sure how to continue to get to the _minimal distance between the polygons_. I have also looked at the function `gDistance {rgeos}`, but I think it only works on projected data which can be a problem for me since my areas can cross several `EPSG areas`. The same problem would arise for the function `crossdist {spatstat}`. Any pointers would be very much appreciated. Thanks!


title: Limits to torque and cartodb

text: Bit of a theoretical one this, but I was wondering if anyone had tried to use CartoDB and Torque with any big(ish) data. What I am talking about is having the location of 75,000 people at 1 minute resolutions for a 24 hour period. Would torque 'work' or would it just crash? I've done it successfully with 200 people, but am now getting to the stage where I'll want to test this with much larger datasets. Thanks James


title: Migrate to QGIS?

text: Is it sensible for me to migrate to QGIS? I've been using OCAD, a very old vector based map software to maintain a local "back country" map. With OCAD6 I initially import base data, e.g. contours, main roads etc, as `.dxf`. Later import new data the same way. But then I can adjust or draw things easily by hand. As tracks wash away, get re-routed, get abandoned, or repaired, I can easily update track condition freehand, from, say, "abandoned" to "Grade 3". I can simply cut a line object to create 2 new line objects. Or make 2 cuts to create a new section in the middle. Then change that section from, e.g., "grade 4 track" to "grade 2 track" by:-   * selecting the new line object   * selecting a new symbol   * click "change symbol". Any way to do this easily in QGIS? Am I misunderstanding what QGIS & GIS in general are?


title: I could use some help with a bit of code optimization

text: **See edit below.** I posted here a couple weeks ago looking for some advice on the best way to iterate through data. You can find that post here. I have since done some tweaking to the code, and whittled it down to listing 2760 fields in 58 seconds, but I am hoping to keep trimming. I know enough python to get me in trouble, but I am not familiar with all of the ins and outs that help create efficient programs. I was split between iterating through workspaces or using the arcpy.da.Walk() function. So far, the best thing I found was a combination of both. Here is a script that I was hoping someone could help me optimize a bit.               import arcpy     import os     import time          walktimes=[]          counter=0          walkfi=0          while counter <5:         arcpy.env.workspace = r'E:\Working'         working_folder_list=arcpy.ListWorkspaces('ogl*','Folder')         t_start1=time.clock()         for folder in working_folder_list:             workspace = folder + "\\ogl_data0.gdb"             for dirpath, dirnames, filenames in arcpy.da.Walk(workspace):                 for filename in filenames:                     fields=arcpy.ListFields(os.path.join(dirpath,filename))                     walkfi += len(fields)         walktime = time.clock() - t_start1         walktimes.append(walktime)         counter+=1          walksum = 0     for time in walktimes:     walksum += time          walkavg = walksum/len(walktimes)          print 'Average walk time: '+str(walkavg)     print walkfi          raw_input('Press Enter...')      The part of the code that I'm looking to optimize is the 'for folder in working_folder_list' loop. Everything else is pretty straightforward. Any help would be greatly appreciated! **I just realized I had my time calculations in the wrong block. Did some more tests with the combined Walk() and List functions, and only squeaked out 5 seconds over the straight list function I had in my previous post. The significant time eater is coming from listing fields. Is there a better option than arcpy.ListFields**


title: Get points from a kml LineString

text: I have a KML file with a LineString. I'm trying to load the points in Python. I'd like to use the FastKml library, but am open to other solutions. FastKml has one example for reading KML, but I have not been able to convert that to get the LineString points.


title: How to merge several tables/feature classes into single geodatabase object in ArcObejcts?

text: My project is ArcGis extension, which uses a specific set of tables and feature classes. I want that this structure to behave like single geodatabase object, so user cannot delete part of it's schema. In ArcGis this functionality is present in Cadastral Fabric. It contains several feature classes and tables that are not visible to user. This is clearly seen in "New Relationship Class dialog". What ArcObjects interfaces/Workspace extensions do I need to implement to achive such behavior? ![enter image description here](http://i.stack.imgur.com/oxkzt.png)


title: Bounding box argument ignored when displaying raster using mapserver

text: I am trying to display a raster image with Mapserver using different `bbox` arguments in a mapserv cgi request. I have been trying to specify different bbox arguments to "crop" the raster display, but mapserver returns the full map ignoring the `bbox` argument. How can I corectly specify the bounding box to display the raster? The following example call renders the map at its full extent, although only a small part is requested http://urbmet.webfactional.com/mapserv.cgi?MODE=map&MAP=gstack_example.map&LAYERS=HYP_50M_SR_W&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=0,0,10,10&WIDTH=128 Here is the mapfile I am using:               MAP     SHAPEPATH     "shapefiles"     IMAGETYPE     PNG     EXTENT        -180 -90 180 90     SIZE          400 200     IMAGECOLOR    255 255 255     UNITS         DD     STATUS        ON     DEBUG         ON          PROJECTION         "init=epsg:4326"     END          LAYER         NAME      "HYP_50M_SR_W"         DATA      HYP_50M_SR_W/HYP_50M_SR_W.tif         STATUS    ON         TYPE      RASTER     END     END


title: Geotools 8.4 CRS.decode invalid(?) reference to HTTP_URI_OGC

text: I'm trying to do a simple CRS.decode to lookup a CoordinateReference system: E.g. CoordinateReferenceSystem target_crs = CRS.decode("EPSG:4326"); However this fails with a reference to the Citations.HTTP_URI_OGC field, and an invalid field error. According to the documentation this field is introduced in v9? Anyone else experienced this, or got an idea of what I'm doing wrong? Regards Rune Sørensen


title: How to run ArcGIS in a virtual machine?

text: I'm trying to run ArcGIS Desktop 10.0 in a Windows 7 (32bit) virtual machine. I don't have any native Microsoft Windows available. I'm using VirtualBox from Oracle for virtualization in a native linux environment (Sabayon). I'm having exactly this issue: ArcGIS Explorer Map Display Issue The proposed solution is to update video card driver. But in VirtualBox there are driver called "Guest additions" and they are already up-to-date. I know some of my fellow students are working with ArcGIS in VMs and they seem not to have any kind of issues. What could it be? ![the map only renders on right-click](http://i.stack.imgur.com/unBeU.png) 3D- and 2D-Video-acceleration are enabled. * * * **Update 1** :   * It's a native Linux machine, running a virtual Windows 7 machine - 32bit.   * I'm aware of ESRI's system requirements. I allocated 256MB video RAM and enabled 2D and 3D hardware acceleration - as seen in the screenshot. Anyways, I've been running this analyzation of my system requirements from inside the machine, this is the result: ![system requirements test results](http://i.stack.imgur.com/d6wvF.png) Now I got to figure out how to fix it. Video memory is okay, but the rest I've never heard of... * * * **Update 2** : I installed the experiemental WDDM drivers as @scw suggested, now it looks like that: ![system requirements test results](http://i.stack.imgur.com/69K2s.png) I have all recommended attributes now, but it still says: > Unfortunately, your Video Card does not meet this requirement. In addition, ArcGIS crashs now after adding any layers.


title: How to represent clustering of geographical points on map in STATA?

text: I've plotted a map on STATA using user-written program spmap and have also obtained the grid for my space using spgrid program. Now I want to see where most of my data points are clustered on map. Is there a way to identify such clustering in STATA and then present it on a map?


title: How to use in_field_map parameter of CreateCompositeAddressLocator_geocoding?

text: I would like to know if anyone who has worked with the **CreateCompositeAddressLocator_geocoding** method knows how the "in_field_map" parameter is formed?


title: For a given feature find the closest point along a given path

text: Looking for a Java based (foss4g) solution for the following: I am using a path along with a buffer to find features that are along the path. For each of the features returned I want to find the coordinate that is best fit ... meaning a straight line from the feature to the path and gleaning the point on the path.


title: Mis-aligned shapefiles

text: I'm a beginner at QGIS and I'm having trouble aligning my shapefiles. I have two datasets: one originally in WGS84 (lat/long) and another in Corrego Alegre/UTM zone 24S. I need to convert the second into WGS84 for my work, however if I go to Vector -> Data Management Tools -> Define Current Projection and choose to do so, I'm told this is an invalid coordinate system. By going to Save as... I'm able to save a shapefile that seems to be in WGS84, but it is dislocated from the other polygons of my first dataset. How can I get these files to align?? This is a screenshot of the mis- alignment, even though the novo-recifes-v2.shp (coral reefs) is set as WGS84, just like the continent (global_polygon.shp) ![This is a screenshot of the mis-alignment, even though the novo- recifes-v2.shp \(coral reefs\) is set as WGS84, just like the continent \(global_polygon.shp\)](http://i.stack.imgur.com/JyB2y.jpg)


title: How to interpolate into polygons?

text: I need to interpolate values from points to polygons. I have a point shapefile and a shapefile of adjacent polygons. Some polygons get several points falling inside, some have nothing. I thought about interpolating values for polygon centroids only, but this is rather crude. I would like to take into account whole polygon areas. I was going to produce a grid in ArcGIS with very small cells and then calculate average values of cells falling inside each polygon (by zonal statistics), but this way is very time and memory consuming (I have a lot of points and polygons and a large area). Also I found in ArcGIS for a geostatistical layer: Predicting values for specified point locations. I can set there polygons as my specific locations and have the output with predicted values for each polygon in the attribute table. But I have no idea how ArcGIS calculates values for polygons there (they appear different from the values for the point centers of the polygons). I appreciate your advices! Nadya


title: How to add a simple interface to mapserver CGI application?

text:
I have a simple mapserver test page which shows information from shapefiles (cities, rivers, lakes, points of interest) etc. The result is a static PNG image. I want to add a simple interface so users would not have to modify the URL manually. Options that I want to provide:   * zoom in;   * zoom out;   * reset the map (back to default view with no zoom);   * center map;   * legend;   * scalebar;   * reference map;   * show information about an object user clicked. I know that map properties can be changed via URL but I am not sure about the way to do it. What I'm thinking is adding buttons in the template file and using javascript onClick events. When buttons are clicked, JavaScript redirects happen and additional parameters and parameter values are assigned to the URL. I have read http://mapserver.org/cgi/ and this is what I have come up with. In the example given below, button "Change map size" succesfully changes map dimensions to 800 by 400. I know that a full page reload happens, that is ok with me. Is this the intended way of providing a simple GUI to a mapserver page? I want to stick to mapserver CGI, and not use PHP/Python mapserver API. template.html:                              <title>Mapserver Template HTML Document</title>
Template

     <input type="button" onclick="zoomIn()" value="+" id="zoomIn" />     <input type="button" onclick="zoomOut()" value="-" id="zoomOut" />     <input type="button" onclick="reset()" value="Reset" id="reset" />     <input type="button" onclick="switchRegionVisibility()" value="Disable regions" id="switchRegionVisibility" />     <input type="button" onclick="changeMapSize()" value="Change map size" id="changeMapSize" />


title: How can I fix broken links in an mxd with only an ArcGIS Server license?

text: I've been asked to fix a broken arcgis server site. I suspect the problem is that the paths in the mxd don't point correctly to the data files. Without installing desktop is there some way to confirm that the paths are correct, and fix them if they are broken?


title: Why does ArcGIS Server return a PNG file by default unless I hit the refresh button?

text: I'm trying to access a webservice that returns a map image in different formats. It first always returns a .png file until I hit the refresh button. It then returns me the map in the correct format. Do you know what could cause that? Thank you. `http://appserver/ArcGIS/services/City/MapServer/WMSServer?REQUEST=GetMap&Version=1.1.1&LAYERS=0,2,3,4,5,7,8,9,10,11,12,13&SRS=4326&FORMAT=jpeg&BBOX=43.999861,32.999861,45.000139,34.000139&WIDTH=500&Height=500&Styles=`


title: Conditional Statements in QGIS raster calculator?

text: What is the equivalent statement of the following expression in the QGIS raster calculator?                   Con(((Abs("DEM" - "FSMin") > 120) | (Abs("DEM" - "FSMax") > 120)), 1, 0)      I have no problem running this command in ArcMap but as soon as I paste it in QGIS the raster calculator there rejects it.


title: OpenLayers restrictedExtent 3857 OSM

text: I'm trying to restrict Extent to a map in 3857. This seems like it should be very simple, but required me to write a BBOX function for my very vanilla OSM basemap example. I've provided the code here: http://jsfiddle.net/4Jv4m/ Can someone tell me why there is still whitespace on the top/bottom of the map when you drag the map? Just try dragging it up and down and you will see some whitespace. I realize that transforming -180, -90 goes to -Infinity, but still I've no way to limit the extent to the world without possibly 'hardcoding' the 3857 compliant XY coordinates. This is not an option as most GetCapability documents work in 4326 lat/lon, so I'd like my transformation function to correctly handle this scenario.


title: What are convenient uml tools to create geodatabase models?

text: I used to model databases with Microsoft Office Visio, then export the model to xml and import geodatabase schema to GDB with ArcGIS tools. Since Microsoft no longer support Visio export to xml, what are the alternatives?


title: How can I find a county fips given a yahoo woeid

text: I've used the Yahoo API to pull some woeids for counties. I need to map those woeids back to fips codes in order to associate them back to other data in my database, but I can't seems to figure out how to get a fips given a woeid. Yahoo's concordance API handles the other direction. With that, I can get a woeid for a given fips code, but how do I go the other direction? Thanks!


title: How do I split a DEM at a certain elevation?

text: I have a DEM that includes bathymetry and terrain elevation and I would like to split it at the coastline. Ideally, I would end up with one tif that's land and one tif that's bathymetry. I have searched for this feature in GDAL commands and in QGIS but I can't find anything that extracts based on an elevation range. Thank you.


title: Calculating absolute precision confidence number from Dilution of Precision indicators from GPS receiver

text: End-user GPS receivers typically show an absolute confidence indication, such as _Within 25 Metres_ , for the calculated position. I am parsing NMEA data from a GPS unit and wan't to calculate a similar quality of service indication. The NMEA data exposes a Dilution of Precision indication (actually, one for both the horizontal and vertical position, HDOP/VDOP). How do I go from DOP value(s) to a concrete confidence measurement (say, metres)? Thanks.


title: openlayers setCenter issue (other posts on this do not solve it)

text: I can't get map.setCenter to display an OSM layer (via openlayers) centered at my specified coordinates. Instead it defaults to the West Coast of Africa. The zoom level does however work. Both of these items are true whether I include transformation of coordinates or not and whether or not I reverse the coordinates (which I tried out of superstition:)--my lat is definitely 64, lon -18). Here's the code: function init() { map = new OpenLayers.Map("mapbox"); var osm = new OpenLayers.Layer.OSM(); map.addLayer(osm); map.setCenter(new OpenLayers.LonLat(-18.37, 64.87).transform ('EPSG:4326','EPSG: 3857'), 5); } It seems embarrassingly simple...what am I missing? Thanks in advance to anyone who can help! * * * After posting, I figured it out but I can't answer my own question yet (not enough credits!) Solution: I needed to explicitly create new OpenLayers Projection objects. Working code: function init() { map = new OpenLayers.Map("rcp1_map"); var osm = new OpenLayers.Layer.OSM(); map.addLayer(osm); map.setCenter(new OpenLayers.LonLat(-18.361990, 64.863628).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")),4); }


title: Is it possible to get coordinates for locations from Google Map?

text: I wonder is it possible to get coordinates (of pins) from Google Map which is integrated in some website?


title: How to publish ECW images to ArcGIS Server?

text: When I am going to publish mxd (containging image.ecw) to ArcGIS Server, the following error appears: > Confiquration image.ecw. MapServer can not be started. Server Object > instance creation failed on machine. What should I do to resolve this error?


title: How to use Google's Distance matrix on server side?

text: I am developing a web application wherein i need to find the closest bus-stop from a users location and mark it on a map. I have the list of bus-stops on my server. I am using Google's Distance Matrix service which returns me the distance between my source and multiple bus stops. Then, by comparing the distance i get the nearest bus-stop. But this is all happening on client side. I wanted my server to do the decision. Is it possible for my server to directly communicate with the Google maps server and get the distance? Thanks


title: Total great circle distance along a path of points (PostGIS)

text: I am looking for an SQL query that sums the distances between a series of points using PostGIS. **The situation is as follows:** I have 2 tables: tracks and points. Points belong to a track and thus each points record has a track_id field. Points also have geom field (in WGS84 = GPS coordinates) and a timestamp. What I would like to do is calculate the total (geographically correct) distance for each track. In orther words, I need a query that, when given a certain track_id, looks up all the points for that track, orders them by timestamp and than calculates the distance between each consecutive pair of points and sums these distances to give me the total distances of the track in question. Thanks in advance for any ideas.


title: How to apply a gradient fill to different polygons in the same layer

text: I am trying to make a simple map of the world in ArcMap 10.1, and I have a shapefile with all the countries in it. I have the symbology set to unique values, so the countries are all different colors. I want to add a gradient fill, but I can't add the gradient to its symbology without going through every single country and editing it. If I select Properties for All Symbols, it will apply the same color to every unique value. Any ideas?


title: AddLayer method failing when script in ArcToolbox is run from ArcCatalog

text: I need a 2nd set of eyes to do a sanity check, as I am not been able to figure out why a script that runs fine in pywin, does not run properly as a tool in a toolbox. Below is the script that runs in pywin without an issue. It walks through a tree of folders and adds any shapefiles to an empty existing mxd (The mxd is not open in arcmap). Each shape is added with the coordsys name append to the layer name.                   import arcpy, os              # Set the source path         srcPath = r'C:\shpfiles'              # get the map document         mxd = arcpy.mapping.MapDocument(r'C\TEST.mxd')              # get the data frame         dataFrame = arcpy.mapping.ListDataFrames(mxd)[0]              dirList = os.walk(srcPath)              try:             for root, dirs, files in dirList:                 for dir in dirs:                     #Set the path to the shapefile folder...                     path = os.path.join(root,dir)                     #Set the workspace                     arcpy.env.workspace = path                     #Get a list of shapefiles in each dir...                     featureclasses = arcpy.ListFeatureClasses()                     #Cycle through the list of shpfiles...                     for shp in featureclasses:                         shpPath = os.path.join(path,shp)                         coordsys = arcpy.Describe(shp).spatialReference                         #Create a new layer name                               newLayer = shp[:-4] + "_" + coordsys.name                         #add a new layer in the map document                         layer = arcpy.mapping.Layer(shpPath)                         #add the layer to the map at the bottom of the TOC                         arcpy.mapping.AddLayer(dataFrame, layer, "BOTTOM")                         layer.name = newLayer                         del layer, newLayer, coordsys         except:             print arcpy.GetMessages(2)              #save the mxd file         mxd.save()         del mxd      This works perfectly. The script loops through and loads all the shape files into TEST.mxd, with their projection name appended to the layer name. Below is the same code, modified to run as a tool in toolbox.                   import arcpy, os              # Set the source path         srcPath = arcpy.GetParameterAsText(0)              # get the map document         mxd = arcpy.mapping.MapDocument(arcpy.GetParameterAsText(1))              # Set the workspace         arcpy.env.workspace = srcPath              # get the data frame         dataFrame = arcpy.mapping.ListDataFrames(mxd)              dirList = os.walk(srcPath)              try:             for root, dirs, files in dirList:                 for dir in dirs:                     #Set the path to the shapefile...                     path = os.path.join(root,dir)                     #Set the workspace                     arcpy.env.workspace = path                     #Get a list of shapefiles in each dir...                     featureclasses = arcpy.ListFeatureClasses()                     #Cycle through the list of shpfiles...                     for shp in featureclasses:                         shpPath = os.path.join(path,shp)                         coordsys = arcpy.Describe(shp).spatialReference                                    newLayer = shp[:-4] + "_" + coordsys.name                         #add a new layer in the map document                         layer = arcpy.mapping.Layer(shpPath)                         print arcpy.AddMessage(layer)                         #add the layer to the map at the bottom of the TOC                         arcpy.mapping.AddLayer(dataFrame, layer, "BOTTOM")                         layer.name = newLayer                         del layer, newLayer         except:             print arcpy.GetMessages(2)              #save the mxd file         mxd.save()         del mxd      Running this tool in ArcCatalog does not do anything; none of the shapefiles are loaded into the mxd. Only one of the shapefiles is looped through and the entire process finishes in < 1sec, and TEST.mxd is empty. Adding print statements and reming out the code, the problem is isolated to:               arcpy.mapping.AddLayer(dataFrame, layer, "BOTTOM")      When this line of code is commented out, the tool script loops through and prints out every shapefile it encounters in the tree. Why would AddLayer stop the loop? Am I missing some extra code to enable this to run as an arcToolbox tool script? Any insight would be greatly appreciated. thanks. John


title: Historical maps as cylindrical projections

text: **Objective:** I want to overlay old, historical maps on top of Google Maps. According to Wikipedia, Google Maps uses a variant of the Mercator projection, a close relative of cylindrical projections. **Research:** I have found various historical maps sources, particularly the website by David Rumsey. However, all these maps (as well as others I've found online) are conical projections. **Questions:** Here are three scenarios to achieve my objective.   * Are there historical maps available as cylindrical projections?   * If not, then are there tools that can 'rubber-sheet' existing conical projections into cylindrical projections?    * If neither is the case, then what is the best way to 'pin up' a conical projection onto a cylindrical one?


title: How to make custom, dynamically generated vector symbols in ArcGIS

text: I am putting together a map of GPS-enabled vehicles, and I am hoping to display them with custom point symbols that change appearance based on a few attributes (things like velocity, heading, and a few other business attributes). For example, the fill color might change depending on the vehicles speed, the shape might change based on vehicle type, and the size might change based on another attribute. I have considered using the "unique values, many fields" option in the symbology menu, but I don't think it will work for this task because 1) my data has seven attributes that the symbol needs to be based on, and the dialog only allows for three fields, and 2) if I have to create each symbol individually for every combination of attributes, I'd have to build over 350 symbols in total. I would prefer to specify something like "if speed is X, set fill color to Y; if vehicle type is A, set symbol outline to B, etc." Is this kind of customization possible in ArcMap, and if so, what is the best approach?


title: Connecting markers by following the roads in Google Maps

text: I have many markers in a kml file. All the markers are on the roads. I wonder if there is a way to process the data and connect the markers by following the road? Of course, the markers should not be randomly connected with each other. The point is to mark the parts of the roads that have markers on them. I could of course just manually create the lines myself. But there are so many markers, and the data is expanded almost daily.


title: How to work within ArcGIS image server export limits?

text: I need to clip out a region of an arcgis image service that is larger than the export limit. I'm not trying to defeat copy protection or anything of that nature. The data is from a service belonging to our organization, though beyond my admin control. I could ask the admin to temporarily change the export limits, but for various reasons don't want to. (It would add to his already overloaded inbox, take longer, open up the server to abuse from all comers and thereby possibly bring it to it's knees, possibly not even work as a single export, etc.). Has anyone developed a script or add on that could, for example, divide the area of interest extent into a tile grid of X by X cells at raster resolution, zoom to each, and export current extent for each? ![](http://i.imgur.com/0S82y.png)


title: How do I convert existing fields to lat and long using the Calculate Field tool?

text: I am trying to convert my X and Y fields from feet to lat and long. I can easily do this in Calculate Geometry from the attribute table, but I'm needing to use this in a model and Calculate Geometry is not available as a tool. I'm using the Calculate Field tool and trying to find a script that converts this to lat and long. I've tried the following script using the advanced code for VBA with no luck:               Dim dblX As Double     Dim pPoint As IPoint     Set pPoint = [Shape]     dblX = pPoint.X          dblX      I'd like to avoid having to create a totally new shapefile or feature class. I just want to change the existing fields in this existing feature class. Thanks!!


title: ArcObjects: Memory leak in IFeatureClass.Search (only on SDE with direct connect)

text: **UPDATE 6/30/11:** ESRI Support say they have reproduced the issue and have opened a bug report (NIM070156). I have determined that there is a memory leak (in unmanaged heap memory) that occurs when a tool in my .NET/C# ArcMap add-in performs a spatial query (returning an `ICursor` from `IFeatureClass.Search` with an `ISpatialFilter` query filter). All COM objects are being released as soon as they are no longer needed (using `Marshal.FinalReleaseCOMObject`). To determine this I first set up a PerfMon session with counters for ArcMap.exe's Private Bytes, Virtual Bytes and Working Set, and noted that **all three steadily increased** (by roughly 500KB per iteration) with each usage of the tool that that performs the query. **Crucially, this only occurs when performed against feature classes on SDE using direct connect** (ST_Geometry storage, Oracle 11g client and server). The counters remained constant when using a file geodatabase, as well as when connecting to an older SDE instance that uses application connect. I then used LeakDiag and LDGrapher (with some guidance from this blog post) and logged the Windows Heap Allocator at three times: when I first load ArcMap and select the tool to initialize it, after running the tool a couple dozen times, and after running it a few more dozen times. Here are the results as shown in LDGrapher's default view (total size): ![LDGrapher graph showing steady increase on memory usage](http://i.stack.imgur.com/pTQkV.png) Here is the call stack for the red line: ![Call stack showing sg.dll call to SgsShapeFindRelation2 function](http://i.stack.imgur.com/8xmwG.png) As you can see the `SgsShapeFindRelation2` function in sg.dll appears to be what is responsible for the memory leak. As I understand sg.dll is the core geometry library used by ArcObjects, and `SgsShapeFindRelation2` is presumably where the spatial filter is being applied. Before I do anything else, I just wanted to see if anyone else had run into this issue (or something similar) and what if anything they were able to do about it. Also what could be the reason for this occurring only with direct connect? Does this sound like a bug in ArcObjects, a configuration issue, or a programming problem? Here is a minimal working version of the method that produces this behavior:               private string GetValueAtPoint(IPoint pPoint, IFeatureClass pFeatureClass, string pFieldName)     {         string results = "";         ISpatialFilter pSpatialFilter = null;         ICursor pCursor = null;         IRow pRow = null;         try         {             pSpatialFilter = new SpatialFilterClass();             pSpatialFilter.Geometry = pPoint;             pSpatialFilter.GeometryField = pFeatureClass.ShapeFieldName;             pSpatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;             pSpatialFilter.SearchOrder = esriSearchOrder.esriSearchOrderSpatial;             pCursor = (ICursor)pFeatureClass.Search(pSpatialFilter, false);             pRow = pCursor.NextRow();             if (pRow != null)                 results = pRow.get_Value(pFeatureClass.FindField(pFieldName)).ToString();         }         finally         {             // Explicitly release COM objects             if (pRow != null)                 Marshal.FinalReleaseComObject(pRow);             if (pCursor != null)                 Marshal.FinalReleaseComObject(pCursor);             if (pSpatialFilter != null)                 Marshal.FinalReleaseComObject(pSpatialFilter);         }         return results;     }      **Update:** Here's my workaround code based on the discussion below with Ragi:               private bool PointIntersectsFeature(IPoint pPoint, IFeature pFeature)     {         bool returnVal = false;         ITopologicalOperator pTopoOp = null;         IGeometry pGeom = null;         try         {             pTopoOp = ((IClone)pPoint).Clone() as ITopologicalOperator;             if (pTopoOp != null)             {                 pGeom = pTopoOp.Intersect(pFeature.Shape, esriGeometryDimension.esriGeometry0Dimension);                 if (pGeom != null && !(pGeom.IsEmpty))                     returnVal = true;             }         }         finally         {         // Explicitly release COM objects             if (pGeom != null)                 Marshal.FinalReleaseComObject(pGeom);             if (pTopoOp != null)                 Marshal.FinalReleaseComObject(pTopoOp);         }         return returnVal;     }          private string GetValueAtPoint(IPoint pPoint, IFeatureClass pFeatureClass, string pFieldName)     {         string results = "";         ISpatialFilter pSpatialFilter = null;         IFeatureCursor pFeatureCursor = null;         IFeature pFeature = null;         try         {             pSpatialFilter = new SpatialFilterClass();             pSpatialFilter.Geometry = pPoint;             pSpatialFilter.GeometryField = pFeatureClass.ShapeFieldName;             pSpatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelEnvelopeIntersects;             pFeatureCursor = pFeatureClass.Search(pSpatialFilter, true);             pFeature = pFeatureCursor.NextFeature();             while (pFeature != null)             {                 if (PointIntersectsFeature(pPoint, pFeature))                 {                     results = pFeature.get_Value(pFeatureClass.FindField(pFieldName)).ToString();                     break;                 }                 pFeature = pFeatureCursor.NextFeature();             }         }         finally         {             // Explicitly release COM objects             if (pFeature != null)                 Marshal.FinalReleaseComObject(pFeature);             if (pFeatureCursor != null)                 Marshal.FinalReleaseComObject(pFeatureCursor);             if (pSpatialFilter != null)                 Marshal.FinalReleaseComObject(pSpatialFilter);         }         return results;     }


title: Defining a Query with Multiple Values

text: I have been trying by best to create a definition query which would select a group of municipalities from among the many in my state. I have tried commands of all sorts of variations from "Name"='Chatham'AND 'Chester' AND 'Far Hills'..... to "Name"=('Chatham', 'Chester', 'Far Hills... and so on but I keep getting an error when I try to validate.


title: Spatialite equivalent of ST_MakeBox2D?

text: I'm a GIS newbie. I'm porting an app that uses PostGIS to SpatiaLite and wonder what the SpatiaLite equivalent of ST_MakeBox2D might be. Can someone point me to an example?


title: How to visualize fuzzy/approximate locations

text: I need to visualize a mixture of accurate and fuzzy/approximate locations on a web map. The user should be able to instantly recognize approximate locations from the marker used. Are there any best practices to follow regarding the design of the location markers? I thought about using semi-transparent circles for the approximate locations, like this: (http://dribbble.com/shots/908963-Map-Markers- PSD?list=searches&tag=map_marker) ![enter image description here](http://i.stack.imgur.com/iQFaq.png) But I would rather use icons which symbolize the "fuzzyness", because in areas with many locations in high density i suspect that to be better looking. Maybe someone has a better idea?


title: Distortion of equally sized world tiles

text: My question is related to this: http://stackoverflow.com/questions/7927863/location-data-format-for- adehabitat-package I have a relational database with 'world tiles'. Each tile has a side length of 0.25 degrees (plus top left and lower right lat/long coordinates). This means I have 1036800 tiles (720 for latitudes and 1440 for longitudes). I would like to understand distortion a bit better (sorry about this stupid question). How do you compute the size of each tile? I understand that the distortion is largest at the poles and that the tiles are not necessarily square. Any links/feedback would be very much appreciated. Many thanks!


title: automating forest cover calculations with Python

text: I have a layer of forest cover comprising ~ 30,000 individual forest patches, and I need to calculate the amount of forest cover within a 5 km buffer of each patch. The buffers all overlap each other, which stopped me from calculating forest cover with a simple intersect of the buffer layer with the forest layer. In a small test area I have been able to calculate amount of forest by doing a Union on the forest cover and buffer layers, using a definition query on the resulting layer to only show features where buffers and patches intersect, then Spatial Joining this layer to the original buffer layer with a 'sum' merge rule to give the total amount of forest per buffer. However, the largest area I have been able to apply this process to successfully is about 1/1000th the total area that I need to do it to, and even this takes about 1hr of processing to complete. Beyond this the initial Union fails - I think that this is because all the overlapping buffers create an enormous number of features when Union runs. So, I’m wondering if it will be possible to break this process down into smaller chunks with a Python script? I’m a raw beginner with Python (aside from a few online tutorials I’ve just done) but guessing it might be possible to individually intersect each of the 30,000 buffers with the native forest layer, sequentially write the output of each of these intersections into e.g. a text file, then joining this to the buffer layer’s attribute table. Before I invest too much effort into learning scripting, can anyone tell me if this approach is likely to be doable for a Python newbie or am I barking up the wrong tree? Thanks in advance, Jay


title: Storing GML surface in PostGIS

text: I'm using PostGIS 2.0.0 and would like to store a GML Surface in a way that allows calculating intersections between that surface and various points and lines. In my case, the Surface will have one PolygonPatch with no interior rings and an exterior ring which may be a LineStringSegment, a Geodesic, an Arc or a Circle. The distances can be in the order of tens to hundreds of miles. I see that PostGIS has `CIRCULARSTRING` and `CURVEPOLYGON`, which seem to be a good way of storing an Arc, except that they're not supported by the `geography` type, only `geometry`. What would be the best way to store this? (I'm quite new to PostGIS and GIS in general, so it's entirely possible I'm missing something obvious.)


title: ArcMap, how to specify cellsize in PolygonToRaster_conversion function in meter

text: I have a polygon shapefile that contains my country geometry data. I need to extract points from that .shp file, the condition is that distance between points is from 5 to 10 meters. So, I think "cellsize" parameter of PolygonToRaster_conversion can help. I cannot understand how to calculate cell-size, what is its' measurement ? How to set cell-size to satisfy distances between each points ? Sorry for my bad English. Any suggestion is appreciated.


title: Override "ERROR: Operation on mixed SRID geometries" and force PostGIS to do the query

text: I'm trying to do an `st_intersects` query in postgis for two shapes (a point and buffer zone) which are of the same projected coordinate system. Unfortunately, one of the tables seems to have its table-srid value set to 4326. And yes, the first spatial column added to that table (`airports`) **was** of the geographic type (srid=4326). However, that same table has a column in it (added later) which is of the projected coordinate system (srid=2264) that I'm working with. When I try to run this query:               a = Airport.first     WakeCountyParcel.where{st_intersects(proj_shape, st_buffer(a.cary_proj_point, 5280))}      where cary_proj_point is the projected coordinate point (srid=2264) as is WakeCountyParcel's proj_shape, I get the SRID error:               ActiveRecord::StatementInvalid: PG::InternalError: ERROR:  Operation on mixed SRID geometries      To get around this I simply reconstruct Airport's `cary_proj_point` to divorce its association from the tainted Airport model               cary_proj_point = RGeo::Geos.factory(:srid => 2264).parse_wkt(a.cary_proj_point.as_text)     WakeCountyParcel.where{st_intersects(proj_shape, st_buffer(cary_proj_point, 5280))}      and all is well. In fact, rails being what it is, I could abstract out all of this code and, say, create a model method for `Airport` that would return the reconstructed projected point without me ever even having to look at the string-based reconstruction again. But its a hack and forcing PostGIS to do it anyway without having to trick it would be nice. I furthermore disagree with the concept of having one table per SRID value. I want my database to have geographic and projected spatial objects in different columns of the same table(s) for convenience. How do I over-ride PostGIS's pedagogic error of forcing one-SRID per table here? Thanks


title: ArcScene does not update z value after edit

text: I measured a feature with x, y, z coordinates. It's the green point cloud below ![Top View](http://i.stack.imgur.com/wFmZt.png) When I vied the points in Arscene, there was a known measurement error that I had fixed by adding 1.6 m to the Z field. (I selected all the too low points, then used field calculator to add 1.6 meters).               Elevation = [Elevation] + 1.6      The result was that the feature was updated, but the ArcScene display didn't You can see two selected points in the table and the workspace, with the visual top and bottom corresponding to top and bottom in table, but check the Z value after my editing, you can see the discrepancy ![Side View](http://i.stack.imgur.com/OVbFq.png) I have tried reloading the file, exporting the data to a new feature, but the problem remains the same. Any thought on why this happens?


title: Measurements across UTM zones, how to apply spatial parameters to a customize a projection?

text: I have a survey grid that spans 3 UTM zones. Using http://www.epsg- registry.org/ I can get an indication of what projections are available. Where can I find more info on the patterns of distortion within projections? And where can I find information on how I can modify the parameters of these projections (i.e. aspect and parallels)? Ok So I gather the necessary information for a bounding box: i.e North Latitude, South Latitude, etc... ![EPSG Godetic Parameter Dataset screenshot](http://i.stack.imgur.com/7ihwS.png) Let say that I then choose Africa Lambert Conformal Conic as my projection. If I then want to change the parallels of the projection using proj4 - how do I do it?                   +proj=lcc +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs      I would want to change this in order to bring the parallels closer to contain the survey grid i.e.:                   +proj=lcc +lat_1=5 +lat_2=-5 ?      Where can I find out if this is appropriate? What do I need to consider with the rest of the proj4 string?                  +lon_0=25 etc?


title: How to create thinner outside boundary outlines with bolder interior lines

text: I am working with a shapefile with a jagged coastline and interior regional boundaries. I am trying to create a thin line for the coast, so it appears more clearly, while still keeping bold, thicker lines showing the interior regional divisions. Normally I would just rearrange the drawing order, but because the interior lines need to be thicker, they just overpower any thinner lines. How can I create a thinner coastal line while still keeping a thick interior line for these polygons? Thank you!!!


title: In WMS, is there a way to provide appropriate resolutions/zoom levels?

text: I am looking for a way to tell a wms client which zoom levels or resolutions that are appropriate for a layer. Something like               ...     <layer>       ...       <resolutions>          <resolution>1.0<resolution>          <resolution>2.0<resolution>          <resolution>4.0<resolution>       </resolutions>      One "less preferred" way would be the VendorSpecificCapabilities in the WMS GetCapabilities 1.1.1 DTD, but it is dropped in the 1.3.0 XSD. Is there another way to do this within the WMS protocol?


title: ArcGIS Engine License Switch

text: Is it possible to change to a "higher-level" license after a license has already been checked out in ArcGIS Engine? Old posts in ESRI forums seem to indicate that this is not possible, but I'm wondering if 9.3 or 10 allows this. We have an application that 99%+ is used for viewing GIS data, so the ArcGIS Engine Runtime license is appropriate. Every now and then, though some (not all) users need to be able to edit an arc or two and it would be extremely annoying and disruptive to their workflow to have to exit the application and fire it up again just to grab an ArcInfo license.


title: How to: script convertion from SRTM to 3D printable file?

text: **Given a STRM3.tiff file** as input. **How to convert this STRM.tiff file into a 3D printable file ?** which I may load into most 3D printers' sofwares. My objective is to print some terran, lunar, or martian reliefs with a basic 3D printer. Gdal approach, QGis, or other welcome. Scriptic / terminal approach favored.


title: How do I determine the subsidence of land in Manila, Jakarta and Bangkok?

text: Can I set how these cities have lost elevation using digital elevation models? Is there a digital elevation model which data are updated? Or are there other methods? Thanks.


title: How to draw a Circle of fixed radius in QGIS using QgsMapCanvasItem?

text: I have derived a class from QgsMapCanvasItem for drawing circle of some radius at a given latitude and longitude. In my paint function I am using QPainter to draw the circle as               void paint (QPainter* painter){      painter->drawEllipse(center, radius, radius);     }           void updatePosition(){        center = toCanvasCoordinates(center_lat_lon);     }      The circle is drawing properly and its position is getting updated whenever the events like panning, zoom in, zoom out are happening. My problem is, whenever I am zooming in or zomming out, radius is not changing accordingly. Also I want to update my radius according to the projection system ( say WGS84 ). Any help is greatly appreciated.


title: GEOTIFF explanation of .aux xml and tfw world file

text: I want to know how raster images work, I have a set of geotiffs that has no aux, tfw or xml when I check the spatial information in arccatalog, they do have an projection. and they shows correctly. if the projection is embedded in the geotiff, why do I need .tfw ? I need to know what it does, is it used for quick transformation if the geotiff is in real coordinates wgs84 and I want another projection for fast show? or does my geotiffs lack some information? and when I define another projection, arccatalog creates aux, do i need to keep this aux? so. shortening the question, what is aux, tfw good for if the information is already stored inside the geotiff?


title: ArcGIS: How to create a line with a specific length?

text: How can I create a line in ArcGIS 9.3 to a specific length? I click once to start the line where I want it, and then I want it to be, say 10 Meters in length...Similar to AutoCAD. How do I do this? Thanks!


title: CreateFeatureclass_management doesn't add a layer to the TOC of ArcMap10

text: I created a python script for a toolbox and I am wondering about the fact that CreateFeatureclass_management doesn't add the feature-class as layer in the actual dataframe. This does not happen in the environment of a toolbox, but if I create a feature-class in the python window of ArcMap it creates the wanted layer. I already tried MakeFeatureLayer_management followed by AddLayer, with no result. What I am doing wrong?


title: Add button to open URL in ArcMap 10

text: I want to be able to add a button into ArcGIS for my users, something like this: http://gis.utah.gov/code-visual-basic/vba-link-from-arcmap-to-google-maps Only, using VBA in ArcMap 10 now seems to be an issue, I can't find the UI control option anymore. Any ideas?


I get the following error when running a CopyRows_Management with Python (ArcGIS 10.1):               ERROR 000732: Input Rows: Dataset \MyConnection.odc\MyTable does not exist or is not supported      Here is the script that the model builder exported.               # Import arcpy module     import arcpy          # Local variables:     MY_DATA = "Database Connections\\MyConnection.odc\\MyTable"     MY_DESTINATION = "C:\\GIS-Shared\\MyData\\MyGDB.gdb\MyTable"          # Process: Copy Rows     arcpy.CopyRows_management(MY_DATA, MY_DESTINATION, "")


title: Difference between two layers in PostGIS

text: What is the right way to calculate the difference between two layers? I tried to use the following approach:               SELECT ST_Difference(river.geom, lakes.geom)      FROM river LEFT JOIN lakes ON ST_Intersects(river.geom, lakes.geom)       But in the output, I lose the geometries of the `river` layer which do not intersect any geometries in `lakes`. It looks like left join does not work as expected. Currently, I'm using another approach, but I'm not sure this is correct:               SELECT ST_Difference(river.geom, lakes.geom)      FROM river JOIN lakes ON ST_Intersects(river.geom, lakes.geom)      UNION      SELECT river.geom      FROM river JOIN lakes ON NOT ST_Intersects(river.geom, lakes.geom)


title: Having trouble setting up Eclipse for ArcGIS 10.0 Java development

text: I'm trying to setup Eclipse for ArcGIS development. I've been reading for days and weeks through the documentation and through the forums here and elsewhere. It seems that no one has this same problem. My issue is that I'm stuck at the point of installing the ArcGIS plug-in for Eclipse. I'm going through the steps in the ArcGIS Resource Center here. It says to create an ArcGIS local update site at this directory: %ARCGISHOME%/java/tools/eclipse_plugin/arcgis_update_site/engine The problem is that my directory structure is missing the engine folder. Does anyone know how I can get the engine folder and its contents? Or any other solution?


title: Why does ESRI Geodatabase Replica "Schema Compare" not identify changes?

text: I've made some schema changes (new fields to existing FCs), and would like to replicate the changes to the child. While importing schema to the child database (which is the destination for a one-way replica from the parent), it shows a message saying _No schema changes found for this replica pair_ I did a previous schema change which had new fields and a couple of new FCs, and it worked fine. This time however, it is giving this message. Any ideas? Cheers!


title: Produce line from components, length and angle

text: I have a CSV file, or point data file which includes information about line vectors which I have previously calculated. This file is outlined as such:               x, y, dx, dy, length, angle(east_from_north)     1,1,1,1,1,1     2,2,2,2,2,2     ...     n,n,n,n,n,n      Where `x, y` are the co-ordinates of each point; `dX, dY` are the Cartesian components of the line; `length` is the length/magnitude, and `angle(east_from_north)` is the bearing of the line (east 0degrees, north 90degrees). I also have the the original set of `x, y` data from which I calculated the `dX, dY` components, `length` and `angle` using some python trig, if that would help this process. For example:               x1, y1, x2, y2     1,1,1,1     2,2,2,2     ...     n,n,n,n      **I would like to produce lines from each point using the`x, y` values as the originating point with the `length` and `angle` creating the length and direction of the line.** I have used a QGIS plugin, `Vector Field Renderer` to produce lines with arrowheads depicting the 'magnitude' and direction using this information which has been useful for one part of my analysis; however this does not transform the point data into polylines, only produces a line symbol -- for example: ![Vector Field Renderer output](http://i.stack.imgur.com/vNPAF.png) Effectively I would like to reproduce this output, but as a polyline file for which I can do further analysis on. The line does not need to have arrow heads. Edit: Solutions involving QGIS, GRASS GIS, GDAL, ArcGIS or Python/ ArcPy would be greatly received. Though, as I am currently learning ( _and a bear of little brain_ ) a well-commented/ walkthrough-esque solution would be amazing!


title: Configuring geonode proxied by nginx on webfaction

text: I'm trying to install geonode on webfaction. Webfaction doesn't provide root access, so it needs installation from source. I'm struggling to get authentication working. Webfaction works like this (simplified a bit):   * using their control panel, create an "application". This reserves a port.   * also via control panel, create a "website". This maps a domain to this port. This happens via a system nginx instance which proxies all requests to the assigned port.  I created an **nginx** instance listening on this port, proxying to **geonode** (i.e. django, served using `uwsgi`) and **geoserver** (i.e. a `tomcat` webapp). So the total setup is:               webfaction nginx -> my nginx -> / (django)                                  -> /geoserver/ (tomcat)      When loading the geonode homepage, tomcat logs as follows:               2014-05-08 05:49:06,865 WARN [geonode.security] - Error connecting to the GeoNode server for authentication purposes     org.springframework.security.authentication.AuthenticationServiceException: Communication with GeoNode failed             at org.geonode.security.GeoNodeAuthenticationProvider.authenticate(GeoNodeAuthenticationProvider.java:61)     [...]     Caused by: java.io.IOException: GeoNode communication failed, status report is: 404, Not Found             at org.geonode.security.HTTPClient.sendGET(HTTPClient.java:73)      Here is my nginx config:               pid /home/.../geonode2_nginx/parts/nginx-geonode/nginx-geonode.pid;     lock_file /home/.../geonode2_nginx/parts/nginx-geonode/nginx-geonode.lock;     daemon off;     events {         worker_connections 1024;     }     http {         server {             listen 9999;             access_log /home/.../logs/user/access_geonode2_nginx.log;             error_log /home/.../logs/user/error_geonode2_nginx.log;             # serve staticfiles             location /static/ {                 include       /home/.../geonode2_nginx/parts/nginx/conf/mime.types;                 alias /home/.../geonode2_static/;                 expires 7d;             }             # serve mediafiles, default 'uploaded' in GeoNode             location /uploaded/ {                 alias /home/.../geonode2_upload/;                 expires 7d;             }             # geoserver proxy             location /geoserver/ {                 proxy_pass http://127.0.0.1:8888/geoserver/;                 proxy_set_header X-Real-IP $remote_addr;                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                 proxy_set_header Host $http_host;             }             # gunicorn/uwsgi wsgi proxy             location / {                 proxy_pass_header Server;                 proxy_set_header Host $http_host;                 proxy_redirect off;                 proxy_set_header X-Real-IP $remote_addr;                 proxy_set_header X-Scheme $scheme;                 proxy_connect_timeout 20;                 proxy_read_timeout 20;                 proxy_pass http://127.0.0.1:7777/;             }         }     }      Can anyone see anything wrong? Any tips on debugging this? What HTTP headers should I look for? How can I find out what the 404 in the tomcat message above refers to? I asked this question on the webfaction forums also at https://community.webfaction.com/questions/16732/geonode-configuration


title: Problems while rendering with Atlas

text: when I export my data genereated with the openLayers using Atlas rendering is always incomplete. Atlas is rendering too fast so that the data from openLayers is not completely loaded. Do anyone knows how to handle this? ![screenshot](http://i.stack.imgur.com/pvTXk.png)


title: Varying Line Widths According to Attribute Values

text: I'm trying to draw a vector map of Europe on QGIS 1.7.3 with lines symbolizing the transmission of energy (power transmission lines) between the different countries on the map. I am trying to correlate the transmitted power in gigawatts (that I have entered as an attribute for each line) with the thickness of that line (instead of a graduated or categorized color ramp). Can you please tell me if there's a way to do that? Thank you.


title: How can I create weighted Thiessen polygons?

text: I have a point shape file and I create Thiessen (Voronoi) polygons programmatically using this scripting syntax:               CreateThiessenPolygons_analysis (in_features, out_feature_class, fields_to_copy)       However, each point is related with an area (i.e. the preferred size of each polygon) and I wish the thiessen polygons to be weighted based on this field. Is that possible and how? Is there any relevant code in VBA?


title: Combining QR Codes with Geo Location

text: We are planing a geo caching game, where we want to use QR Codes. Each time a player scans a QR Code, he will be redirect to a specific landing page. To each QR Code we want to add geo information like an address or lng/lat. So we can find out, where and how often the QR Codes have been scanned, without asking the mobile device to send its location to us. Is there a service, that provides tagging a QR Code with a geo location? Best regards, Pezzo


title: How can I change object image in MapInfo using MapBasic?

text: I need to change the image of the objects which are in the Selection Table using MapBasic functions. When I say _"Image"_ I mean point object icon on the map.


title: export 3D data dxf file

text: I'm trying to export a DXF file from Qgis1.8.0 Lisboa and can not have a 3Dfile in Autocad! Or micristation. It results always in 2D file. How can I export height data from a shape file in Qgis? Regards Jorge Marques


title: How to get a distinct pair of column values based on minimum of another (computed) column?

text: I have two tables with point geo data, one (sfc_obs) with weather stations (`name`s), one (smos_grid) with satellite pixels (`dgg`s), and I'm trying to find which `dgg` is closest to each `name` using `ST_Distance()`. I have no trouble getting the distances and sorting, but I'd like to get just the closest match for each `name`. I think I need to use a `GROUP BY` OR `DISTINCT` clause, but everything I've tried has resulted in errors (e.g. GROUP BY name -> "column smos_grid.dgg must appear in the GROUP BY clause...") or resulted in the whole table (below) spit back at me. I have a feeling that one of the related questions may have the answer, but I haven't been able yet to successfully adapt any of them to my situation. I want the distinct pair of `name` and `dgg` with the minimum `distance`. I could (and probably will, in the meantime) use another language to parse the current output, but I'd like to know what the real solution is. Base query: `SELECT sfc_obs.name AS name,smos_grid.dgg AS dgg, ST_Distance(sfc_obs.geom_utm, smos_grid.geom_utm) AS distance FROM sfc_obs,smos_grid ORDER BY name,distance;` Result:                     name       |  dgg   |     distance          -----------------+--------+------------------      ALGONA          | 196466 | 7204.37098751625      ALGONA          | 196465 | 8842.89089934474      ALGONA          | 196978 |  11010.118792918      ALGONA          | 195953 | 14495.8081360579      ALGONA          | 196979 |  16646.802911716      ALGONA          | 195952 | 20472.9039241652      ALGONA          | 196977 |  21241.154673217      ALGONA          | 195954 | 21880.6543096356      ALGONA          | 196467 | 22540.4472393787        ...      ALGONA          | 212884 | 457182.275288169      ALGONA          | 213907 | 463002.906164119      ALGONA          | 213396 | 463254.000442818      ALGONA          | 213908 | 469680.703686122      ALGONA          | 213397 | 470914.550849778      ALGONA          | 213909 | 476963.651054924      Ames            | 202105 | 3626.03192856493      Ames            | 201592 | 10236.1588500566      Ames            | 201593 | 13579.2271071596      Ames            | 202104 | 15430.7774139333      Ames            | 202106 |  16638.577453568      Ames            | 202618 | 17402.7790010433      Ames            | 202617 | 18506.8761326297      ...      Desired result:                     name       |  dgg   |     distance           -----------------+--------+------------------      ALGONA          | 196466 | 7204.37098751625      Ames            | 202105 | 3626.03192856493      ...


title: OpenLayers DrawFeature Vector parameters

text: "Dear all, in my map application I am using a Vector/DrawFeature approach like this:               var refresh = new OpenLayers.Strategy.Refresh({force: true, active: true});     var proj = "EPSG:900913";       var polygonLayerFreehand = new OpenLayers.Layer.Vector("Selection Polygon", {         strategies        : [new OpenLayers.Strategy.BBOX(), refresh],        // wrapDateLine      : true,         sphericalMercator : true,         isBaseLayer: true,         maxResolution: 'auto', // important, it doesn't default to auto        // units: 'm',              projection: new OpenLayers.Projection(proj),         //projection: new OpenLayers.Projection(" EPSG:900913"),         renderers: ["Canvas", "SVG", "VML"]     });      It works (I can draw a polygon) but the console gives me the following error:               Uncaught TypeError: Cannot read property 'read' of null OpenLayers.js:1073     OpenLayers.Strategy.BBOX.OpenLayers.Class.triggerRead OpenLayers.js:1073     OpenLayers.Strategy.BBOX.OpenLayers.Class.update OpenLayers.js:1071         OpenLayers.Strategy.BBOX.OpenLayers.Class.activate OpenLayers.js:1070     OpenLayers.Layer.Vector.OpenLayers.Class.afterAdd OpenLayers.js:679     OpenLayers.Map.OpenLayers.Class.addLayer OpenLayers.js:173     newLayer mc_sel.js:1853     changeLayer mc_sel.js:1951     b.event.dispatch jquery-1.9.1.min.js:3     v.handle      Any ideas what might be the cause? Thanks in advance again!


title: QGIS GRASS vector simplification creates duplicate data rows

text: When simplifying polygons in QGIS (2.2.0) with the GRASS v.generalize tool the resulting layer duplicates some data rows many times. A shapefile of 657 zones/data rows: ![enter image description here](http://i.stack.imgur.com/wkP06.png) .. is simplified to one with correct-looking geometries but 12,513 data rows: ![enter image description here](http://i.stack.imgur.com/xvTfi.png) Many of these don't seem to have an associated polygon, at least not a visible one. Not sure why this happens, but what would be the easiest way to (preferably) prevent it or (alternatively) clean the data table up? The problem is replicable using this small shapefile with CRS set to EPSE 27700 - 33 data rows become 60 after generalising by the 'douglas' method with a 1000 tolerance. Many thanks in advance. * * * Edit. I suspect this has something to do with the clipped nature of the shapefile which follows coastlines and river edges (which do not all simplify as you might predict in line with the tolerance).


title: Interactive "For each .... Do" loop?

text: What is the most direct and straightforward, hopefully interactive, method to conduct a _For each item Do..._ loop, where the input list is a selection of polygons? A word about "interactive". I'm not opposed to a script solution, but it's not the ideal. The basic idea is that the whole process be as dynamic and immediate as possible. Point and click at some stuff, do something with it, point and click at the results, do something else, and so on for an hour or so. Then save the final results and forget about everything in the middle, it was all adhoc and doesn't need to be repeated exactly. Software at hand is ArcGIS 10 (with 3D and Spatial Analyst), Arcinfo Workstation, and QGIS 1.7 (though don't feel like a solution from a different product is off-topic). In pseudo code the idea is:               for each selected poly in "index_layer" do:        clip "raster_layer" by poly geometry to "d:\out\raster_poly[$ID].tif"      In the following image the selected set is outlined in heavy black and with halo text. ![selected polygons over shaded relief](http://i.imgur.com/AW62N.png)


title: How to set the workspace to a featureclass from an unknown file gdb?

text: When a user loads an mxd, I am getting the IWorkspace object from the featurelayer's dataset:               IFeatureClass featClass = (IFeatureClass)featLayer.FeatureClass;     IDataset dataSet = (IDataset)featClass.FeatureDataset;     IWorkspace workSpace = (IWorkspace)dataSet.Workspace;      But this obviously does not work if the user has a layer from a file geodatabase (dataset is null). I can check to see if it's a gdb layer but nothing in the featurelayer or its featureclass tells me the source of the gdb. How do I go about setting the workspace object to a featurelayer that comes from a gdb?


title: Using multivalue output parameter with ArcPy?

text: How can I use a multivalue output parameter with ArcPy? Please give an example.


title: Query WMS for available layers using Openlayers

text: Is it possible to use Openlayers to return an array of available Layers on a WMS? I am attempting to allow users to add a layer.wms to a map. I would like to allow the user to view available layers, select those layers that they want, and then pass that arrary to layer.wms params, add the layer and redraw. Just wondering if there was a simple way to query layers available from a WMS.


title: Deleting multiple vertices at once?

text: I have a polygon feature class that I've converted to representations so that I can delete some vertices. I'm doing this to simply some of the shapes manually, but I'd like to speed this up by selecting a group of vertices with the Representations lasso tool and then deleting them at once rather then using the time-consuming point-and-click Delete Vertex tool. Is this possible?


title: osm2pgsql Error: operator class "gist_geometry_ops" does not exist for access method "gist"

text: When using `osm2pgsql` to import `massachusetts-latest.osm.bz2` into PostGIS 2.0.1 database `osm` (running on PostgreSQL 9.1 on an Ubuntu 12.04), I get the error `failed: ERROR: operator class "gist_geometry_ops" does not exist for access method "gist"`. I have ran the enabler `.sql` scripts including `legacy.sql`. Truncating the tables and reimporting does not help. Any idea what is causing this error? **Command** `osm2pgsql massachusetts-latest.osm.osm.bz2 -d osm -U postgres -P 5432 --hstore -W` **Output:**               Reading in file: massachusetts-latest.osm.bz2     Processing: Node(23054k) Way(2370k) Relation(5058)  parse time: 300s          Node stats: total(23054254), max(2147478725)     Way stats: total(2370244), max(215072011)     Relation stats: total(5058), max(2855687)          Writing way (2370k)          Writing relation (5058)     Committing transaction for planet_osm_point     Sorting data and creating indexes for planet_osm_point     Committing transaction for planet_osm_line     Committing transaction for planet_osm_roads     Sorting data and creating indexes for planet_osm_line     Committing transaction for planet_osm_polygon     Sorting data and creating indexes for planet_osm_roads     Sorting data and creating indexes for planet_osm_polygon     CREATE INDEX planet_osm_roads_index ON planet_osm_roads USING GIST (way GIST_GEOMETRY_OPS) TABLESPACE pg_default;      failed: ERROR:  operator class "gist_geometry_ops" does not exist for access method "gist"          Error occurred, cleaning up