Intersection problem: too many elements?

I have this code where an IGeometry shape (4-5 circles not filled) should be intersected with another layer's features                               // Convert from IGeometry to ADF Geometry Polygon                     ESRI.ArcGIS.Geometry.IPointCollection com_pointcollection =                             (ESRI.ArcGIS.Geometry.IPointCollection)multipointPoints2;                     ESRI.ArcGIS.ADF.Web.Geometry.Point[] new_adf_points =                                             ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local.Converter.FromIPointCollection                         (com_pointcollection);                     ESRI.ArcGIS.ADF.Web.Geometry.PointCollection new_adf_pointcollection = new                         ESRI.ArcGIS.ADF.Web.Geometry.PointCollection();                     for (int i = 0; i < new_adf_points.Length - 1; i++)                     {                         new_adf_pointcollection.Add(new_adf_points[i]);                     }                          ESRI.ArcGIS.ADF.Web.Geometry.Ring new_adf_path = new                         ESRI.ArcGIS.ADF.Web.Geometry.Ring();                     new_adf_path.Points = new_adf_pointcollection;                     ESRI.ArcGIS.ADF.Web.Geometry.RingCollection new_adf_pathcollection = new                         ESRI.ArcGIS.ADF.Web.Geometry.RingCollection();                     new_adf_pathcollection.Add(new_adf_path);                     ESRI.ArcGIS.ADF.Web.Geometry.Polygon new_adf_polygon = new                         ESRI.ArcGIS.ADF.Web.Geometry.Polygon();                     new_adf_polygon.Rings = new_adf_pathcollection;                                    // Now get the intersect query                          ESRI.ArcGIS.ADF.Web.SpatialFilter spatialFilter =                         new ESRI.ArcGIS.ADF.Web.SpatialFilter();                     spatialFilter.Geometry = new_adf_polygon;                     spatialFilter.ReturnADFGeometries = false;                     spatialFilter.MaxRecords = 10000;                          System.Data.DataSet queryResultsDataSet = new System.Data.DataSet();                     for (int index = 0; index < layerIDs.Length; index++)                     {                         System.Data.DataTable queryResultsDataTable =                       queryFunctionality.Query(queryFunctionalityq.Name, ConvertFromLayerNameToLayerId(m_Map, m_ResourceMapItem, m_firstLayerName), spatialFilter);                         queryResultsDataTable.TableName = gisResource.Name + "_" + layerNames[index];                         queryResultsDataSet.Tables.Add(queryResultsDataTable);                     }      I'm converting the IGeometry (which I've drawn on the screen and I know it's correct) to a web ADF Polygon and then using this polygon for an intersection query However some features which are clearly not intersecting the circles' borders are being included in the result To better explain the situation I did this screenshot: ![enter image description here](http://i.stack.imgur.com/tYr3u.jpg) Why is that? The red squared features are all different so it's not a problem of "same feature" Update: with less features it's the same, if they intersect the circle line they get colored, but the others get colored too.. simply adding them seems like telling the system "I'm intersected too"


How to select all files in a directory for merging in Processing?

I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the _Output_ folder, I'm trying to get the **saga:mergeshapeslayers** algorithm to merge all the files in the _Output_ folder. I have used the Model Builder and although it is helpful to an extent, I find that it is used for specific purposes whereas I am attempting to make a script for generic purposes. Any advice would be more than welcome. (Code edited)               ##Test=name     ##Select_folder=folder     ##Result=output vector          import os     import glob          path_1 = Select_folder     path = path_1     os.chdir(path)          def function():              output = glob.glob(path_1 + './*.shp')         x = 0              while output[x]:             for fname in glob.glob("*.shp"):                 outputs_1 = processing.runandload("qgis:fieldcalculator", output[x], 'Number', 1, 10, 0, True, 1 , "C:\Users\Me\Desktop\Output\\"  + fname)                 multiple_0 = glob.glob("*.shp")                 x = x + 1                  if x + 1 > len(output):                 processing.runalg("saga:mergeshapeslayers", output[0], ";".join(multiple_0) , Result)                 break             else:                 continue          if path_1:         function()     else:        pass


popup.contentDiv OpenLayers Popup window

Could somebody help with popup.contentDiv()? I don't understand how can I define the HTML div class here. In general I would like to define some customs characteristics via HTML. The source http://dev.openlayers.org/docs/files/OpenLayers/Popup-js.html doesn't help much without an example. I found some link where it is used, but I didn't get how it works either. Thanks in advance.                                            popup=new myPopupClass("infoPopup",olMap.getLonLatFromPixel(event.xy),new OpenLayers.Size(10,10),popupInfoText, null, true);                                     popup.setBackgroundColor("#CCD8E7");                                     popup.setOpacity(0.9);                                     popup.setBorder("1 px solid #8DB2E3");                                     popup.contentDiv();                                     olMap.addPopup(popup);


Change points to polygon

I have a map which has one data point per zip code. I would like to change those points to zip code polygons. Any ideas on how to go about it?


How can I locate features along multiple routes in a consistent direction?

I have a large network of routes that I've created based on an NHD plus stream layer and a large number of points that are located throughout this network. I've got the routes segregated by stream as perfect as I can imagine getting them and the points layer is snapped to the routes. I've QAQC'd and the routes match the streams without duplicates..etc. Everything looks good. My goal is to determine how far upstream each point is on it's respective stream route. Ultimately this will lead me to stream distances from several fixed points in the watershed to every sample point. I've been using the Locate Features Along Routes Tool in ArcGIS 10 to do this. At first it seemed like it worked perfectly. But when I looked at the M values for each point I realized that for some routes, measurement started on the downstream end and progressed upstream, giving me what I needed, while on others, measurement started at the upstream end and worked downstream, effectively giving me the opposite of what I need. I think the definition of the "start" and "end" may be inconsistent among routes (I've checked on this via the Construct Points tool and am pretty sure this is the issue) Is there a way that I can ensure distance is being calculated in a certain direction on each route? Any input would be appreciated, Thanks for your time, Vin


Spike finder in PostGIS

I tried to modify spikeRemover from Schmidt & Krüger. My goal it's to obtain, for each polygon, the position of the spikes. I don't need to remove it. For some reason, that I can't figure out, my script fails and I don't obtain any position. Probably there is a problem at the union of different points but I don't know how to manage it in another way.                   CREATE OR REPLACE FUNCTION ST_SpikeFinder (geometry, angle double precision)          returns geometry as           $body$          DECLARE          ingeom alias for $1;          angle  alias for $2;          lineusp geometry;          newgeom geometry;          numpoints integer;          point_id integer;          result_pnt geometry;                   begin                 -- input geometry or rather set as default for the output              newgeom := ingeom;                  -- check polygon             if (select st_geometrytype(ingeom)) = 'ST_Polygon' then                 if (select st_numinteriorrings(ingeom)) = 0 then                      lineusp := st_boundary(ingeom) as line;                         numpoints := st_numpoints(lineusp);                 point_id := 0;                               -- the geometry passes pointwisely                 while (point_id <= numpoints) loop                             result_pnt := ST_Collect(result_pnt, st_pointn(lineusp, point_id));                         -- the check of the angle at the current point of a spike including the special case, that it is the first point.                         if (select abs(pi() - abs(st_azimuth(st_pointn(lineusp, case when point_id= 1 then st_numpoints(lineusp) - 1 else point_id - 1 end),                                      st_pointn(lineusp, point_id)) - st_azimuth(st_pointn(lineusp, point_id), st_pointn(lineusp, point_id + 1))))) <= angle then                  (probably the problem is here)      --->        result_pnt := ST_Union(result_pnt, st_pointn(lineusp, point_id));          end if;                 point_id = point_id + 1;                 end loop;             end if;             end if;                 return result_pnt;          end;          $body$            language 'plpgsql' volatile;      Thank you in advance. C.


Is there a Time Slider feature in MapInfo?

Is there an Time Slider Feature in MapInfo? The only conclusion I have found in my research is that you have to buy the MapInfo Profiler arm?


Sending xml post request to geoserver

This may be simple question but I can't get started. This tutorial from pen state university has xml request               <wfs:GetFeature service="WFS"  version="1.0.0"       outputFormat="GML2"  – we would like gml2 as the return format       xmlns:topp="http://www.openplans.org/topp"       xmlns:wfs="http://www.opengis.net/wfs"       xmlns:ogc="http://www.opengis.net/ogc"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xsi:schemaLocation="http://www.opengis.net/wfs       http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">       <wfs:Query typeName="topp:bc_roads">  we want to query                      bc_roads features         <ogc:Filter>           <ogc:FeatureId fid="bc_roads.1"/> only return features                                              with an ID of bc_roads.1         </ogc:Filter>         </wfs:Query>     </wfs:GetFeature>      My question here is how do I send this request to geoserver using geoext or javascript?


ArcGIS 10 - disappearing rasters?

From time to time it happens to me that rasters disappear at certain zoom level in ArcMap, or only some parts of the raster (strips) show up. I'm working on WinXP, ArcGIS / ArcView 10, Sp2, rasters are jpg files, both with and without pyramids. Anyone facing a similar behaviour? Any tips what is the reason and solution for this? It's really annoying.


Intermittent 'Could Not Find Layer' and 'Bad Request' Errors on GeoServer

Morning StackExchangers, We are having some intermittent faults with GeoServer at the moment. We have a mapping application - http://explorer.geowessex.com \- that makes WMS requests to our Geoserver to retrieve tiles. The layers are properly loaded and work via GeoServers built in 'Layer Preview' function, but sometimes in the application the tiles don't load. In the Firebug Net Panel you will see all the WMS Get Requests being fired when a layer is loaded and they say they return with no errors. In reality if you open one of these response in a new tab you get the following XML file.               <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://wms.geowessex.com:80/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" ><ServiceException code="LayerNotDefined">       Could not find layer 'workspacename':'layername'      Which is stupid because it definitely exists, I can see it load perfectly well in GeoServer layer preview. What's even more annoying is that sometimes it doesn't even return this, it just gives the error '400:Problem communicating with GeoServer'. On top of that I cannot reproduce it regularly, I can have the map up, turn on a layer and it wont work. Turn on another layer and it will, go back and turn the other layer back on and it will start working again.   I'm really banging my head against a brick wall here. GeoServers own documentation is not that good for troubleshooting and I must've done enough Google searches to bring down their servers in the last two days and am still no closer as to why this happens.   Anyone experienced this themselves? Suggestions, comments anything is hugely welcome, and if you need any more info let me know. Cheers, Rob


How to set QGIS Python path so that I can use system packages on Windows?

Several Python packages are best installed with a Windows installer. But those installers install to the system-wide Python directory. How do I set the Python path in QGIS? I tried setting PYTHONPATH as a Windows environment variable. It can import netCDF4 (which is installed globally), but the import doesn't succeed because it cannot load a DLL. So perhaps also some DLL load path needs to be adjusted?


Incorporating known GPS/INS data to automatically produce geo-registered 3D models

I am trying to reconstruct a 3D building model from 2D video frames using an open-source Structure-From-Motion(SFM) software (Bundler). The final reconstructed 3D model will be in Cartesian coordinates but ultimately it needs to be geo-registered so that I can overlay it on a virtual globe or in 3D analyst. As far as I know, the typical SFM approach solves for _relative_ camera poses and the 3D points. However, since I already have GPS/INS metadata for each video frame, is it possible to use those as an initial estimate for the extrinsic camera parameters (camera pose) to input into bundler, and get my 3D point cloud directly in the same world coordinate system directly? I know a common approach (correct me if I am wrong) after the SFM process is to manually try to fit the model or find a rigid transformation to the world coordinate system, by using some marked ground control points on a reference imagery, but I just want to know whether this geo-registration can be done automatically instead by specifying known rough initial camera poses as input to Bundler (or any other similar sFm software) for subsequent refinement through bundle adjustment. Thanks!


Select Layer By Attribute using loop

I have 273 features in the feature class and i want to select them one by one and use the statement in the following code. At the line:               *arcpy.SelectLayerByAttribute_management (fc1,"NEW_SELECTION","OBJECTID=79")*,       The feature whose object id is 79 one of the features. When i use this code, I do it for only that feature. I want to apply the statement to all features one by one with a loop. I try to do it, but i am new for programming with python.               import arcpy     from arcpy import env     env.workspace = "D:\pomme de terre 2\pomme de terre2.gdb"     env.overwriteOutput = 1          fc1 = "Flowlin24K_sl_Uns"     fc2 = "New_Poyline"          arcpy.SelectLayerByAttribute_management (fc1,"NEW_SELECTION","OBJECTID=79")     arcpy.SelectLayerByLocation_management(fc1,"INTERSECT",fc1)     arcpy.SelectLayerByAttribute_management (fc1,"REMOVE_FROM_SELECTION","StreamLevel>6")     arcpy.CopyFeatures_management(fc1,"hidden")     arcpy.SelectLayerByAttribute_management (fc1,"CLEAR_SELECTION")          coordList = []          arcpy.FeatureVerticesToPoints_management("hidden", "vertices", "MID")     arcpy.AddXY_management("vertices")     rows = arcpy.SearchCursor("vertices")          for row in rows:         X = row.getValue("POINT_X")         Y = row.getValue("POINT_Y")         coordList.append([X, Y])          del row, rows          coordList.sort()          point = arcpy.Point()     array = arcpy.Array()          for feature in coordList:         point.X = feature[0]         point.Y = feature[1]         array.add(point)          polyline = arcpy.Polyline(array)          array.removeAll()     arcpy.Delete_management("vertices")     arcpy.Delete_management("hidden")     arcpy.CopyFeatures_management(polyline, fc2)


How do I restore the docking guides in ArcMap 10?

I lost my docking guides quite some time ago and I can't figure out how to get them back. Initially, I thought maybe it was an OS (Windows 7) configuration but my visual studio docking guides work correctly. I can still dock, but it's the old style of docking (no docking guides). ArcGIS 10 SP2 in Windows 7, x64 ![Viewing Multiple Tables](http://i.stack.imgur.com/PPYr4.png)


Is there a simple way to compute the UTM Zone from a lat/long point?

I am trying to convert a latlong point to UTM. To define UTM projection, I need to calculate zone for the point. I am trying to figure out the best way to do this. One way to do this would be use longitude values to find the proper zone. This would require lot of coding. I am curious if there is a better way of doing this. Thanks


Dynamic ArcServer Layer

I have the following setup: ArcGIS Server + ArcSDE on top of Oracle RAC. I created a view merging some data that is in Oracle and ArcSDE. In ArcMap it all works just fine. Whenever a new location is added to the locations table, I can see the joined features, etc. However I need this to happen in ArcServer. I mean, I have a MSD published and I can consume it via REST and OpenLayers. It seems to me that AGS is caching the generated tiles, although it's set to NOT cache anything. Any ideas why this is happening?


How to display IGeometry?

I've done an intersection with the ITopologicalOperator6 interface, and I now have an IGeometry with the result. How to draw this in a graphics layer on the map? I want to see what was intersected (possibly colored). According to this topic: CustomLayer Draw Com Exception it seems that I could create a new layer from the IMap interface.. is this possible? Is there any other more convenient way to do this? How would you draw an IGeometry item to your map?


Arc ASCII Grid output problem in QGIS 2.0

I used to convert tif files to ascii in Qgis 1.8 using gdal translate without having any problems with the output i.e. I have the normal heading and values. When I upgraded to 2.0 I started to get the output below (second image) which do not have the normal headings and values. The ascii grid output looks okay when loaded in Qgis but it seems broken when you check it on Textedit/Notepad/Terminal. I tried to convert the tif file using a newly installed Qgis 2.0 on windows, mac and ubuntu but they have the same results. Any ideas how to fix it? I used the data from worldclim http://www.worldclim.org/ as sample. Ascii output from Qgis 1.8 ![](http://i.stack.imgur.com/GGw8O.png) Ascii output from Qgis 2.0 ![](http://i.stack.imgur.com/DYgMJ.png)


Developing standalone gis applications using pyqgis

I am trying to develop a standalone application using pyqgis but I have no clue on where to start and where to write the code to make it happen so if anyone can provide me a tutorial to getting started, it'll be a huge benefit for me. Thanks.


Edit SQL Server table (not registered with geodatabase) with arcpy

I am trying to update some rows in a SQL Server database table (not registered with geodatabase) with arcpy.da.UpdateCursor. However, when running the `deleteRow()`, I get the `error return without exception set` error. Updating geodatabase tables works fine. I guess it might be a limitation of arcpy which can't edit a non-registered with geodatabase RDBMS table (in this case, SQL Server), but I want to make sure I don't miss anything. Can ArcSDESQLExecute class help me to update SQL Server table that are not registered in geodatabase (have found no info on that in the Help)? Any other workarounds? **EDIT:** I have ended up using ArcSDESQLExecute which works fine for executing SQL commands (including deleting rows) for tables that are not registered with geodatabase.               sde_conn = arcpy.ArcSDESQLExecute(r"C:\GIS\Temp\nongeo.sde")     sql_statement = """delete from added_table WHERE AddID = 2 """


Description CRS EPSG:6372

does someone know where could I find a description of CRS EPSG:6372. I searched in the EPSG page but seem not to find something that quick.. Any help would be really appreciated. Regards!


Complexity of A-star algorithm using pgRouting in a graph

I'm using the A-star algorithm in pgRouting. It uses the Manhattan distance as a heuristics ((|dx|+|dy|)/2). What would be the time complexity in a standard route network? Based on Why is the complexity of A* exponential in memory?, the complexity should be O(n) with n the maximum shortest path in the network. Is this correct?


Feature Cursor Count on mutiple layers

I would like to get a total count of multiple layer features (defined) within the ArcMap view extent. The code works fine with one layer but when I add a second or third layer with an "OR" operator I only get the count of 0 because one layer may be visible within the extent but the others are not. e.g. If pLayer.Name = "Layer1" Or pLayer.Name = "Layer2" Here is the code. Any suggestion would be greatly appreciated. thx!               Dim pMxDoc As IMxDocument     Set pMxDoc = ThisDocument          Dim pAv As IActiveView     Set pAv = pMxDoc.FocusMap     Dim pMap As IMap          Dim pEnv As IEnvelope     Set pEnv = pAv.ScreenDisplay.displayTransformation.VisibleBounds          Dim pSF As ISpatialFilter     Set pSF = New SpatialFilter     Set pSF.Geometry = pEnv     pSF.GeometryField = "Shape"     pSF.SpatialRel = esriSpatialRelIntersects          Dim pEnumLayer As IEnumLayer     Dim pLayer As ILayer      Set pMap = pMxDoc.ActiveView.FocusMap Set pEnumLayer = pMap.Layers               Dim pFLayer As IFeatureLayer     Dim pFClass As IFeatureClass     Dim pFCursor As IFeatureCursor     Dim pF As IFeature     Dim intCount As Integer      Set pLayer = pEnumLayer.Next               Do Until pLayer Is Nothing              If pLayer.Name = "Layer1" Or pLayer.Name = "Layer2" Then '?MULITI CUR                        Set pFLayer = pLayer          Set pFClass = pFLayer.FeatureClass          Set pFCursor = pFClass.Search(pSF, False)              End If         Set pLayer = pEnumLayer.Next     Loop             ' Loop through the cursor and count number of selected features.     Set pF = pFCursor.NextFeature     Do Until pF Is Nothing         intCount = intCount + 1         Set pF = pFCursor.NextFeature     Loop          If intCount = 0 Then     MsgBox "Count = 0"     Else     MsgBox ("Count = " & intCount)     End If          pAv.PartialRefresh esriViewGeoSelection, Nothing, Nothing


Selecting by bounding box with PostGIS

I have a large dataset in a PostGIS database. I am viewing it via a web interface that loads the data as GeoJSON. There is too much data to give the client all at once (10s of MBs worth...) so I would like to get an area of data within the bounding box formed by the edges of the window (the dotted line in the image below). Getting the coordinates for points f and g is easy. **Question 1:** Is this a good way of doing things? Should I be thinking of caching them as tiles or is this method likely to be efficient enough? **Question 2:** How do I retrieve just the data within this bounding box? **Question 3:** If a shape overlaps the edge of the bounding box (e.g. shape A below) is there a simple way to crop it as it is queried like in the second image? ![enter image description here](http://i.stack.imgur.com/y2o4Z.png)


Why is the OGC Symbology Encoding standard not being implemented and is SLD an alternative?

I searched exhaustively over the internet as well as at this How to export Symbology from ArcGIS to Microstation or QGIS? but didnt find a satisfactory answer. Hope to get the answers from the experts over here. Suppose I have styled a polygon shape file (eg: Border width = 0.26, border color = green, red colored simple fill, label displayed, etc ). When I save the style in QGIS, it is saved in xml format which is specific only to QGIS. Same is the case with other softwares which they store it in their own format. Which means, I cannot exchange styling information between different softwares. Though the OGC SE standard is in place, I was just confused why this is not being implemented by any software. Qgis 1.8 supports SLD but then what is the purpose of storing the style as qgis specific .qml file ? ..... Also, since SLD standard is used for web-services, is it okey to use this standard in this case(for exchanging data between different softwares) ?


usa electric transmission powerlines shape files sources

Does anyone have a good source for these? I have some old (1993) data from the US National Renewable Energy Laboratory (NREL) and Cubewerx' WMS (Cubewerx are a spatial data provider); neither of which are very accurate. Pipeline shape files other than the 10 year old NPMS data would also be helpful. Thanks


Force SRID in views in Postgis 2.0

I have a very tricky problem: I have a Postgis 2.0 database, used as datastore for Geoserver 2.1.3 I have a table with a geometry column (named shape), with SRID 4326 I have created a view like this:               CREATE VIEW pippo AS SELECT st_geometryn(shape,1) as geom FROM events      And then I published the view using geoserver. Everything works, except for GetFeatureInfo requests, that fails with the error 'Operation on mixed SRID geometries A simple               select * from geometry_columns      returns that the SRID of pippo.geom is 0 (but should be 4326) I tried also with this definition for the view               CREATE VIEW pippo AS SELECT st_setsrid(st_geometryn(shape,1), 4326) as geom FROM events      but I still have SRID=0 in the geometry_columns....any help? Here is how the layer is defined in Geoserver: ![enter image description here](http://i.stack.imgur.com/x7aYg.png) # Workaround I found a workaround to fix not the problem itself, but to let Geoserver to perform spatial search on GetFeatureInfo requests: instead of creating a view and publish it, I published an SQL-layer defined directly in geoserver. In the layer-definition form it allowed me to select the right gemoetry type and SRID and everything is working now!


Error using Grass v.net

I'm trying to connect my network to a points layer with a threshold of 4500 meters. I have about 11000 or so entries in my polyline and about 24 in my points layer. I have alreday used v.distance, hence the threshold. However I recieve an error (image attached) any time I try the following:               v.net input=network points=cdw1c output=network_v1 operation=connect threshold=4500      Here is the error: ![enter image description here](http://i.stack.imgur.com/JT0bb.png) Error content is: > Assertion failed: !p->taken[i], file split_q.e, line 69 Can anyone help me to understand what it means? * * * **Update:** After a long consulation with a generous user from GRASS community, I still havn't came to a solution. I've tried on two computers with WIN 7 as operation system, the following GRASS versions: 6.4.2 (through QGIS and without the plugin), 6.4.3 RCs, 7.0.0 For the first two I have received the same error, for version 7 I didn't recieve the error but the process have never finished. On the other hand, my helper managed to complete it in seconds using my files. Can the problem have something to do with windows 7, some background or system process, or so? Should I install any extention or plugin in order to run network analysis programs on win 7? Thanks a lot in advance. Dor


What are the FOSS equivalents to these ArcGIS products?

I'm a long-term user of ESRI software, and I now have a need to use free and open source software. I've been reading about Open Layers, PostgreSQL, PostGIS, GeoServer and MapServer but I can't find a good overview stating what each product does, why it's needed, and how they all fit together. For example, http://www.osgeo.org/ and http://freegis.org/ both list a bunch of products but don't give enough information for me to decide which ones are relevant. In ArcGIS, I would use the following:   * **file geodatabase** or **ArcSDE geodatabase** for data storage   * **ArcMap desktop** to edit the data and compile the map document   * **ArcGIS Server** to create web services   * **ArcGIS Server JavaScript API** to create the end-user maps from the web services What are the equivalent FOSS products?


How to deal with Roundabouts in PgRouting

Can anybody guide me to to deal with roundabouts in pgrouting?? I have some roundabouts in my road network and when i try to make route from one point to another, it gives me wrong direction where it finds the shortest path because length on road is my cost. In the picture below, blue cross is my starting point and other side is mt destination. ![enter image description here](http://i.stack.imgur.com/nbGkW.png) I am using simple pgr_dijkstra function and i am not considering any direction. boolean parameter for direction is set false. And there is no information about direction in my data. I just want to know what should I do if I want correct routing on my roundabouts. thanks in advance


How to serve a geotiff file using WMS?

I want to display a GeoTIFF file which is a air pollution map by use of WMS. This GeoTIFF file is an output of WPS. The following is my .map file and the URL request and the output. I use MapServer for windows.               MAP     NAME PM10     IMAGECOLOR 255 255 255      SIZE 600 800      IMAGETYPE PNG24 ## use AGG to for anti-aliassing      OUTPUTFORMAT       NAME 'AGG'       DRIVER AGG/PNG       MIMETYPE "image/png"       IMAGEMODE RGB       EXTENSION "png"      END # outputformat       PROJECTION      "init=epsg:3035" #latlon on etrs 1989 laea       END       EXTENT 3487500 2297500 4402500 3202500 # meters extents of region2       WEB       IMAGEPATH "c:/tmp/ms_tmp/"      IMAGEURL "/ms_tmp/"       METADATA      "ows_enable_request"   "*"       "map" "C:/ms4w/apps/airpollution/config.map"         "ows_schemas_location" "http://schemas.opengeospatial.net"      "ows_title" "Sample WMS"      "ows_enable_request"   "*"      "ows_onlineresource" "http://localhost:7070/cgi-bin/mapserv.exe?   map=C:/ms4w/apps/airpollution/config.map&"                     "ows_srs" "EPSG:3035 " #latlon            "wms_feature_info_mime_type" "text/plain"      "wms_feature_info_mime_type" "text/html"      " wms_server_version" "1.1.1"     "wms_formatlist" "image/png,image/gif,image/jpeg, image/geotiff"     "wms_format" "image/png"      END #metadata      END #web      LAYER     NAME "pm10"     DATA "pm10.tif"     TYPE RASTER     STATUS ON     METADATA      "ows_title" "pollution"       END #metadata       PROJECTION      "init=epsg:3035"      END #projection      END #layer pm10      END #map      I want the output format to be PNG. This is the URL request I am trying:               http://localhost:7070/cgi-bin/mapserv.exe?map=C:/ms4w/apps/airpollution/config.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=pm10&STYLE=&SRS=EPSG:3035&BBOX=97,5,106,21&WIDTH=600&HEIGHT=800&FORMAT=image/png      what I get as a response is an empty white image. What I want is an map like image which different values pixels displayed with different colors. I did the same thing by opening the same GeoTIFF file in arcmap. I know that I have to classify the raster file by use of SLD. but I get error there that "Could not open SLD sld/sld.xml and save it in temporary file " I want to be sure that the GeoTIFF file is accepted as an input data. The reason that I think it is not accepted is that when I change the name of GeoTIFF file to something else in .map file I still get the same output (white colored image).


Difference between Geostatistical Analyst and Spatial Analyst toolboxes for interpolation?

I did interpolation on point data using "Geostatistical Analyst" tool. It gives me surface layer. Then I exported this layer into raster image (by right click on this layer=>export data into raster) for convenience of raster calculation. But few minutes ago I found another approach on internet to create raster image from point data. That is to use "Spatial Analyst tool". So I'd like to ask there is any difference with output of further calculation between the two raster images created from 2 difference interpolation approach in ArcGIS for Desktop.


ArcObject 10.1 Java : Raster Analysis

I have been working with ArcObjects Java for a short time and have not been able to find a solution to the following problems: **How to get the Raster object from a IRaster reference?**               IRaster raster = rasterDataset.createDefaultRaster()          Raster rs = (Raster)raster      This gives classcastexception: _com.esri.arcgis.geodatabase.IRasterProxy cannot be cast to com.esri.arcgis.datasourcesraster.Raster_ I have been unable to find the documentation of IRasterProxy. Apparently it is deprecated!! **How to over write pixel values of an existing raster and store it permanently?** I am following this example but to no avail. I can see the pixel array is altered but when I open the raster in ArcMap I see no change. **How to get Raster Info?**               RasterDataset streamOrderRas = (RasterDataset)streamOrderRaster          Raster raster = new Raster()          raster.appendBands(streamOrderRas)          IRasterInfo rasterInfo = raster.getRasterInfo()      I get AutomationException: _No such interface supported, stacktrace shows it goes inside com.esri.arcgis.datasourcesraster.Raster.getRasterInfo()_ Please forgive if the questions appear stupid. If some one can show some working examples of the above problems, i'd be very grateful.


Can I create a 3D model in QGIS or is there some model for 3D city model?

Can I create a 3D model in QGIS or is there some model for 3D city models? I need these information for my project.


tools for sorting/filtering based on map state

Im about to embark on a project that list restaurants on a map. Id be grateful to find out what the best tools for the job are? The restaurants will be in a list beneath a map. The list will be refreshed based on the map zooming. The map will also have selectable/hoverable bounding boxes, so the user can select a location (london) and then drill down on the location to get neighbourhoods/boroughs in that area (westminster, clapham etc) Im looking at the following tools for the job - Gisgraphy (for data), Openstreemap (for maps and data) and leafletjs (for the boxes). Ive looked into geoserver but this seems to be something I cant host locally. Is there anything Im missing, or are there any better tools to achieve this? Also are there any examples I could look at where this has been done already? Cheers Ke


Esri Query Task service does not display

I am trying to make my way through some ArcGIS server Javascript API tutorials. My current issue is that when I try to display an Esri.Map, all I see is the "powered by esri" logo in the bottom right. My init is below as is my mapDiv.               function init () {              map = new esri.Map("mapDiv",{           basemap: "hybrid",           center: [-80.94, 33.646],           zoom: 8         });              //Create your query         var queryTask = new esri.tasks.QueryTask("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSFields/MapServer/0");         //set the onComplete event handler, in this case, when the query is complete, call initLineID,         //production code would handle handle the error callback as well         dojo.connect(queryTask, "onComplete", initLineID);              //build and execute your query         var query = new esri.tasks.Query();         query.outFields = ["field_name"];         query.text = "all";         query.returnGeometry = true;         queryTask.execute(query);          }

      Any reason why this would not be working?


Why does Field Calculator say failure during processing, check geoprocessing results window for details?

I am using the Field Calculator and keep receiving the following error: 'There was a failure during processing, check the geoprocessing results window for details'. I am not very tech-savvy but I have tried a few simple fixes and still have had no luck. It's only a simple division equation so i'm confused. My equation is [Sum_NO_OF_] / [KM2AREA]


Calculate field based on most frequently occuring text/value in other fields in attribute table (ArcGIS)

I was wondering if anyone knows if it is possible to calculate a field based on the most frequently occurring value in other fields. What I have is 5 fields with crop information over 5 consecutive years. What I want is to create a new field with the most frequently occurring crop over that 5 year period. So for example if there were fields for Crop 2008, Crop 2009, Crop 2010, Crop 2011 and Crop 2012 with respective crop types for the first polygon as Winter Wheat, Spring Barley, Winter Barley, Winter Wheat and Grass the function would return Winter Wheat because it appears twice. I am aware there is a function called Counter in the Collections package that can do this for a list but I'm unsure how this would work within the arcpy field calculation tool? Likewise there also needs to be a consideration for values that tie i.e. appear the same amount of times across the 5 fields. I can't seem to find anything else from my searching about. I'm using ArcGIS 10 and hoping to calculate fields in the python window. Apologies for not providing any attempts at coding this so far, I really am stumped on this one!


MapQuest License

I read the license of Geodata provider (facebook, foursquare...) but I don't understand what it means: > LICENSE FROM YOU TO MAPQUEST. If you **upload** any data, feedback, ideas, > suggestions, content, points of interest (including any points of interest > that include Trademarks) or other material to MapQuest (collectively “Your > Content”), you **hereby grant MapQuest a perpetual, worldwide, non- > exclusive, royalty-free license to access, archive, reproduce, publicly > display, translate, modify** the format or the display of, distribute, > transmit, stream, cache, overlay, seam, perform, sublicense, and otherwise > use Your Content with or without attribution and without financial > obligation, in whole or in part, via any method for any purpose. MapQuest > makes no assertion of ownership over Your Content, and you retain all > intellectual property rights to Your Content, subject to the license you > grant to MapQuest above. For example, I would like to use their data and load it into my geodatabase. Is that allowed?


How to join averaged precipitation values to each municipality

I have precipitation data that I would like to average over each municipal unit in a boundary layer. First, how do I average the rainfall spatially by each administrative unit? Second, the rainfall values are not unique to each administrative unit, and so I am not sure how to join them to the attributes table of the admin boundary layer. Although they will be unique once they are averaged, in the sense that there is one averaged value per administrative unit. If this is true, which variable do I merge on? Do I need to create something new? I am using the end result (an average rainfall value for each municipal unit) in STATA, hence the need to export the attribute table. The program I'm using is ArcMap. I did something like this years ago but cannot remember...any help would be greatly appreciated!


Sync tables option not available in local install of CartoDB

I've got a production version of Cartodb running locally, but when I try and create a table based on a spreadsheet hosted on dropbox I dont get the option to keep the data in sync, instead I get upgrade your account. What do I need to do to resolve this? Thanks


Putting multiple lines of Python into ArcGIS 10's Field Calculator

I've gotten some incredibly valuable help here on this already, much Thanks. Entering these lines of Python one at a time works like a charm.... Just need one more seemingly simply issue solved... How do we place **multiple** lines of Python code into ArcGIS's Field Calculator without producing **Error 000539 or syntax error**? I've tried several different syntaxes with colons and various spacings / returns .... screen shot: ![enter image description here](http://i.stack.imgur.com/lY7RA.jpg) multiple lines of Python code here:               '1201-LT 210A' if !sc2! in (12013,11999,11998,12016,12015,12004,12012,12011,12001,12002,11997,12017,12009,12003) else !March_Proj!          '1201-LT 210B' if !sc2! in (12074,12076,12078,12072) else !March_Proj!          '1201-BO' if !sc2! in (20052,20053,20044,20045,20039,20050,20051,24157,24158,22927,24783,24785,24784,24782,24035,22924,23923,24154,22528,21912,23164) else !March_Proj!          '1202-LT 21F' if !sc2! in (1067,1066,1078,1060,1052,1075,1068,1051,1079,1062,1070,,1071) else !March_Proj!


Which projection casts rays from a point on the surface of the globe to a cylinder?

What is the name of a map projection that casts rays from a point on the surface of the globe to a cylinder? Some people who make sundials put a map of Earth on the sundial. I want to use the "right" map projection such that, when the nodus casts a shadow on a particular city on the map, the sun is directly overhead that city on the real Earth. If the sundial is in the form of (part of) a cylinder, and the nodus fixed to a point on the axis of the cylinder, then such a map uses the cylindric perspective projection. If the sundial is entirely composed of flat surfaces, then such a map uses a gnomonic projection on each surface. A few sundials are in the form of (part of) a cylinder, and the nodus is a small notch or hole in the curved surface of the cylinder. Carl Sabanski calls this a "Cylinder Sundial: Type 1". Is there a name for the kind of map projection I want to use in this sundial? In the form of an analogy question: gnomonic projection : azimuthal conformal projection :: cylindric perspective projection : ___ _? **Edit:** Oops. My description seems to be a mishmash of 2 different projections. For lack of better names, for now I'm going to call them the "point-on-globe-in-cylinder projection" and the "Type 1 cylinder sundial projection". I hope that I will soon learn some other, less awkward name for each projection. After posting the original question, I realized that the "point-on-globe-in- cylinder projection" is _not_ the one I want to put on my "Type 1 cylinder sundial". The "point-on-globe-in-cylinder projection" involves a globe inscribed in a cylinder, where both of them have radius R, like most cylindrical projections. Like the azimuthal conformal projection, there is very low distortion around one special center point on the map. Like the azimuthal conformal projection, rays start at the antipode of that center point, then hit some city on that globe, travel a bit further and hit the paper where that city is mapped. Like most cylindrical projections, since the globe touches a circumference of the cylinder along some great circle, the map is pretty accurate at points near that great circle. With a very long cylinder, almost all the globe can be mapped. The "Type 1 cylinder sundial projection" is the projection I want to place on my "Type 1 cylinder sundial". The globe has radius R, while the cylinder has radius R/2. The globe is positioned so the geometric center of the earth is at the nodus hole on the surface of the cylinder. The point on the surface of the cylinder diametrically opposite the nodus is a special central point. The surface of the cylinder is tangent to the surface of the globe (only) at that central point. Along the straight line from that central point along the length of the cylinder, it's approximately a gnomonic projection -- rays start from the center of the globe, then hit a city on the globe, then travel a bit further and hit the paper where that city is mapped. Along the circumference from that central point around the cylinder to the nodus hole, rays start from the center of the globe, then hit the paper cylinder where a city is mapped, and then hit that city on the globe. With a very long cylinder, almost half the globe can be mapped, the hemisphere around the central point. Since there is a small hole punched in the surface of the cylinder to form the nodus, rays from the center of the nodus to the antipode of the central point (and the hemisphere around that antipode) never strike the cylinder, and so are not mapped anywhere on the cylinder. Is there a better name for what I'm calling the "point-on-globe-in-cylinder projection"? Is there a better name for what I'm calling the "Type 1 cylinder sundial projection"? Should I split this question up into 2 different questions, each one asking about 1 of these 2 projections?


VBA script for Incremental labeling in Field Calculator?

I have a shape file with a bunch of pipes in it. I would like to be able to label each pipe with "Pipe - X". X being the number in the row that the pipe falls on (Pipe - 1, Pipe - 2, Pipe - 3, etc). I've tried using a for loop VBA Script for this but it doesn't work. The VBA script is as follows: For counter = 1 To 192 Y = "Pipe - " & counter Next counter Pipe_ID = Y My result is "Pipe - 192" Any Ideas?


How can I specify a PROJ.4 projection with the north pointing *down*?

I would like to create a world map "upside down", with the south on top (in Mapnik). Can I take an existing projection string, e.g. Robinson projection               +proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs      and flip/mirror it so the north points down?


How to use any ArcMap tool from a python script?

I'm trying to develop a tool that uses some of arcmap default tools like the `Sketch Tool` or `Trace Tool`. Is it possible? Let me explain a little more, I need to draw a feature, ask for user input, and save the feature + data to the shape file, can it be done using python?


Is it possible to save PostGIS connection string in OGR add-in to QGIS?

In QGIS I've saved a couple of PostGIS connections for adding data. This works fine. I've been unable to save the connections in the OGR layer converter add- in though. Has anyone found a way to do this so I don't have to type it every time?


Creating Raster with values based on function output

I have a function that calculates a price based on the input slope and distance. I want to write the price to a raster as the rastervalue. How do I do that? OpenSource and ArcMap solutions would work.               slopeRaster = "slope.tif"     emptyRaster = "emptyraster.tif" # How do I create an empty raster?     road = "road.shp"          for cell in emptyraster:         # get slope from sloperaster at cell location         ...         slope = ...              # get distance to nearest road from center of cell         ...         distance = ...              # calculate price for cell         price = pricefunc(slope, distance)              # write price to cell as value  # How do I write a value to a raster


Is there a way to populate a spreadsheet of city names with their latitudes and longitudes from Google Maps or some other service?

I have a long list of cities in the United States, and would like to get the coordinates for each city without looking up each one individually. Is there a way to do this?


ArcObjects diagram/object model?

Is there an existing object model diagram for ArcObjects? Something that can be printed out as a large poster.


Where is Web Applications in ArcGIS server 10.1?

I'm new in using ArcGIS server 10.1 . I used ArcGIS server 9.3,9.3.1 and 10 several years.now i want to use ArcGIS server 10.1.When I install ArcGIS server 10.1, I coudln't find Web Applications tab like ArcGIS 10 or later . In ArcGIS server 10 web applications and web services installed separately but In ArcGIS server 10.1 i just setup "ArcGIS For Server". I could create services but not Web Applications.The questions are that Where is Web Appications in ArcGIS server 10.1 ? How can i create a web application in ArcGIS 10.1 using wizard ? Thanks for Advance


Best way for rendering geotools in web service

I'm using geotools in my web service project. I always thought geotools is somehow compatible with openlayers, but now when it actually came to implementing this functionality, i can't find even one example. Any other ideas, tools to do it? I've read that geoserver is using openlayers with geotools, but as i said i can't find any example,documentation.


Loading custom dojo and Esri

We have to develop an application which will have lot of rich ui along with a map. For the map, I am using the arcgis javascript api which includes dojo. For UI components other than the map, I want to use a copy of dojo which I will host locally. How can I load both of these? I read this blog esri dojo, but this works with api 1.6, and I am using 3.6.


Access to SpatiaLite .dumpshp via Python?

I'm trying to interact with a SpatiaLite database via Python on my Windows machine. I've managed to connect to the database and load the SpatiaLite extension, which means that I can pass SQL queries in from my Python code e.g:               from pysqlite2 import dbapi2 as sqlite     myPath = r"C:\SpatiaLite\test-2.3.sqlite"     conn = sqlite.connect(myPath)     conn.enable_load_extension(True)     curs = conn.cursor()     curs.execute("select load_extension('libspatialite-1.dll')")         curs.execute("""SELECT name, peoples, AsText(Geometry) from Towns where                     peoples > 350000 order by peoples DESC""")     # Print the selected records     for row in curs:         print row      So far so good. I'd now like to know how to export a table as a shapefile. Using the command prompt in spatialite.exe I can do this using `.dumpshp`, but I can't figure out how to access this command from Python. Any ideas, please? I was hoping for something like this:               curs.execute("select dumpshp('Towns Geometry shape_towns CP1252 POINT')")      but perhaps it's more complicated than that? Thanks very much!


Add Raster To Mosaic Dataset: Could not recommend a data source crawler for the specified input

I'm trying to add rasters (TIFF) to a Mosaic Dataset after adding some rasters, the process fails with the message. ERROR 999999: Error executing function Could not recommend a data source crawler for the the specified input. The data source might be unnavigable or unrecognised. Failed to execute (AddRastersToMosaicDataset) What does this message mean and how do I fix the problem? I can't find anything different about the TIFF which failed compared with any other. I am using ArcCatalog 10.1 on Windows 10.1 x64 with the 64-Bit Geoprocessing.


Point Cluster Layer not defined

I am trying to do a point cluster layer based on the JSON objects I obtained from database. Here is my JavaScript to plot a point cluster layer:               function addClusters() {     $.ajax({         url: "index.aspx/getBusCommuter",         type: "POST",         data: "",         contentType: "application/json; charset=utf-8",         dataType: "json",         success: function (data) {             var parsed = JSON.parse(data.d);             $.each(parsed, function (i, jsondata) {                 var coordXicon = jsondata.BusStopX;                 var coordYicon = jsondata.BusStopY;                 var commuterAmt = jsondata.CommuterAmt;                      var latlng = new esri.geometry.Point({ "x": coordXicon, "y": coordYicon, "spatialReference": { "wkid": 4326 } });                      // cluster layer that uses OpenLayers style clustering                 clusterLayer = new ClusterLayer({                     "data": commuterAmt,                     "distance": 100,                     "id": "clusters",                     "labelColor": "#fff",                     "labelOffset": 10,                     "resolution": map.extent.getWidth() / map.width,                     "singleColor": "#888"                 });                 var defaultSym = new SimpleMarkerSymbol().setSize(4);                 var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");                      var picBaseUrl = "http://static.arcgis.com/images/Symbols/Shapes/";                 var blue = new PictureMarkerSymbol(picBaseUrl + "BluePin1LargeB.png", 32, 32).setOffset(0, 15);                 var green = new PictureMarkerSymbol(picBaseUrl + "GreenPin1LargeB.png", 64, 64).setOffset(0, 15);                 var red = new PictureMarkerSymbol(picBaseUrl + "RedPin1LargeB.png", 72, 72).setOffset(0, 15);                 renderer.addBreak(0, 2, blue);                 renderer.addBreak(2, 200, green);                 renderer.addBreak(200, 1001, red);                      clusterLayer.setRenderer(renderer);                 map.addLayer(clusterLayer);             });         },         error: function (request, state, errors) {         }     });     }      However, when I try to run it, it told me an error message which is clusterLayer is not defined. I wonder which part I missed and am I doing in the correct way. Also, I wonder is it possible/correct to set the commuterAmt I obtained to data so that for each point on the map will be attached with the correct amount? I get the reference from: ArcGIS Documentation Thanks in advance.


How to save currently opened mxd and changes using ArcPy and Python?

Here is what I have so far...               import arcpy          import arcpy.mapping as map          mxd = map.MapDocument()          mxd.save()      And yes I know that map.MapDocument requires an argument, but I want it to automatically select the currently open mxd, and overwrite it. If I can't get it to select the currently open mxd I can use:               > import arcpy     >      > import arcpy.mapping as map     >      > mxd = map.MapDocument(C:\GIS\Untitled.mxd)     >      > mxd.save()      But I would still like it to overwrite the mxd with the changes I just made to it in arcmap. Think of it like the save button except scripted. Any help is greatly appreciated.


Raster format to read with python

I currently have a DEM raster stored in an ESRI geodatabase. I've been asked to create a purely python (e.g., no arcpy functions) program that works with the values. Therefore, I need to convert the raster into something that can be read by python as an array. What file format would that be? (Alternatively, is this a terrible idea and should I argue for sticking with arcpy functions?)


ST_MakeEnvelope returning too many geos

I am using the following query in my db:               SELECT bg_id, ST_AsGeoJSON(the_geom)     FROM bg     WHERE bg.the_geom && ST_MakeEnvelope(xxx, xxx, xxx, xxx);      It seems to execute alright but when I draw out the geos on my map (I'm using Leaflet for this) it includes a bunch of geos that are not within the bounds I provided. For a little more detail as to what exactly I'm trying to accomplish... I have a map on a webpage. As the user navigates throughout the map the bounds of the map are sent back to the db and then the db should send back geos for only what is within the current view. This seems to only be working if the map is zoomed in very close. If I zoom out at all it begins to include lots of geos that I am not looking for. I would only like to include geos that are ENTIRELY within the view. Thanks.


Help with Python and adding a grouplayer to arc, renaming it from a folder name, then adding layers to it from that folder

I am trying to use os.walk to go through a directory tree, pull out all the .shp files in it, create a grouplayer in the mxd, rename the grouplayer the folder name, then add the layers from that folder to the group. This is because I have a lot of folders with files in them that represent geologic formation and they don't mean anything once seperated from the name of the formation. From what I read you can't just add a blank group layer in an mxd from python without first creating a blank one and adding that. The problem starts at the for group_name in rename_group_layer loop. It doesn't even make it through to the print group_name test. Basically it just falls out of the loop from what I can tell. Then I need to figure out how to add the layers from the folder into the renamed group layer. I have two lines commented out that I think are a start, but I haven't gotten it to go through the renaming loop yet. It will rename the first "New Group Layer" if I put that line above the loop to the correct folder name. I am pretty new to python so any help you can give would be greatly appreciated. Thanks in advance.               import os     import arcpy          # Set workspace environment to a folder     WS = r'c:\test_define\Appalachian Basin'     arcpy.env.workspace = WS          mxd = arcpy.mapping.MapDocument(r"c:\test_define\test_python_add3.mxd")     df = arcpy.mapping.ListDataFrames(mxd, "layers")[0]          print ("#") *80     for (path, dirs, files) in os.walk(WS):         for name in files:             if name.endswith(".shp"):             print path                print "^^^^^^^^^^^^^^^^^^ path variable"                      try:                     layers = arcpy.mapping.ListLayers(mxd)                     for layer in layers:                         if layer.isGroupLayer and layer.name == os.path.basename(path):                             newLayer = arcpy.mapping.Layer(os.path.join(path, name))                             arcpy.mapping.AddLayerToGroup(df, layer, newLayer, "BOTTOM")                         else:                             groupLayer =                       arcpy.mapping.Layer(r"c:\test_define\empty_group_layer.lyr")                               arcpy.mapping.AddLayer(df, groupLayer, "BOTTOM")                                  layers = arcpy.mapping.ListLayers(mxd)                             for layer in layers:                                 if layer.isGroupLayer and layer.name == "New Group Layer":                                     layer.name = os.path.basename(path)                                  newLayer = arcpy.mapping.Layer(os.path.join(path, name))                             arcpy.mapping.AddLayerToGroup(df, layer, newLayer, "BOTTOM")          #mxd.save()               # print messages when the tool runs successfully                 print(arcpy.GetMessages(0))                 #print ("+") *50             except arcpy.ExecuteError:                 print(arcpy.GetMessages(2))                  except Exception as ex:                 print(ex.args[0])      mxd.saveACopy(r"c:\test_define\test.mxd")


How to develop a web mapping app to upload, process, and download results?

I would like to make a web mapping application where a user can import their own x-y-z data file, then the application applies filters that I write to it, contours the resulting data, then displays the results and exports to common GIS formats. I have medium-level web programming skills (PHP, MySQL, etc.). My question is this: what tools would be the best way to get my end product? Would something like MapScript work? Or do any commercial solutions come to mind? Thanks for any suggestions anyone might have.


Why is my simple arcpy script failing? (sets raster cell value to null if below threshold value, ArcGIS 10.1)

As mentioned in the title, simple script to set null cell values below three standard deviations beyond the mean:               import arcpy, sys, os          #Accept input and output raster     inRas = sys.argv[1]     outRas = sys.argv[2]          #Pull mean and standard deviation from input raster     meanie = arcpy.GetRasterProperties_management(inRas, "MEAN")     meanres = meanie.getOutput(0)     meanfloat = float(meanres)          stdev = arcpy.GetRasterProperties_management(inRas, "STD")     stdres = stdev.getOutput(0)     stdfloat = float(stdres)          #Calculate threshold value     threshold = meanfloat + (3 * stdfloat)     threstring = str(threshold)          #Create where clause     whereClause = "VALUE < " + threstring          #Test output     arcpy.AddMessage (whereClause)          #Run SetNull     outRas = arcpy.SetNull(inRas, inRas, whereClause)      This results in the following error:               Traceback (most recent call last):     File       "Z:<directory-redacted>\Nullify.py", line 27, in <module>     outRas = arcpy.SetNull(inRas, inRas, whereClause)     AttributeError: 'module' object has no attribute 'SetNull'          Failed to execute (Nullifiy).      If anyone has any ideas, I'd really appreciate the help, thanks so much. -Alex


How to update a value in an ArcSde table using ArcMap's VBA

First of all, I want to update a table, not a feature class (no geographical information). I tried the following               Public Sub updateInSql(tableName As String, whereClause As String, field As String, value As String)              ' get table         Dim pTable As ITable: Set pTable = getTableFromSQL(tableName) ' this is my function that gets the table object (it works for sure)         If (pTable Is Nothing) Then Exit Sub              Dim pQueryFilter As IQueryFilter: Set pQueryFilter = New QueryFilter         pQueryFilter.whereClause = whereClause         If (whereClause = "") Then Set pQueryFilter = Nothing              Dim pCursor As ICursor: Set pCursor = pTable.Update(pQueryFilter, False)         Dim pRow As IRow: Set pRow = pCursor.NextRow         Do Until pRow Is Nothing             pRow.value(pRow.fields.FindField(field)) = value             pRow.Store             Set pRow = pCursor.NextRow         Loop          End Sub      I get "Automation Error" at "Set pCursor = pTable.Update(pQueryFilter, False)" Why?


Need to get the ArcGIS Runtime SDK for WPF Routing example to work with my gpk and mpk

I went through the following two examples to get an idea of how to create a custom, local Routing Task This is a walkthrough that takes you step by step through the creation of your first routing geoprocessing package: http://resources.arcgis.com/en/help/runtime- wpf/concepts/index.html#/How_to_author_and_publish_a_geoprocessing_model/0170000000m5000000/. And here is the second part, that completes the picture and shows you how to run it from code: http://resources.arcgis.com/en/help/runtime- wpf/concepts/index.html#/How_to_develop_a_point_to_point_routing_application/0170000000m6000000/ I was able to get it to run using my map package that I created (with my own vector data). However, when it runs and I click the "Solve" button, I can only get the Route graphic to display, that was displayed when I created the gpk from the result. The two points that I click on when running the code are obviously not used by the code to create the resulting Route graphic. I don’t know what I’m doing wrong with this example. Aren’t you supposed to be able to use a gpk file to (in a sense) run that same model, but with different data each time? Thanks, Renee


Defining OID causes Query Layer on PostGIS to disappear from ArcMap?

I used query layer to load my layer from PostGIS and show it in ArcMap 10, I had two cases;   1. if I defined the OID in the configuration of connection, there was no problem with the attribute table of the layer but my layer disappeared from the map.   2. if I didn't define the OID, then the layer appeared in the map but when I try to open the attribute table of my layers the following error message occurs:  > Error reading OID form table. Reading rows has been stopped. Check that the > datasource is valid. OID mapped column has null value ... in the table was empty.


Calculate polygon field based on neigboring polygon attribute

I have a vector shape with many different sized polygons each possessing an own class name (for instance "houses", "houses with offices", etc ...) I want to assign a new field to each polygon containing the name of the majority (higher proportion) of adjacent polygons attribute name. Ergo some kind of **polygon neighborhood analysis**. ![enter image description here](http://i.stack.imgur.com/5QtlW.jpg) The query should look to the attribute of each bordering polygon and change another fields value to the name which occurs the most. For instance the beige polygon in the middle of the above image is surrounded by polygons with the attribute "houses" and therefore it should get the attribute "houses". (Best would be if i can somehow display and save the proportion of different attributed polygons). * * * Does anyone have an idea or a tool how to accomplish this task? I am thankful for every partial or full solution. Any good way to solve this problem is appreciated! I intend to use QGIS, but i can also switch to other tools (Arcgis 9, Grass, Saga, R, ...)


OpenLayers.Layer.XYZ keep previous tile if zoom with no tile

I've god an OpenLayer web with a custom XYZ layer which downloads tiles from the server itself:               OpenLayers.Layer.MOBAC_OSMDROID_ZIP = OpenLayers.Class(               OpenLayers.Layer.XYZ, {                   name: "tiles base",                   transitionEffect: "resize",                   sphericalMercator: true,                   url: '../map/${z}/${x}/${y}.png',                   [...]               });      The funny thing here is that I can use MOBAC to download selected parts of OpenStreetMap and serve them from my website. So far, so good. The problem is: obviously I do not want to download the whole world from OpenStreetMap, but only, for example, zoom levels 0 & 1 for the world, 2-4 for Europe, 5-7 for Spain and so on. Then, when I am zomming in to Spain I get the right tiles. But if I move outside Spain, I just get the damn pink "no-tile" image. I can easily remove such no-image with the .olImageLoadError CSS class... but it still does not show a map. What I would like is: if there is no tile, use the previous tile, scaled. This way you will probably have an overview of where you are when there are no specific tiles for such level. Any idea? Is something like this included in OpenLayers? Any idea to implemente it myself? Since the "resize" effect does not remove the old tiles for a while, maybe keeping them "forever" would work...


Do daytime Road Traffic Accidents (RTAs) have same spatial pattern as those of night?

With the following set of recorded data:   1. Location of Road Traffic Accident (RTA) along 160km Expressway   2. Date of accident   3. Time of occurrence   4. Causes of the accident etc What spatial analysis tool in ArcGIS 10.1 can be used to show whether the RTA occurred during the day and night have the same spatial pattern or not? i.e in terms of cluster or being dispersed.


How to bring georeferenced raster data into MAPublisher?

What is the appropriate method to import a georeferenced raster image into MAPublisher? I have been able to import other forms of map data, and created map views and such for them, but I am now interested in importing a raster image with spatial data and retain that data within MAPublisher. Do I need to have some sort of GIS data in the document before I can import the georeferenced raster image? Or is it possible to bring it in on it's own?


What are the advantages of using Rails for a GIS/mapping application?

I've heard some good things about Rails, but I don't know much about it yet. There are only a few questions about Rails on GIS.SE (and there's not even a Rails tag).   1. Is it worthwhile to learn about Rails, from a GIS professional's perspective? (eg, what advantages does Rails give when building a website containing GIS functionality, compared to not using Rails?)   2. Are there any examples of good GIS/mapping websites built on Rails? (I don't have any specific requirements in mind yet - I just want to know whether to invest time in learning Rails.) Thanks.


How can I share my own spatial data on an online map?

Note: I am very new in this field! Can I find an open source map that enables me to display an overlay of my own layers? I need to add some text and rectangles for a certain area, but my modification must be on the tile level (500 mt height as example)? I have a big work area; I need to make a new layer that determines every engineer’s works area, to be shown for my customer. I need to provide him an interactive map, that when he zoom in the area, he will find the details when he reach 500 meter height, I need to r3epeat this method for more than one area in UAE country, and this is the reason why I need it to be an interactive map. Example: This is UAE country map: ![enter image description here](http://i.stack.imgur.com/CVjHF.jpg) This is Abu Dhabu emirates map: ![enter image description here](http://i.stack.imgur.com/dUlnK.jpg) This is area map: ![enter image description here](http://i.stack.imgur.com/cJWAm.jpg) I need to put an overlay on them (from the source data of the rectangles and text, which I included in the question), And I need to show them in web tool or any easiest way.


How to extracting raster data to multiple polygons?

I have a reclassified raster dataset (10 classes) and I want to find out the area of each class contained within multiple (hundreds-to-thousands) polygons. I have all the polygons in the same shapefile and have used 'Extract by Mask' which has given me the raster for all the polygons, but now I want to do this for each individual polygon. I have been selecting each polygon individually and running 'Extract by Mask' which is working but will obviously take forever with 1000's of polygons.


Transform all pixels from one projection to another projection under the Matplotlib Basemap

Is there a way to transform all pixels from one projection to another projection under the Matplotlib Basemap?


If conditional for multiple raster

I have 12 raster on NDVI. I want to use if conditional statement. Something like this :               Con ("raster1"=="raster2"=="raster3"=="raster4"=="raster5"=="raster6"=="raster7"=="raster8"=="raster9"=="raster10"=="raster11"=="raster12","raster1",255)      In that statement, I use raster calculator. But, it is error. Does anyone know how to perform this in ArcGIS?


QGIS - identifying polygons and distances along the edges of a superset

I have two layers of polygons. layer A is a superset of dissolved polygons from my other layer, B. Using QGIS, how can I determine polygons in B, that lie along the edges of A? There would be some polygons that entirely in the central, but I'm not interested in those.


GeoServer LDAP Authentication 'Test Connection' succeeds, but login fails

I am attempting to use Active Directory for GeoServer authentication. When I click the 'Test Connection' button on the Admin > Authentication > Providers > LDAP settings page, it says "Connection Successful." However, when I log out of Geoserver, and try to log in with the same credentials, I get an "invalid username/password combination" error. My LDAP settings are as follows, where `ADserver`=my Active Directory server, and `domain`=my company domain: Server URL: `ldap://ADserver/dc=domain,dc=com`   TLS: `[Not checked]`   User lookup pattern: `[empty]`   Filter used to lookup user: `(userPrincipalName={0})`   Format used for user login name: `{0}@domain.com`   Use LDAP groups for authorization: `[Not checked]`   User Group Service: `default` And I have selected this Authentication Provider in my Provider Chain. Why does the Test Connection succeed, but actually logging in fails?


How to use ogr2ogr to remove features from a shapefile using sql statements (Unable to open datasource `action/North' with the following drivers.)

OK, I've spent the obligatory 15-25 minutes on this and haven't gotten anywhere so, here's the command I'm trying to get to work right now:               ogr2ogr -f "ESRI Shapefile" -where "area > 4000" ./filename_w_area_tight.shp filename_w_area.shp      Which is getting this error:               Unable to open datasource `action/North' with the following drivers.     -> ESRI Shapefile     -> MapInfo File     etc      The error is probably some stupid syntactical thing but the general question is how to use ogr2ogr to "prune" a shapefile based on negative selection criteria. I could of course just as easily use `<` and do it the other way. Whatever works is fine. Generally what I'm trying to do is sieve out tiny speck polygons coming in as artifacts from a raster polygonization process. The step prior to this I've added the area column like so:               ogr2ogr filename_w_area.shp input.shp -sql "SELECT *, OGR_GEOM_AREA AS area FROM input”      which works well. The automation here seems appealing because this is a fairly repetitive process and using qgis takes a lot of time and doesn't allow for multiple processes at one time which is what drove me to this ultimately. I'm currently in the process of building a script to automate in ruby. This is currently the last step. Thanks


Discontinuous or Interrupted map projections?

Do any of the current open source GIS softwares support discontinous projection systems? E.g. sinusoidal, dymaxion, butterfly, etc? If not, are there any affordable commercial ones that do (affordable meaning < $150)? **Upate:** apparently it was a bad idea to lead with "sinusoidal", as that projection also has a single point non-interrupted form. Please note, the key word here is **discontinuous** or **interrupted**. Thanks. ![Cahill's 1909 butterfly map](http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Cahill_Butterfly_Map.jpg/220px- Cahill_Butterfly_Map.jpg)


Draw lines from points

Please any body help me for creating lines from points in electric network for instance electric poles are there in point feature with "polename" field like "P01", "P02", "P03" etc. I need a tool that create lines on Target (Feature Class) from P01 to P02 then P02 to P03 in continue.


How to change default projection in ArcPad 10?

Is there a way to set a default projection in ArcPad 10? The only way I can tell is by creating a quickProject based on a project that contains a shapefile with the same projection, but that's just ridiculous.


How can i search over my layers with openlayers?

i have my map running over geoserver and openlayers. but i want to add a search box to find places in it. Well not specifically places but directions. The map reads the layers directly over geoserver ( without postgis) but i'm a bit lost with the search thing. How can i implement this feature and what tools are appropriated for it? Now i will explain how the searching process must be: 1.- I have layers with streets, blocks and house numbers. 2.- the user will search by street name or house direction (house number and street name) and the map will show a list of concordances, if the user select one result on the list it will be zoomed to the destination. Very similar to an Arcgis search tools. Any help will be appreciated.


How to toggle layer visibility in ArcObjects?

ILayer.Visible seems to have no effect - How can I manually manage layer visibility and actually get the map control to update?               ILayer lyr = mapControl.get_Layer(i);      //this works for custom layers that I define but not for Bing_Maps.lyr or ESRI .lyr files that comes with ArcEngine or connections to ArcGIS Online. For composite layers, I also tried iterating through sub layers and setting the visibility to false               lyr.Visible = false;     mapControl.Update();     mapControl.Refresh();     mapControl.ActiveView.Refresh();     mapControl.Invalidate();


How determine data type of points in geotiff DTM?

I have some DTMs in geotiff files. I need to read them in C# and I've decided to use libtiff for that purpose. After some investigations, I've found that there are tiled tiffs, so I use ReadTile method to get raw points values. The strange thing for me, newbie to GIS technologies, is that one file seems to storage point elevation values as integers, but another one - as floats (4-byte, single precision). That's the result of comparison of values got by my code and or values from *.tif.aux.xml file.   So, my question is - is there any method to determine whether geotiff file stores values as intergers either floats? There is no answer for that in geotiff specs.


Scriptable way to merge polylines that join in ArcGIS

I have a number of polylines (around 9000), a number of which have one or both ends touching another polyline. I would like to merge these ones together into one polyline - thus reducing the number of polylines and ensuring that each line represents one real-world object (rather than having multiple lines per object). I cannot find a scriptable (preferably through a Python script) way to do this. Is this possible? It would seem to me like a fairly common operation to want to do, but I can't seem to find a built-in function.


Floating Image Layer in OpenLayers

I'm making a Map Visualization which requires an overlay that shows the light/dark patterns across the planet (like this). I accomplished this by building a simple image layer that loads an image with a cosine wave shaded black on the top half (I'm not worried about seasonal adjustments yet). I can set the extent on the according to the current time to get a map that shows the light patterns in real time. However, I can't figure out how to move the Image Layer without moving the base Layer to show the light/dark overlay in the past or future. My first inclination was to use some sort of move() method, but I couldn't find it in the API. So I tried to adjust the Layer's extent on each change like this:               sunLayer({extent : new OpenLayers.Bounds(newLong, -90, newLong+360, 90)});     sunLayer.redraw();      But nothing happens. I was thinking that maybe I need to build a Vector Layer with just one Feature (the image), and then tie the dimensions of the graphic to the dimensions of the map and move the feature around, but this approach feels wrong to me. Has anyone else done something like this (where you entirely decouple an Image Layer from the base layer)?


Insert Javascript code in Popup.FramedCloud?

I would like to have a live stream from a web camera in a Popup.FramedCloud. All I need to do is to insert this code in the HTML code parameter for popup:               <script src="http://www.live-events.ro/cam-acces-privat-delay.js.php?id=13"      type="text/javascript">      From my tests this is not working. Please tell me if you tried this with success! The script is correct, you can see it in action here. I tried something more simple like "eval('a=1;alert(a)')" but with no success. I see the code in Firebug, but alert window does not appear. The alternative I think of is to use other object for the popup, an Ext JS object maybe or some kind of reach tooltip library. Thank you!


Smoothing raster features into polygon

I have raster data representing urbanized areas, which I'd like to trace and convert to a polygon. ![Raster](http://i.stack.imgur.com/53X2r.png) Using ArcMap's Raster to Polygon tool, I'm able to get something close to that. Unsimplified: ![Unsimplified](http://i.stack.imgur.com/24iOv.png) Simplified: ![Simplified](http://i.stack.imgur.com/tPIDU.png) However, you can see that there are many diagonal lines (roads) which create chains of polygons that share a corner. This ups my polygon count significantly - these raster datasets are being processed at the state level. Is there an Arc or GeoTools tool to smooth out these lines and create fewer polygons? It's okay if the result loses some precision. In the end, I'm looking for something similar to what I get with the simplified polygon, just with adjacent polygons joined.


Improve database performance for geospatial

I have a database with osm data imported with osmosis tool. I want to search for the nearest POIs from a **given point**. For this purpose, I perform this query:               select id from nodes     where geom='0101000020E6100000546C713216920DC065767176C62C4540'      After this I would like to search tags for the selected node in `node_tags` table but my problem is that the database has 31 million rows, and the query takes more than 30 seconds. I have this columns in node tables:   * `id`, `version`, `user_id`, `tstamp`, `changeset_id`, `geom` I run the following sentence to ensure index in "geom" column:               CREATE INDEX idx_nodes_geom     ON nodes USING gist (geom );      But it doesn't work. Query takes more than 30 seconds. I have the following configuration in PostgreSQL database:   * **Shared buffers** : 768 MB   * **Work_mem** : 32MB   * **maintenance_work_mem** : 256 MB   * **wal_buffers** : 2 MB   * **checkpoint_segments** : 12   * **random_page_cost** : 2.0   * **seq_page_cost** : 1.0 Any idea to improve it?


Join a table to a parcel layer and get duplicate parcels, reflecting individual leases

I have a table of 3,000+ lease files that I'm trying to join to our parcel layer. Each parcel has 4+ leases associated with it, and I need each to be represented by an actual polygon. When I do a traditional join it joins 1 to 1, so it shows 1 of the 4 leases and the others do not join at all. Is it possible to join 1 parcel to many leases and have each show up as an individual polygon? I'm using Arc 10.1. Thanks in advance, Matt


check and validate the topology relationship between 2 feature class by concurrent users

my reqirement is allow several users to edit the map and validate the topology relationship between 2 feature class. Michael mentioned in my previous questions that I can only validata a topology when all users stop editting (which not tally to my requirement).Besides using the topology tool, what else can I use to check the topology relationship between 2 feature class. Thank you!


ArcHydro: Flow Accumulation 863988034 Cells

I've been using Arc Hydro for the last 7 years to determine catchment characteristics. I'm currently setting up a new model to determine structure locations along a proposed railway alignment. This is the largest study area I've ever had to process and currently its failing when I try to generate the Flow Accumulation Grid. My Flow Direction Grid for the study area has 863 398 034 cells. I'm looking for advice in how to successfully generate my Flow Accumulation Grid. If ArcGIS can't handle such large DEM's will GRASS be able to process such a large DEM and generate a ArcGIS GRID as an output that I could use for further processing of catchment characteristics. Thanks Peter.


How to efficiently project datasets of varying coordinate systems into one coordinate system?

I am working on streamlining data processing at my organization. Currently we are using various large-scale Models that we will gradually bring into Python. The gist of our data processing is as follows:   1. Collect data from sources (State, County, City, etc.)   2. **Project all data to a common coordinate system.**   3. Perform all sorts of processes on the data. I am currently concerned with part 2. The data comes in various coordinate systems. Our previous Models would run the ArcGIS Project tool individually on each dataset that needed it. Each Project tool in the Model would be projecting to the same output coordinate system, but some may require different transformation methods (or none at all). You can imagine having about 70 different datasets whose transformation methods are each manually assigned. It's ugly in code, worse in ModelBuilder. Most importantly, it is hard-coded to those specific datasets and therefore not reusable by another collection of datasets. **Ideally, I want to be able to choose a bunch of datasets, point them to a script tool, and reliably output them all in the same coordinate system.** I thought of importing all of the datasets into an ArcGIS Feature Dataset which will project all of the data automatically, but as blah238 pointed out in my previous question, it could be unreliable since it makes a 'best guess' on the transformation methods. **Are there any better methods, or any known tricks or custom tools?** My organization is mostly in the ESRI world, but I'm open to open-source solutions as well.


Calculating radius / buffer on EPSG 3785 in meters vs buffer in WGS 84 in meters

The goal is working in **EPSG 3785** and in particular Google Maps, one wishes to render (on a tile) a circle of a given radius in meters. The rendering is done in pixels. I would guess that one could take a very simple linear approach to identify the meters per pixel for a given tile zoom: `metersPerPixel = MercWorldWidthMeters / (2 ^ zoom) / tileSize` Now, considering you wish to draw a radius of let's say 100 meters around a point in pixels, then you convert to pixels: `pixelRadius = metersRadius / metersPerPixel` This _should_ in my mind produce a circle of **metersRadius** on the tile. However, actually measuring the produced circle's radius with a circle produced in WGS 84 and Great Circle logic, it shows that it is actually about 40% smaller than expected... a big difference. Does the logic above have a flaw? Note that I am **not** interested in finding an alternative algorithm (going to Great Circle calculations and the like)... my question here is " ** _why are the results (so much) different than expected_** ". All conversions this far have been working fine with the above logic but once I decided to calculate actual distance on EPSG 3785 I seem to be hitting a break wall. * * * To give an example with figures:               Radius: 0.08 miles ( = 128.74752 meters )     MercWorldWidthMeters: 20037508.342789 * 2     Zoom: 16     TileSize: 256      Above logic suggests a circle of **~107** pixels diameter.   Great Circle suggests a circle of **~175** pixels diameter.


getSelectedExtent not working on joined layers

When joining layers the getSelectedExtent function in ArcPy fails to get the extent. Unjoining the layers and running it yeilds the expected result. The joined layers are all located on an SDE. Is this a known issue or is there something I'm missing?


Locate DTEDs from one layer that intersect a polygon in another layer

I'm new to the GIS world, and using ArcGIS 10, so please forgive me if this is a simple question. I have DTED files (level 2) that I have placed into a mosaic dataset, and I'm trying to determine which DTEDs intersect a polygon in another layer. I'm using python, and used the SelectLayerByLocation method, but am having trouble getting the results from it. I can't use the CopyFeature method (which is what's in all the examples) because it's probably returning a mosaic layer instead of feature. I also tried the Copy method, but that didn't work either. Any suggestions? Here's that part of my code:                  arcpy.MakeMosaicLayer_management('CreateMosaicDataset', 'mosaic_lyr')        arcpy.SelectLayerByLocation_management("mosaic_lyr", "INTERSECT", buffershape)        # If features matched criterias write them to a new feature class        arcpy.Copy_management("mosaic_lyr", "DTEDs_for_Shape")      Update... **SOLUTION:                 # Create a Mosaic Layer from the mosaic dataset         arcpy.MakeMosaicLayer_management('CreateMosaicDataset', 'mosaic_lyr')         # Select DTEDs intersecting the polygon         arcpy.SelectLayerByLocation_management("mosaic_lyr/Footprint", "INTERSECT", buffershape)         # write selected features to a new feature class         arcpy.CopyFeatures_management("mosaic_lyr/Footprint", "DTEDs_for_Shape")


How do you find a lat/lon (DMS) on a paper map using a 30cm ruler?

How do you use a 30cm ruler to find DMS on a paper map? The locations I would like to find are the 'corner' points so I can generate an extent based on the four corners. I have an old paper map (3 actually) for Northern Canada (late 1800's) that doesn't provide the Ellipsoid or the Datum. It provides a representative fraction (1:660,000 approx) and a scalebar (1" = 10 2/3 mile). The map shows grid lines spaced every 1 degree. No minutes or seconds are labelled. I understand that NOT knowing the datum or ellipsoid will automatically introduce a margin of error into the calculations, but this is not a big deal for this exercise. I determined the Lat/Lon of the intersecting grid lines, and from this question, was able to infer that it is closest to Lambert Conformal Conic (Statistics Canada, EPSG 3347). Below is the index map showing all 3 maps with grid lines every 2 degrees: ![enter image description here](http://i.stack.imgur.com/RYHZI.png) _I will need to do this process for all three maps as those grid lines are spaced every 1 degree, and not 2 as in the index above._ * * * _Of course, I could geo-reference to a known spatial reference in a computerized GIS and digitize the extent, but what if your GIS is PC-less and you have traveled back in time and are now stuck..._ If it is easier to provide an answer using say, an engineers ruler (1:100, 1:2500 etc) then feel free. It's just a 30cm ruler seems to be more readily available in a given situation.


how to create thematic map using OpenLayers and Geoserver?

I am still a beginner in learning GeoServer and OpenLayers. I tried to create thematic maps of the map that I publish in GeoServer. I used openlayer to show the map in web browser. When i want to create thematic maps based on data from the attributes that I have, I find the color constraints of thematic maps can not arise. What to make thematic maps should be used SLD in GeoServer? Here this code : indoprop /* General settings _/ body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: small; } /_ The map and the location bar */ #map { clear: both; position: relative; width: 600px; height: 600px; border: 1px solid black; }                   </style>

      sorry if a lot of mistakes. thanks for the positive response that you gave. I would say many thanks for all the answers that can help me because it's my final project which was a requirement for graduation from my college.


tiny JS discretization library for choropleth representation

I would like to know if a tiny stat/discretization js library ready to use exists. I do know about the existence of jStat (which I may explore a little bit more thoroughly), and I know that mapfish has a geostats module/widget to create choropleth map - I found the code here. But it relies on openlayers and I would like to have a standalone lib and eventually be free to communicate with openlayers. I would like to have few basics methods:   * min   * max   * mean   * median and be able to implement the following discretization with the ability to specify the number of classes and the precision (decimal):   * Quantile   * Equal Interval   * Natural Breaks (Jenks) If it does not exist yet, I will probably code something myself and release it on github under free license. Any resource and advice is welcome.


mapserver 5.6.6: polygon layer only rendered if crossing extent boundaries

I have two mapserver layers that get rendered only if the polygon boundaries are overlapping with the extent boundaries. ![Note the red polygons](http://i.stack.imgur.com/1qGls.png) If the red lines were below the upper rim of the extent, the layer would not be visible (no red square, no red polygon). Neither the inner red hollow polygon nor the outer red rectangle do display unless they intersect the image boundary no matter if at the top, bottom, left or right. Data come from a shapefile, it is not a DB query. The errorlog says the layer gets drawn:                   [Thu Jun 16 11:44:31 2011].947918 msDrawMap(): Layer 47 (simmodb), 0.014s     [Thu Jun 16 11:44:31 2011].973253 msDrawMap(): Drawing Label Cache, 0.024s     [Thu Jun 16 11:44:31 2011].973279 msDrawMap() total time: 0.621s      Why is that. Here is an extract of my mapfile:               MAP     CONFIG  "MS_ERRORFILE" "errorlog/mapsurfer-clean.log"     #CONFIG  "MS_ERRORFILE" "stderr"     #CONFIG  "MS_DEBUGLEVEL" "3"     #DEBUG 3 # can also set at layer level          NAME "MyProject"     STATUS ON     SIZE 600 440     RESOLUTION 96     #IMAGECOLOR 160 200 255     #IMAGECOLOR 253 250 170     IMAGECOLOR 255 255 255          #IMAGETYPE GD_PNG          IMAGETYPE AGGA          PROJECTION       #"init=epsg:4326"       "init=epsg:31468"           END     INCLUDE "mapfiles/outputformat.map.inc"                    #END               #EXTENT 11.2 50.8 14.8 53.6      #GK 4     # salzwedel oben         EXTENT 4443704.656113 5629700.821527   4685449.281400 5944601.022604          LAYER         NAME "geomodb"         GROUP "model boundaries"         TYPE POLYGON         STATUS ON         DATA "simgeomod/GEO-Modell"         CLASS             STATUS ON             OUTLINECOLOR 255 10 10             #COLOR 10 255 10             SIZE 20              END         #OPACITY 0              #DEBUG 3     END               LAYER         NAME "simmodb"         GROUP "model boundaries"         TYPE POLYGON         STATUS ON         DATA "simgeomod/SIM-Modell"         CLASS             STATUS ON             OUTLINECOLOR 255 10 10             #COLOR 140 100 255             #COLOR 10 255 10                                 SIZE 20         END         #STYLE OUTLINECOLOR 128 0 0 END         #OPACITY 30         #DEBUG 3     END      It does not change if layer status is set to DEFAULT.


Generating SLD dynamically using php in Geosever

I am fairly new to Geoserver and I have a question before I launch into something bigger than me: if i replace the XML code in the SLD style sheet inside geoserver with some PHP which generates the SLD dynamically (i.e. from a database query), will it work? How does Geoserver handle the SLD stored as style? Thanks in advance


Raster mosaic not displaying raster values ArcGIS 10

I have eight DEM tiles that I downloaded from the USGS National Elevation Dataset. The individual rasters are displaying correctly, but when I try to combine them in a Raster Mosaic I get arbitrary values (3.4+038 -> -3.4+038), which is considered to be NoData. I've tried several times, half the time I get a warning message upon creation of the Mosaic (001003: Datum Conflict) even though I was sure to match coordinate systems. I've even imported the coordinate system from one of the rasters going into the mosaic. _The mosaic shows the footprint of the DEM, but none of the data_ ![Mosaic](http://i.stack.imgur.com/mGEr4.png) I had a similar problem here, but I followed the process of converting to tif before I tried to mosaic the images.


How to query all points within the current map extent

First post - apologies if it's a simple question! I am basically looking to have a JS API service which will populate a datagrid with all of the points visible in the current map extent. As a user zooms in or out, the number of records returned will change to reflect what is in the current extent. I have been looking at the findPointsInExtent examples in the esri JavaScript examples, but am not sure how to edit the these examples to go from a user defined rectangle to the map extent as described above. Many thanks,


How to insert georeferenced PNG into correct location in AutoCAD Map3D?

I have a PNG of building plans that I will need to digitize in AutoCAD Map3D. I have georeferenced the PNG in ArcGIS, which has produced a world file (.pgwx) in the same directory in which the image is stored. When I attempt to bring this image into AutoCAD using either Insert Image or Data Connect, I am prompted to specify an insertion point. It is clearly not recognizing the resource file. **How can I open a georeferenced PNG in AutoCAD Map3D in the correct location?**


Consideration for a Good Silverlight based mapping application

I am starting to work on a Silverlight 4 based web mapping project using latest ArcGIS Server API. The application will involve multiple map services (for many themes) with selection, queries, and reporting for each map service. I am starting to gather some ideas on how to make this application extensible so that any additional map services can be added later on. For this project, in addition to map services, I will be using Oracle for backend for non- spatial data access. I am not sure if this will impose restrictions while building WCF services considering the fact that it's not SQL Server. I am looking for some feedback from folks who have implemented Silverlight based GIS solution and some of the factors that needs to be considered for a good/robust design. These would include: MVVM, logging, unit testing, security etc. Appreciate any ideas. Jay


How to configure QGIS Web Client?

I need to use QGIS Web-client to publish a research project on web. I setup the software on Windows and on Ubuntu Linux, changing the configuration as described in the README file and replacing the qgis_mapserv.fcgi with the server for the correct platform. Now I have the client on Windows which isn't working at all. On Linux I can load the helloworld.qgs example, but I see the dreaded pink screen. The 'natural' map is not loading, it keep going forever and without no one connection with the server. The QGIS server is working correctly on Windows and not really in a good way on Linux, but it doesn't matter. I need a working configuration for one system, OS independent.


Help projecting Austria data with QGIS

I'm trying to reproject this dataset from Austria Statistik Geodata. Data comes in "MGI_Austria_Lambert", and I'm trying to reproject to WGS84 What I'm doing is Saving layer as... and selecting EPSG:4326, but the layer is still in the same place. The other option i'm trying is changing the original .prj file with other one from a layer in EPSG:4326, but I have the same result. I don't what can I do to solve it. I'd really apreciate some help. EDIT: I've also tried setting the projection with:Set SRC to layer, and selecting 4326, but no changes.


Problem with Gpstools Plugin

I installed QGis 2.4 either with the standalone and Osgeo installers on a win7 Pro 64 laptop with 4 gb of RAM and I have the following problem When I invoke GpsTool either by the icon or the vector menu there is a long delay until the dialog box appears. Furthermore, I have a message that Qgis stops responding, a few seconds later I have the dialog box and I can use GPStools. Usually it takes between 15-20 second for the dialog box to appear. I tried to see if there is a log related to the issue by activating the log messages pannel but there is no record that something is going wrong. I even installed the Qgis 2.5 but I have the same symptoms. I would appreciate any help, Thanks before hand


Can QGIS map canvas update while python script is running?

I want to automate a periodic refresh of the QGIS map canvas with updated shapefiles. A Python plugin or console script does not allow the map to update until the script terminates. Is there a way to force a map refresh in a running plugin or script, or is a stand-alone app required? Using v1.7.4 now but could migrate to newer version.