Can ModelBuilder be used to export different versions of the same mxd with various constraints?

I am currently trying to use modelbuilder to go through each row in an attribute table, select the streets that intersect the polygon (which is the row in the attribute table), zoom to the selected features, apply a definition-query to show only the currently selected polygon and the roads, then export the current layout as a pdf. For example, say you have a 4x4 group of polygons labeled like so               A B C D     E F G H     I J K L     M N O P      What I am trying to do is:   1. select the row that correlates to F   2. select the streets that intersect it,    3. zoom to the polygon with the streets selected,    4. apply a definition query so that I can only see F and the streets that intersect it, and then    5. export the map layout as a pdf and then    6. go on to do the exact same thing for G, then H, and so on.  Is this feasible to do with modelbuilder/python, or would it just be easier to use other methods like data driven pages and manually apply the definition- query? I have included the portion of the code that I have managed to get working in model builder below.               import arcpy          arcpy.ImportToolbox("Model Functions")               cotgis11_COTGIS_Block_Watch__2_ = "cotgis11.COTGIS.Block_Watch"     Streets_59_999_to_10_000 = "Streets 59,999 to 10,000"     I_cotgis11_COTGIS_Block_Watc = "I_cotgis11.COTGIS_Block_Watc"          arcpy.IterateRowSelection_mb(cotgis11_COTGIS_Block_Watch__2_, "Block_Watc #", "false")          arcpy.SelectLayerByLocation_management(Streets_59_999_to_10_000, "INTERSECT", I_cotgis11_COTGIS_Block_Watc, "50 Feet", "NEW_SELECTION")          arcpy.CalculateValue_management("zoomToSelectedFeatures()", "import arcpy\\ndef zoomToSelectedFeatures():\\n        mxd = arcpy.mapping.MapDocument('CURRENT')\\n        df = arcpy.mapping.ListDataFrames(mxd,\"Layers\")[0]\\n        df.zoomToSelectedFeatures()\\n        arcpy.RefreshActiveView() ", "Feature Layer")


How to get cell value from one raster within a raster catalog using ArcPy?

I need to be able to obtain the cell value of one cell in one specific raster that is stored withing a raster catalog in a file geodatabase. The **Get Cell Value** tool doesn't appear to be able to do this on a Raster Catalog. Using python, how does one go about doing this?


How to style a GeoTIFF in Tilemill?

I'm trying to create a "heatmap" style visualization from a number of geopoints and values associated with them. I have been following along with this blog post. I've got a CSV file of points like the following:               POINT_Y,POINT_X,Value     -41.157785,174.8343481,5     -41.1575385,174.8347111,4     -41.1574106,174.8347659,9     -41.1572644,174.8348964,2     -41.1570742,174.8351378,7     -41.1569067,174.835225,1      I've converted them into a GeoTIFF file with interpolation using gdal_grid. This was the command I ran:               gdal_grid -a invdist:power=3.0:smoothing=1.0:radius1=90000:radius2=90000:max_points=0 -a_srs WGS84 -of GTiff -ot Float64 -l test test.vrt test.tiff       That seems to work and generates a GeoTIFF file that looks right (I can paste the gdalinfo output, in case that helps) I'm wondering how I style the points to get something similar to what is shown at the bottom of that blog post? I'm using TileMill to style my maps, and when I add the GeoTIFF to my project as a layer I get a white box that's in the correct place: ![white box in the correct place](http://i.stack.imgur.com/DgwCv.png) But of course I can't see any of the individual points on the grid. I'm fairly sure I'm missing an important step to colourize the points, I'm just not sure what it is! I don't have any Carto styles applied to the layer in TileMill. Thanks in advance! Nik


ArcGIS Server 10 GP Service Cannot Download Result?

I have implement the ArcGIS JavaScript example just like the ESRI official example (clip and ship) .Everything was going right except the final step ,when the gp job have finish and my browser lead me to the result URL it have show the 404 Error.   I checked out the gp job directory which do contain the job results(output.zip).At the same time i had add the server's hostip and hostname in my hosts file. My Environment: Window 2003 Sp2 ,ArcGIS Server 10, Chrome 18; I would be grateful if there any suggestion .Thank you and Cheers! ##  VentLam Update: I am using the java version which the web server is tomcat 6.


Polygon dynamic grid creation for a shape file

I have used QGIS Vector->ResearchTools-> Vector Grid to create a 1lat x 1 long grid for the landpolygon shape file (from osm). ![1lat x 1long grid map for the landmass](http://i.stack.imgur.com/JWmQB.png) Now, I am interested in creating dynamic grid for the original landpolygon shape file, i.e., close to the coastal-lines grid size should be .001 lat x .001 long and in the other areas existing grid size. Any suggestions? Thanks. Edit: I need the coastal lines to be .001x.001 and in other areas 1x1. So the grid size is different in a single shape file.


Looking for R-compatible geospatial datasets

I try to work with geospatial data of North America. Is there any high- resolution map material available for/in R?


Matching feature classes by similar name for map automation

I was working on this a bit ago and had something which I thought worked however, it does not seem to be working at the moment. What I'm trying to do is match feature classes having similar files. One will be a buffered version of the original and have 'Buffer_' in the name the other will simply be the original feature class. I'd like to then bring the buffered version and original feature class into a .mxd, symbolize both, create a legend, save the .mxd and export the map to a pdf. Everything is working as it should with the exception of getting the buffered feature class to match it's original. I am able to bring the buffered feature class into the .mxd, rename the .mxd to the name of the buffered feature class. I am also able to bring in an original feature class to the map document however, it is not the original feature class which corresponds to the buffered feature class. The portion of my code which attempts to match the 2 feature classes looks like:               buffered = arcpy.ListFeatureClasses('Buffer_*')               original = [buffer.split("Buffer_")[-1] for buffer in buffered]               fccount = -1        buffered.sort()     for fc in buffered:         fccount += 1         print fc + " " + str(fccount)         #REPLACE sandbox WITH tip_2014         fcclean = fc.replace('tBuffer_','')         print "fcclean = " + fcclean              copymxd = templatemxd.saveACopy(r"map output directory\\" + fcclean + ".mxd")         print "Saved Copy"         mxd = arcpy.mapping.MapDocument(r"map output directory\\" + fcclean + ".mxd")         print "MXD set"         df = arcpy.mapping.ListDataFrames(mxd,"*")[0]                             buffLayer = arcpy.mapping.Layer(buffered[fccount])          orgLayer = arcpy.mapping.Layer(original[fccount])      I have a feeling I am missing something with the count but am puzzled as to what. Thanks for any help you can provide with this issue.


How to set a defined distance between nodes to digitize in qgis?

Using QGIS (by now I have the 2.4 version) I would like to set some parameter (I don't know if such exists) that would impose a definite or maximal distance between nodes when digitizing a polyline or polygon. I need this to respect a minimal grain in the mapped features which I have to bring out. For example I would like to set a digitizing distance between nodes of -let say- 15 m, that is, when digitizing, I will be forced to make a node either all 15 meters (not more, not less) or at least all 15 m (i.e. within few to max. 15 m). I searched in QGIS menu : Settings > Options > Digitizing, and also in plugins but could not find anything that seems appropriate to me. But maybe I overlooked something ? Thanks a lot for any help. NB : I don't want to calculate nor find out distances ! I want to set them.


Convert coordinate system of Lidar or TIN?

I have Lidar data and I want to create a TIN from it, and then run the TIN Triangle tool to create a polygon shapefile of the triangles. The only thing is that the Lidar data is in a UTM CS with Meters as the x,y and z coordinates. I want the result shapefile to be in a state plane CS with feet as the x,y and z units. So I have to convert the CS as some point. At what point can I do that? The Project tool doesn't run on either Lidar data or on TINs as far as I can tell. Maybe I could do it as the last step, but does Project work on the Z coordinates of a 3D shapefile? Thanks!


Make convex hulls opaque or transparent

I have a series of convex hulls that I want to overlay but I want to be able to see all of them at the same time. How do I do this so? I'm guessing making them slightly transparent will do the trick


Changing point markers to letters

How do I change a symbol to a letter? I have points on a map denoting 'male' and 'female', and I want the points for the 'male' to be an 'M' and for 'female' to be an 'F'


Can SpatiaLite Indexes be used from views?

I'm working with a large SpatiaLite database and trying to take advantage of some spatial indexes I have on my tables that I'm attempting to access through views. Essentially, I have a number of views which each query multiple spatial tables and union the results. Before I tried using the views, I was running queries against the tables themselves and was able to use the spatial indexes in a similar manner as follows:               SELECT lc1.lc_name AS "Local Council",       lc2.lc_name AS "Neighour"     FROM local_councils AS lc1,       local_councils AS lc2     WHERE lc2.ROWID IN (       SELECT pkid         FROM idx_local_councils_geometry         WHERE pkid MATCH RTreeIntersects(           MbrMinX(lc1.geometry),           MbrMinY(lc1.geometry),           MbrMaxX(lc1.geometry),           MbrMaxY(lc1.geometry)));      [From the spatialite cookbook] As I understand it, this is the only way that spatial indexes can be used (i.e., not implicitly) due to a SQLite limitation. If this is the case, then am I correct that views cannot take advantage of spatial indexes? I would imagine that the bounding box information would have to be hard coded into the queries in the view or entered dynamically somehow when the query against the view is made. Am I missing anything or are these assumptions correct and my best option is to stick with my individual queries against the tables themselves?


How to return individual address components (city, state, etc.) from GeoPy geocoder?

I'm using GeoPy to geocode addresses to lat,lng. I would also like to extract the itemized address components (street, city, state, zip) for each address. GeoPy returns a string with the address -- but I can't find a reliable way to separate each component. For example:               {street: '123 Main Street', city: 'Los Angeles', state: 'CA', zip: 90034, country: 'USA'}      The Google geocoding API does return these individual components... is there a way to get these from GeoPy? (or a different geocoding tool?)


How to create,store and retrieve the spatial data in postgresql

i am new to postgresql/postgis can anyone explain in steps about how to store the spatial data and retrieve the spatial data and visualise in map in a proper steps.. pls . its very urgent..


Sources of geolocated Tweets

Are there any publicly available sources of geolocated Tweets? I'm aware that one can collect them on their own, but was wondering if there is something readily available to play with. There is a similar question on Stack Overflow; however it's not focused on geolocation and the first source mentioned there informs that: > As per request from Twitter the data is no longer available. Second one seems to be limited to specific tags.


How to divide my area into adjecent polygons containing 80 points each?

I have a couple of thousand points in my dataset. I need to create clusters that each consists of 80 points. The specific selection of which points to put into a cluster is not critical - only the proximity. From these 80-point clusters I need to create 1 polygon pr. cluster, so I end up with dividing my area into adjecent polygons containing 80 polygons each. A solution usable in QGIS and other open source tools would be great!


OpenLayers : How to make a marker fixed

> **Possible Duplicate:**   >  How to skip drag event to stop a feature being dragged I've created a map and added markers to baselayer on click by using this code :               vectorLayer = new OpenLayers.Layer.Vector("Vectors");             vectorLayer.id = "Vectors";             map.addLayer(vectorLayer);                  map.events.register("click", map, function (e) {                        //gets pixels on mouse position                                     position = map.getLonLatFromPixel(e.xy);                 latitude = position.lat;                 longitude =position.lon;                      //Adding markers to vectorLayer                  marker = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(longitude, latitude),                     { draggable: true },                     { externalGraphic: 'http://www.openlayers.org/dev/img/marker-blue.png',                     graphicHeight: 25, graphicWidth: 21,                     graphicXOffset: -((size.w / 2) - 2), graphicYOffset: -(size.h - 2) });                          // function markersIdGenerator() will return a random id for the marker                      marker.id = markersIdGenerator();                     // Adding marker to vector layer                     vectorLayer.addFeatures(marker);                                     });                      I've added **DragFeature** control to drag markers is there any way to fix a marker ? I've tried like this:               draggable=true;         dragmarker = new OpenLayers.Control.DragFeature(vectorLayer, {             autoActivate: true,             onEnter: function (marker) {                  if (dragChecker(marker) == true) {                                     draggable = true;                     dragmarker.activate();                 }                 else {                                     dragmarker.deactivate();                     draggable = false;                                     return;                 }             },             onLeave: function (marker) {                             if (draggable == false)                 { return; }                 else {                     Log("draggable value => "); Log(draggable);                     dragmarker.activate();                 }                     },                     onComplete: function (marker, pixel) {                            if (draggable == false)                 { return; }                 else {                          var fixer = confirm("Are you want to Fix this marker");                     if (fixer == true) {                         marker.data.draggable = false;                            console.log("Fixed");                                        }                     else {                         marker.data.draggable = true;                         console.log("Not Fixed");                     }                 }                     }         });         map.addControl(dragmarker);              //  this function will return whether the marker is dragable or not         //  by checking marker.data.draggable         function dragChecker(marker)          {              if (marker.data.draggable == true)             { return true; }             else             { return false; }         }


Create Mercator map with arbitrary center/orientation?

I want to see a Mercator map where I choose what latitude/longitude is in the center and what direction is "north". In some sense, a Mercator map of a rigid rotation of the globe. Does such a program/site exist? I'm familiar with Mercator Rotator, but this appears to be vaporware. I'm working on a project like this myself, and want to see if I'm duplicating anything. Same general question for other projections.


map extent to show specific country

I use openlayers in my web app.I want to set map extent on specific country to show cities of that country but i don't know which option of map can show specific country in map!.   How can i show specific country on map and can show cities of that country?   To setting map on specific bound when i use below code i can set extent to desire extent!               var bounds = new OpenLayers.Bounds();         bounds.extend(new OpenLayers.LonLat(8.91,55.18).transform(new OpenLayers.Projection("EPSG:4326"),         new OpenLayers.Projection('EPSG:900913')));         bounds.extend(new OpenLayers.LonLat(16.19,56.22).transform(new OpenLayers.Projection("EPSG:4326"),         new OpenLayers.Projection('EPSG:900913')));         map = new OpenLayers.Map('map_element', {             projection: new OpenLayers.Projection('EPSG:900913'),             zoomToExtent:bounds       });     map.setCenter(new OpenLayers.LonLat(-1.788, 53.571).transform(         new OpenLayers.Projection("EPSG:4326"),         new OpenLayers.Projection('EPSG:900913')     ), zoom);      But when i use zoomToExtent and zoomTo function map can't show my desire bound!               var bounds = new OpenLayers.Bounds();         bounds.extend(new OpenLayers.LonLat(8.91,55.18).transform(new OpenLayers.Projection("EPSG:4326"),         new OpenLayers.Projection('EPSG:900913')));         bounds.extend(new OpenLayers.LonLat(16.19,56.22).transform(new OpenLayers.Projection("EPSG:4326"),         new OpenLayers.Projection('EPSG:900913')));         map = new OpenLayers.Map('map_element', {             projection: new OpenLayers.Projection('EPSG:900913')       });     map.zoomTo(10);     map.zoomToExtent(bounds);      why in the above code i can't zoom to desire bound?


Dynamic scale bar, coordinates and grid for map frame in Mapinfo map layout

I believe **dynamic scale bar** and **coordinates (grid) for map frame** in map layout are **BASIC** things which Mapinfo (GIS software for thousands dollars) should allow me to do. To make it clear I am talking about separate scale bar in layout which is not part of map frame. Of course with possibility to have it automatically connected with map frame so when the change of map is made it also redraw the scale bar and coordinates around map frame (and/or grid). But I don't see these options anywhere and after some searching it seems it is possible to do it simply and dynamic only with extension tool like Encom Discover for another thousands. Am I missing something? **1. Dynamic Graphic scale bar** _In MapInfo Professional version 10.0 you can create a dynamic scale bar as part of your map._ Close, **but**... I don't want it as part of map window, I want it separate. Only thing which come to my mind is make the map frame bigger containing the place where I want scale bar and mask the rest around with white rectangles. Any better idea for separate dynamic Graphic scale bar? **2. Coordinates and grid for map frame** _- no default solution_ _- free mapbasic tool - from J.Wilcock called Layout Coordinate Grid_ - very close - allows to draw grid lines and place coordinates around frame. But it is not dynamic, also settings are basic, not many options, maybe having source code, it would be possible to extend it. At least for few more options and possibility to delete all lines and texts at once (again no group function for objects in layout) for redrawing. Do you know any better way or free tool for coordinates and grid for map frame?


How to create button that calculates acres on selected polygon features?

I'm looking to create a simple button that calculates acres on selected polygons and can't quite find what I'm looking for. I read through this thread: automating a python script..., but found it wasn't quite what I am looking for. My Python skills are very near nil, I'm using ArcGIS 10.1 SP1 for Desktop (Build (3143). I'm aware of !SHAPE.area@ACRES!, but need help getting into button form that resides on my toolbar. EDIT: I've pieced some code together from several examples here & around the net. When I add the button to ArcGIS, highlight a polygon and click, nothing happens. Nothing. I'm obviously something and hope it's just one big hump to get me there. Below is the code thus far.               import arcpy     import pythonaddins          class CalculateSelectedAcreage(object):         """Implementation for AcreageAddInTest_addin.CalcAcresSelected (Button)"""         def __init__(self):             self.enabled = True             self.checked = False         def onClick(self):             # Implementation of OnClick method of Button's class             # Get the current map document and the first data frame.             mxd = arcpy.mapping.MapDocument('current')             df = arcpy.mapping.ListDataFrames(mxd)[0]                  # Get the feature name to work with             in_featureclass = arcpy.GetParameterAsText(0)                  # Set local variables             field_Name = "Area"             field_Type = "DOUBLE"             field_Precision = 18 # total number of digits stored             field_Scale = 8 # number of decimal places                  fieldList = arcpy.ListFields(in_featureclass, field_Name)             fieldCount = len(fieldList)             if fieldCount == 1:                 # field already exists, as it does in DI Landtracs                 arcpy.calculateField_management(in_featureclass, field_Name, 'float(!SHAPE.area@ACRES!)', "PYTHON_9.3")


How to use wildcard to Append multiple feature classes in ModelBuilder?

I have a folder of shapefiles and each one starts with a code. There are multiple shapefiles that start with each code, and I would like to create a model in ModelBuilder that will select the shapefiles that have the same code, and append them into the appropriate existing geodatabase feature class. Is there a way to use a wildcard in the Append tool, like to specify that any and all files in a certain folder starting with 'XPGC*' get appended into the 'Pipe_Grade_Change' feature class? Or is there a way to use an iterator to accomplish this?


Show live attribute when hover in a map

i'm still new in openlayers. i would like to show "location" attribute on right corner of the map when hover in map. my map consist of of many attributes and one of them is location. how can i possibly do this. is Openlayers capable of doing this? the example is in http://index.gain.org when we hover on the map we can see the country on top right of the map. appreciate any help.


Latitude - Longitude bounds from GeoTIFF info

here's the content of a GSFC-generated GOES TIFF image:               GOES 13 Imager frame  66 at UTC 12:45:53.520 day 312 of 2013     Vis pixels :   9061, 22912    lines :   2845, 10152     Vis Lon    : 999999,-23.1566 Lat   : 999999,-20.9474     Imager ch3:count(0,1023) => [(modea-0)/1]^1 =Uchar> (255,69)     (xscale,yscale) => (0.190476,0.333333)     Vis pixels:  3650,  28850 lines:  2250,  14250     (xstride,ystride) => (21,12)     IMC status:      1     nadir pixel,line:  15352,  8050     Ref lon,d,lat,yaw:  -74.99990305,   42164.17478,         0,         0     Attitude roll,pitch,yaw:          0,         0,         010491171      The TIFF file is here: http://goes.gsfc.nasa.gov/goeseast- lzw/overview/ir3/latest.tif ¿How can I get/calculate the geographic bounds from this information or from the GeoTIFF file itself? ¿Can I do this somehow opening the file in QGIS? Do I have to develop some script? I only need to do this one time. Thanks to anybody dedicating his/her time on answering this!


Difference between Execute Task and Submit Job?

When I compare my GPServer with sample service from ESRI. I notice difference. In esri Supported Operations: **Execute Task** my GPServer: Supported Operations: **Submit Job** What is the difference between Task and Job??


How to eliminate gaps and overlaps in a layer of SpatiaLite table?

I'm try to snap all polygons in a table to remove gaps and overlaps. I can remove gaps but get new overlaps. I have no idea what doing wrong... sorry, I'm new in SpatiaLite. I tried the following: 1 - generated the set of neighboring polygons               CREATE VIEW toques as            SELECT "s"."cd_geocodi" as "geocodi",                   ST_UNARYUNION(ST_COLLECT(i.geom_sb)) as geom_sb              FROM "T_SetBog" AS "s", "T_SetBog" as "i"             WHERE "s"."cd_geocodi" != "i"."cd_geocodi" AND                   (ST_TOUCHES(s.geom_sb, i.geom_sb) = 1 or                   ST_OVERLAPS(s.geom_sb, i.geom_sb) = 1)          GROUP BY "s"."cd_geocodi"      2 - fix the polygons to match the edges of neighboring (epsg: 4674)               CREATE VIEW setsnap as            SELECT "s"."cd_geocodi" as "geocodi",                   ST_SNAP(s.geom_sb, i.geom_sb, 0.000001) as geom_sb              FROM "T_SetBog" AS "s", "toques" as "i"             WHERE "s"."cd_geocodi" = "i"."geocodi"      3 - fixes in the table               UPDATE "T_SetBog" SET geom_sb =                       (SELECT geom_sb FROM "setsnap"                        WHERE cd_geocodi = geocodi)      Any help would be appreciated. Thanks


Want to create a button to toggle Distance Factors

Currently, I use **Ground to Grid correction** and manually enter 2.78 when I need to create a polygon using a legal description with Texas veras. I'd like to create a " **Vera** " button that resides on the toolbar and toggles that automatically. Or is there an even easier technique? Currently using ArcGIS 10.1 SP1 for Desktop (Build (3143).


How to queue FME output on the same workspace?

I have an .csv coordinate file with the following header **num xc yc xmin ymin xmax ymax** I want to tranform the x/y coordinates on each line of this file to lat / long (LL84) I am using the following workspace ![enter image description here](http://i.stack.imgur.com/I0mw4.jpg) The output file is a **csv** file with the lat/long. The problem I have is FME writing the lat/long to the output file in a different line for each pair of coordinates **xc/yc** , **xmin/ymin** , **xmax/ymax** and not in the same line as it is in the input **csv**. So the results look something like this, ![enter image description here](http://i.stack.imgur.com/gL9o1.jpg) Is it possible to get it to work or I have to output three different csv files and merge them ?


How to rename rasters in directory based on field value of their centroid feature class in ArcGis?

I have a lot of rasters named like r001.tif, r002.tif and so on. There is a point shapefile with centroids of these rasters and their real name in the attribute table. I'm looking for a way or some tool/model to rename these rasters according to their real name in centroid point feature.


Are there examples of high-level interfaces to NetCDF

The R _raster_ package and GDAL both have independent wrappers around NetCDF-4* that treat an array variable as a "complete" dataset, i.e. they provide objects or interfaces that seamlessly give access to a variable inclusive with:   * dimension variables   * coordinate system metadata   * value units   * general other metadata * I'm also interested in HDF4 and HDF5 extensions, but it seems less likely than for NetCDF-4.  I often see code that uses these at the lowest level, and I'm hoping to find more examples like those in _raster_ and GDAL that have abstracted this away:               ## psuedo code     load NetCDF     nc = open("file.nc")          v = getvar(nc, "somevariable")          x = getvar(nc, "somevariable_lon")     y = getvar(nc, "somevaraible_lat")      etc. In R's _raster_ and in GDAL it is much more like an extension of a traditional GIS raster, i.e. all the spatial context and metadata is present, and it extends to 3D and above. (There are problems with different conventions for rectilinear and curvilinear coordinates, but that's not my concern here). Are there other open-source examples in widely used languages that provide the high-level interfaces like R's _raster_ and GDAL? Is there capacity in the NetCDF library itself for this higher level access? (I know how to use the lower level to build this, I want existing examples). I'm also excluding uses of GDAL in Python, Perl, C# etc. - that is all just GDAL as far as I'm concerned. I'm also not interested in GIS interfaces that provide these via GDAL. raster:   http://cran.r-project.org/web/packages/raster/index.html GDAL: http://www.gdal.org


How to make reclassified raster layers automatically display break values in their attribute tables?

I am using `ArcGIS 10.2.` I have many raster layers which I need to reclassify (using the quantile method), I Also need to know the break values of these reclassifications. I know that the break values can be viewed in the reclassify dialog box, however, due to the sheer number of layers I am dealing with, I do not have time to copy these values from this dialog box, before copying them again into the attribute tables of the reclassified layers. Is there some way that I can have the break values automatically displayed as a field of the attribute table belonging to the reclassified output?


SetFeature creates infinite loop when updating sqlite feature using OGR

when using the SQLite driver in python - setting a feature after changing an attribute field value creates an infinite loop on the first record. the same code works fine if i substitute the sqlite driver for an esri shapefile. some code to setup the issue -               '''create a new database with a point feature containing 2 records'''     def mkptdb():         drv=ogr.GetDriverByName('SQLite')         if os.path.exists('test.sqlite'):             os.remove('test.sqlite')         ds=drv.CreateDataSource('test.sqlite',options=['SPATIALITE=yes'])         lyr=ds.CreateLayer('test',None,ogr.wkbPoint25D)         flddef=ogr.FieldDefn('Name',ogr.OFTString)         flddef.SetWidth(32)         lyr.CreateField(flddef)         flddef=ogr.FieldDefn('newfld',ogr.OFTString)         flddef.SetWidth(32)         lyr.CreateField(flddef)              feat=ogr.Feature(lyr.GetLayerDefn())         feat.SetField('Name','george')         pt=ogr.Geometry(ogr.wkbPoint)         pt.AddPoint(150000,48375999)         feat.SetGeometry(pt)         lyr.CreateFeature(feat)              feat=ogr.Feature(lyr.GetLayerDefn())         feat.SetField('Name','fred')         pt=ogr.Geometry(ogr.wkbPoint)         pt.AddPoint(150050,48376005)         feat.SetGeometry(pt)         lyr.CreateFeature(feat)              feat.Destroy()         ds=None          '''function to update one of the existing fields - this is the part that loops forever'''     def updatePt():         print 'updating...'         drv=ogr.GetDriverByName('SQLite')         ds=drv.Open('test.sqlite',True)         lyr=ds.GetLayerByName('test')         for feat in lyr:             s=feat.GetField('name')             print s             feat.SetField('newfld','hi')             lyr.SetFeature(feat) #continuous loop stops if this is commented out             feat.Destroy()      as noted above - if i comment out the line 'lyr.SetFeature(feat)' - the infinite loop ends and the feature will increment as expected. but without that line, the field value is not updated. thoughts? python 2.7.6, gdal 1.10.1 (just noticed there might be an update here to 1.11.05, will check.) EDIT: updated to gdal 1.11.0 - same issue of infinite loop.


How to automatically connect point

I have to draw all the rows connecting the 2 edges with a line. It's not so hard to it manually, but it takes a lot of time. Is there a way to connect the two edges of the rows automatically? For example, if i call the edge on the right side X and the left edge AX (X will be the row number) can i give some kind of command to connect them automatically?


What raster smoothing/generalization tools are available?

I have a DEM that I would like to smooth or generalize to remove topographic extremes (chop off peaks and fill-in valleys). Ideally, I would also like to have control over the radius or level of "blurriness". In the end, I will need a set of rasters that range from slightly blurry to really blurry. (Theoretically, the blurriest would be a constant raster of the arithmetic mean of all values). Are there any tools or methods I can use (based on Esri, GDAL, GRASS)? Do I need to home bake my own Gaussian blur routine? Could I use a low-pass filter (e.g. ArcGIS's filter), and if so, would I need to run it a bunch of times to get the effect of a large radius?


Raster Smoothing python

I want to perform raster smoothing on a DEM file. I want to to assign the elevation of each pixel using the average elevations of its 8 neighbors. The ESRI's "Python scripting for ArcGIS" has a chapter on using python for raster but it did not help me to write a code for this. I'm looking for any useful literature, tutorial, or sample code...! please note that r.buffer and r.neighbors is not a good answer for me since I want to learn how to write this code completely. P.S: I already took a look at this and this. they did not help me...may be since my knowledge is limited I need more comprehensive answer. Thanks in advance for any help you are able to provide.


Adjusting for road surface in Network Analyst?

I'm building a street network dataset and want to adjust the speed limit of certain segments to account for road surface (paved vs. unpaved). Are there any guidelines/rules for doing this (e.g. an unpaved road should be set to 5mph)?


Set Up WFS Service on MapServer and display in OpenLayers

I have used following mapfile to create the WFS service on Mapserver but struggling to display the service output using OpenLayers. Please suggest some links to use WFS service in openlayers. Thanks in advance.                  MAP       NAME "WFS_server"       STATUS ON       SIZE 600 300       #SYMBOLSET "../etc/symbols.txt"       #EXTENT -180 -90 180 90       UNITS DD       #SHAPEPATH "../data"       IMAGECOLOR 255 255 255       #FONTSET "../etc/fonts.txt"                 #       # Start of web interface definition       #       WEB         IMAGEPATH "/ms4w/tmp/ms_tmp/"         IMAGEURL "/ms_tmp/"         METADATA           "wfs_title"          "WFS Demo Server for MapServer" ## REQUIRED           "wfs_onlineresource" "http://demo.mapserver.org/cgi-bin/wfs?" ## Recommended           "wfs_srs"            "EPSG:4326 EPSG:4269 EPSG:3978 EPSG:3857" ## Recommended           "wfs_abstract"       "This text describes my WFS service." ## Recommended           "wfs_enable_request" "*"  # necessary         END       END            PROJECTION         "init=epsg:4326"       END            #       # Start of layer definitions       #            ##################       # World Continents       ##################       LAYER         NAME "Mumbai_City"         METADATA           "wfs_title"         "World continents" ##REQUIRED           "wfs_srs"           "EPSG:4326" ## REQUIRED           "gml_include_items" "all" ## Optional (serves all attributes for layer)           "gml_featureid"     "ID" ## REQUIRED           "wfs_enable_request" "*"         END         TYPE POLYGON         STATUS ON         DATA '/ms4w/data/Mumbai_City_Boundry.shp'         PROJECTION           "init=epsg:4326"         END         CLASS           NAME 'Mumbai City'           STYLE             COLOR 255 128 128             OUTLINECOLOR 96 96 96           END         END       END #layer          END #mapfile


Zoom to country with geoserver and openlayers

I would like to preposition an OpenLayers map on a country. This is, when my page loads, the map should be positioned on the country with an appropriate zoom level. This should work for a (large) list of countries. I have a GeoServer with a shapefile layer containing country polygons. The polygons have ISO country code attributes. Another layer shows a satellite background image. When generating the country page on which the map is shown, I only know the country name (or ISO code), but not its coordinates and polygon details. (GeoServer and webserver are different machines) My knowledge of OpenLayers and GeoServer is limited but if I understand correctly OpenLayers requests a certain map position and zoom level from GeoServer. I would thus need to retrieve position and zoom level from GeoServer in a first step, and then request this part of the map in a second one. This is if there is not a way to tell OpenLayers to zoom in on a feature I can identify by its attribute. Any code example would be very much appreciated, but conceptual clarification would be equally valuable.


Code to get featureclass name from existing topology

I am creating and validating topology through vb.net and arcobject code.Things are running fine as I am able to add rule and validate it . Problem is when once the program is run and topology is created.Second time when i am running my code , I have written that if topology exist then delete it and create new topology.But I observed that deleting topology every time will corrupt memory. So Second approach I used is to first delete rule in the existing topology and then featureclass from it and not the topology. Then new rule and featureclasses are added to same existing topology. But the problem is I am not able to get the featureclass name in the existing topology. How can I get the name of feature class participated in topology? The code is as follows-:               If pdataset.type=esridatasettype.featureclass then         Dim fcnme as string         Dim fcarray as Arraylist=New Arraylist         fcnme=pdataset.name         fcarray.add(fcnme)         for i as integer=0 to fcarray.count-1             pname=fcarray.item(i).tostring             Dim gp as Geoprocessor=New geoprocessor             Dim removefc as DataManagementTool.RemoveFeatureclassFromtopology=New DataManagementTool.RemoveFeatureclassFromtopology             removefc.in_topology=topologyname             removefc.in_featureclassnme=pname             Dim sv as object=nothing             try                GP.execute(removefc,nothing)             Catch ex as exception             end try


Are there open standards for storing multi-modal routing graphs?

I'm looking for any **open** standards (or maybe best practices) for storing multi-modal routing graphs, eg. info for pedestrian, bike, public transport and car routing, etc. Every data provider seems to have their own format. My goal is to convert data from different providers into a common standardized format and then build applications from there.


Update ArcGIS metadata Tags field with feature class name

We have ArcGIS 10.1 Enterprise SDE/SQL Server and are trying to figure out the best way to automatically update the tags field by using the feature class name. All our fc names have underscores, I'd like to use the words between underscores as metadata tags, then set up an enterprise search service for end users. example: fc name: ARCGIS.USER.project_source_type ideal tags: project, source, type Make sense? Any ideas on how to do it or advice on better ways approach it? Thanks


Simulate a mouse-click inside an ArcGIS Online JavaScript Application

I have a JavasScript application consuming an ArcGIS Online Web Map. I want to open a default popup at a specific coordinate. Is there a way to simulate a mouse-click at that point, or a better alternative?


QGIS MapServer on QNAP NAS - Dependencies

I'm trying setup QGis mapserver on NAS in my office. I have working (can access from web and execute scripts) cgi-bin directory. Question is, what I need to install before I can run qgis_mapserv.fcgi?


Selecting surrounding states from a given state

I have a PostGIS spatial enabled table with the states in the US. How can I write a query selecting all touching states to a named state. Like this :               Select * from States Where geom touches (Select geom from States Where name = 'Oklahoma')       Thanks ..


Crowdsourcing points by on-click to web map with moderation?

I want to build a really lightweight web map interface where a user can click anywhere on a map, create a point, type in a comment -- ideally all via Facebook, but I don't want to get ahead of myself -- and have that comment pop up next to the point on mouse-over. Eventually, a large "crowdsourced" smattering of points with comments will be formed ... kind of like this New York Times map. I have access to everything I need to build something with the ArcGIS API for JavaScript, and some basic knowledge of JavaScript / that API, but am stymied by the need for the following features, in order of importance (1 & 2 are about equal):   1. A moderator of some sort (me) can go in & remove any inappropriate points/comments.   2. User X _cannot_ edit any other users' points.   3. User X who makes a point on the map can go back and edit any of their own points. It seems the ArcGIS API can help you make a web map that allows a point- editing free-for-all, but nothing like the above features, as far as I know. And I don't know much about the server/database side of web technologies. What kind of technology would even be necessary to:   * Recognize User X as User X & not User Y?   * Recognize points a, b, and c as belonging to user X?   * Letting user X edit those points and no other points? I imagine there would need to be some kind of account creation / logging-in situation, tied to map editing capability? Where would one even begin crafting something like that? For functionality, Crowdmap (like this example here) does exactly what I'm looking for in terms of the key requirements 1 & 2, but I want something a lot more simple ... just one click on the map, type in a box to put your comment, and you're done, no clicking through to "report submission" forms with tons of fields and sending it off somewhere to get processed. For aesthetics & some functionality, I really like the look & simplicity of this cool map, which also fulfills 1 & 2, but I have no idea how user- submitted polygons are being read and presumably appended to a geo-enabled table/database, and in fact that very part seems crucially incomplete, because the things you draw on the map don't seem to actually get saved. Would love to get pointed in the right direction, as I would be thrilled to know how to do this! Or even what I need to learn more broadly.


Visual Impact Assessment in QGIS or GRASS

Is it possible using QGIS or GRASS to perform a Zone of Visual Impact assessment? E.g. where can a 100m high structure be seen at a viewing height of 1.8m within 30km, taking into account elevation (also maybe buildings and wooded areas)? I'm pretty new to GIS but am having to learn pretty quickly for work. Any help would be much appreciated.


QGIS 2. Bad layers won't resolve

This is getting worse... I created a project with about 6 vector layers (which I digitised) with some raster tiles. It is stored locally on my Windows 7 PC, running QGIS 2.0 The project was fine until I came to open it yesterday, when I got the Bad Layers dialogue. Entering the correct paths does not fix it. I've opened up various iterations of this project I had made, and my backups & they're all broken. Some I definitely experimented with Tools/Scripts (IRO my other post), but I don't think I had in the earlier ones. One of these projects' "bad layers" is a temp output from a tool. Not sure if the time coincides, but the list of Recent Projects has reverted to that of some weeks ago. I did a System Restore, which assured me my data was safe, but as I'm investigating, it suggests this is the culprit - if the temporary file in AppData has gone that would trip it up. Where is the "recently used files" list - is that in AppData too? (this is less of a problem, just a possible clue to the above) I've skimmed the .qgs file in Notepad++ to see if I could identify these layers, but can't work it out. Can this be edited like the old ArcView .apr files?


How to draw a line between two places with via-points?

I have prepared a GPS-tracking dataset, currently consisting of one table with stopping points and one table with the raw GPS-points. The first table contains a column for any stopping point showing the id's of the grouped points. Now, I want to connect the stopping points with lines, not only direct connections (st_makeline(geom, geom)), but with via points from the raw point table. Therefore, I tried something like               st_makeline(array[stoppingpoint, viapoints_lying_between_these, next_stoppingpoint])      Unfortunately, this query connects all via-points with the stopping point with one line, as you see here: ![enter image description here](http://i.stack.imgur.com/azSeJ.jpg) The query looks as follows:                   st_makeline(stops.the_geom, raw_points.the_geom, ARRAY[lead(stops.the_geom) OVER (ORDER BY stops.group_id)])AS lines,         stops.group_id, row_number() OVER (ORDER BY stops.group_id) AS line_id     from // semantic: where raw_points.id lies between maximum_id_from_first_stop and minimum_id_from_next_stop      When I manually put the via points and the two stopping points in one array within the st_makeline-function, it works in terms of drawing one line. Thank you for any advice! **UPDATE:** okay, i did not solve the problem yet. So, here is the table for better understanding: What i need are lines from each stopping point (marked by column group_type), which are centroids of grouped points, to the next stopping point VIA the intermediate points. In this case, one line would start at the point with group_id 38, end at group_id 42 and be connected via points 498, 499 and 500. ![enter image description here](http://i.stack.imgur.com/sQKoG.jpg) **UPDATE:** I finally found a solution. First i merged all the consecutive waypoints (id 38-42 in the lower picture) with a window function giving new group_nr's:                  sum(group_flag) OVER (ORDER BY id) AS group_nr        FROM ( SELECT               CASE WHEN lag(group_type) OVER (ORDER BY id) = group_type THEN                  ELSE 1                     END AS group_flag from table) t1      Then i make lines from each group of waypoint (multipoints) and add the previous and the next stopping-point-geometry to each line:                   -- 1. previous stop:      st_addpoint(st_linefrommultipoint(groups.the_geom), lag(groups.the_geom) OVER (ORDER BY groups.group_id), 0)              -- 2. next stop:     st_addpoint(t1.new_geom, lead(t1.the_geom) OVER (ORDER BY t1.group_id)


Does the ArcGIS Online "Spatial Analysis Service" require data to be hosted on ArcGIS.com?

I'm exploring the new-ish ArcGIS.com Spatial Analysis Service. > The Spatial Analysis service contains a number of tasks that allow you to > perform common spatial analyses **on your hosted data**. I'd like to use it to aggregate attributes from a variety of sources against a target layer - similar to the Union geoProcessing command. Does "your hosted data" mean that the spatial analysis service requires all data sources to be stored in ArcGIS.com? The documentation also states: > These tools allow end-users to easily perform analysis against layers hosted > in Online as well as **other layers they have access to**


getting data into geoserver from two columns to form a point

I have a problem on how I am able to retrieve a geometry data from postgres using geoserver. I am new to this. The latitude and longitude are on separate columns. So I'm trying to figure this out by concatenating this two columns at the same time converting their format with this SQL view like this.               SELECT *, ST_AsEWKB(ST_GeomFromText('POINT ('||latitude||' '||longitude||')',4326)) as geom FROM mytable      where latitude and longitude are columns in my database. Now my the problem is that I can't see the points. Is there another way to make this solve?


Calculate area of interest based on X events within Y kilometers within Z days

I'm currently in Afghanistan and need some geospatial support. I have a customer that needs to know where Areas of Interest (AOI) exist. AOIs are defined as 3 types of events within 1KM of each other within 30 days. I can figure out how to find X number of events within Y kilometers, but can't figure out the time part. Any ideas? Also, the 30 days does not mean within the last 30 days. An AOI may have existed back in 15May-15June, for example. It is a vast amount of data, and I cannot share it, but I have an MGRS, lat/long in DD, and a date field. I really appreciate any advice on how to tackle this. On the network I operate on, I only have the base install of ArcGIS 10, and the data is stored in a file geodatabase. I won't be able to install any other software such as PostGIS, but we do have python installed. Thanks!


Elevation maps from point clouds: TPS vs. what other methods

In the reply to another question, @thehealingprocess refers to > "...a comparison of interpolation methods for interpolating elevation maps > from LiDAR clouds, and in almost all scenarios thin plate spline > interpolation was the most accurate method. IDW is good in some situations > but it's quite primitive." Question: does anyone have a reference to such a survey? (I would have commented there but I had not enough reputation)


Export KML to SHP in Javascript

I need my Javascript browser application to convert/export KML documents into ESRI shapefiles. Is there any JS library that can do it? I tried googling, but no answers so far (at least, not in Javascript).


how can i set place mark with text in QGIS?

I want to mark a point in map and place text near it. I used QgsVertexMarker to mark point .As far as now i am using tool-tip to show text. but i need clean code to show my text on map. Following code is used to set marker at point A.               QgsVertexMarker * marker = new QgsVertexMarker(mPlugin->iface()->mapCanvas());     marker->setColor(Qt::black);     marker->setIconType(2);     marker->setCenter(A);      I need to display a text near that point . how to do by c++ code?


Overland flow modeling Help

I would like to determine the surface ﬂow network, this based on the spatial analysis of DEM data and the creation of separate layers for surface ponds and preferential surface ﬂow pathways. More accurate I would like delineation surface pond and surface flow pathway over urban areas based on DEM. I want to know what software I can automatically calculate?


Using a field to define font size in ArcGIS 10.x

Is there a way to use label expressions in ArcGIS 10.x to specify the font size for a label from the values in a field? So as an example, I have a point dataset which I wish to label, and within the attribute table there is a numeric field called "size" which holds the size I want the label for that feature to be. I've managed to use an expression to specify a font and a single size for the whole dataset               "<FNT name = 'Arial' size = '12' >" & [gml_id] & "</FNT>"      But if I try to replace the number 12 with the name of the field which holds the font sizes, the code doesn't work i.e.               "<FNT name = 'Arial' size = [size]  >" & [gml_id] & "</FNT>"      The above expression prints the expression as the label, rather than the values from the "gml_id" field. So this made me think that it was interpreting the whole thing as a string because it's all in double quotes, however removing the quotes gives me a syntax error.               "<FNT name = 'Arial' size = '[size]'  >" & [gml_id] & "</FNT>"      The above expression gives me no label.               "<FNT name = 'Arial' size = "[size]"  >" & [gml_id] & "</FNT>"      The above expression gives me a syntax error. Anybody know where I am going wrong or even if this is possible?


Disable a button until selection is made

I have this section in my website: ![enter image description here](http://i.stack.imgur.com/YtwBp.png) There is a drop down list of environments and an area for a user to input a Zip Code. What I am trying to achieve is making the button disabled until a selection is made from the list. Here is my code:               <select id="myList">                     <option selected value="defaultValue">Select..</option>                     <option value="http://eddmapi-dev.usps.gov/arcgis/rest/services/EDDM/selectZIP/GPServer/selectZIP">DEV</option>                     <option value="http://eddmapi-sit.usps.gov/arcgis/rest/services/EDDM/selectZIP/GPServer/selectZIP">SIT</option>                       <option value="http://eddmapi-cat.usps.gov/arcgis/rest/services/EDDM/selectZIP/GPServer/selectZIP">CAT</option>                     <option value="http://eddmapi.usps.gov/arcgis/rest/services/EDDM/selectZIP/GPServer/selectZIP">PROD</option>                 </select>

                         Input ZIP CODE :                                                                                <input id="Zip_code" type="text" name="address">

                 <button type="button" onclick="selectZIP(Zip_code.value)">Execute</button>      Here is my code for the list selection:               require(['dojo/on', 'dojo/query'],         function (on, query) {         document.getElementById("buttonId").disabled = false;             on(query('#myList'), 'change', function (e) {                 gpURL = e.target.value;                 console.log('Environment changed: ' + '"' + gpURL + '"');             });         });      Where would I place the code:               document.getElementById("buttonId").disabled = false;


Openlayers and KML layer projection issue

I'm not a GIS expert at all, but I've been asked to add a KML layer to an Openlayers map which probably needs some tweaks and that's where I get confused. Let say I have an Openlayers map with the following projection:               Projection: EPSG:900913     DisplayProjection: EPSG:4326      The KML file that I have contains Geo-coordinates like these:               44.22912497884251,41.93612718554421,0 44.22898876056436,41.93614742383577,0      When I'm trying to show this data on the map, I got nothing, however another KML file shows perfectly fine. It contains some test data like these:               4651136.141979168, 5265323.674468365 4997243.006006268, 5205611.478023042      As far as I can see, there is a projection issue here. What I don't get is the first data looks more correct according to my map projection settings, but it doesn't show up any where or at least I can't find it any where. The second file seems to have different projection, maybe `EPSG:3857` (a.k.a. `Spherical Mercator`), but it will go straight to the map. We have also ArcGIS installed in one our computers, however as I said, I'm not a GIS expert. If somebody could guide me either through the exporting KML file in ArcGIS (I have the original shape files as well), or the Openlayers settings to show up the KML file, I'd really appreciate that.


PyQGIS CRS on the fly reprojetion

As a first step of a pyqgis plugin I'm trying to import several shape files at once. To get them aligned, using the GUI, I'd enable on the fly reprojections and set the project crs to WGS84. I'd then set the layer CRS to WGS84 for each layer resulting in all layers being in the same layer extent. The following code tries to replicate the GUI steps. However, the end result is that there is still no overlay between the layers, unlike when I do the steps via GUI. What am I missing out?               qgis.utils.iface.mapCanvas().mapRenderer().setProjectionsEnabled(True) # Enable on the fly reprojections     qgis.utils.iface.mapCanvas().mapRenderer().setDestinationCrs(QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.PostgisCrsId)) # Set project coordinate reference system to WGS84          for path, name in ShapeFileList:         vector = QgsVectorLayer(path, name, "ogr")         if not vector.isValid():             print "Layer failed to load!"         vector.setCrs(QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.PostgisCrsId)) # Set layer coordinate reference system to WGS84         QgsMapLayerRegistry.instance().addMapLayer(vector)


How to install GeoServer on Ubuntu 11.10 64 bit?

* I borrowed the user name from friend. I need to install GeoServer on Ubuntu 11.10 64 bit. first, I installed Oracle Java 7 (JRE/JDK) successfully. then, i thought i need to install JAI and ImageIO (jre and jdk amd 64-bit) from here http://download.java.net/media/jai/builds/release/1_1_3/ http://download.java.net/media/jai-imageio/builds/release/1.1/ following these instructions : http://docs.geoserver.org/latest/en/user/production/java.html#installing- native-jai-on-linux but that didn't work. then tried these instructions (for JAI files) : http://java.sun.com/products/java-media/jai/INSTALL-1_1_2.html#Installation install done but with these errors : Cannot create lib/amd64/libmlib_jai.so Cannot create lib/ext/jai_core.jar Cannot create lib/ext/jai_codec.jar Cannot create lib/ext/mlibwrapper also when i tried to install IimageIO files i got: Please do not attempt to install this archive file I am not sure what to do now. maybe it is better if i use 32 bit machine instead of 64 bit ? or use openJDK instead of oracle java ? I really need your suggestions ppl. thank you


Click Handler not working on OpenLayers Map in Ubuntu

This is really strange as the problem seems to be persisting on the Ubuntu OS itself. I have created a WMS and it works fine on Mac and Windows, but not on Ubuntu. I have a simple WMS which is returning the Lat & Long for the location on the map where the user does a single click. It seems that on Ubuntu (all the browsers), the map gets dragged when clicked once. Is this a bug?? is it becoz i m using Ubuntu 12.04??


Trying to set the OpenLayers MouseOver position to be outside the Map

This is my code and I am trying to obtain the MouseOver to be displayed outside the Map container.               <!DOCTYPE html>                           <title>My Map</title>             <link rel="stylesheet" href="openlayers/theme/default/style.css" type="text/css">
My Map

Position
                    I am using the , the mouse over co-ordinates are only appearing at the bottom right of the map (within the map container).


Snapping points to nearest road

I have a small table of 10 cities (in one table) that I am snapping to the nearest road (in another table) with the following select and storing the table snapped_cities:               Select b.id, ST_Closestpoint(ST_Collect(a.geom), b.geom) as geom     into snapped_cities     from roads a inner join cities b     on ST_Dwithin(a.geom, b.geom, 1000)     group by b.id;      I would however like to have road ids and not just the geom (`a.id` above). How do I modify the select above to get these? I use postgresql 9.2 and postgis 2.0 thanks,


web service to find the shortest path

if you have any idea that can help me I would be grateful :):) So i should create a web service wich will communicate with my android application .in my android app the client choose two point start and arrival this two point will be send to my web service to find the bus that has the shortest path between them. i have a problem analytically and programmatically i find a dijkstra algorithme in this link http://www.vogella.com/code/de.vogella.algorithms.dijkstra/codestartpage.html and i find this also http://www.codeweblog.com/dijkstra-shortest-path- algorithm-to-optimize-combat/ can you help me wich one i choose and how can i establish a relationship between this algorithme and my data base may be i need to send or retrieve the bulk of data in arraylist.. ..what are the classes needed what is the query that i need.. in wich classe i write them.. . (i use eclipse ide ) thanks in advance


python script to calculate and return values based on several conditions

I need to calculate and return the value "continuous" to those records in a polygon feature class with species records aggregated to a UTM grid considering the attributes are species name, grid code, record age (2 values, new and old) and, while some records in a distinct grid code are either new or old, but some distinct grid codes, have also new and old records. For those records where a distinct species and distinct grid code contain the values new and old, I would like to return the value "continuous" in a new column using "Field calculator" and a python script. Could someone help me with such a python script?


Draw lines and Move the marker at the same time with KML format

it is possible to draw a line and put the Marker in the top of the line with KML format? or have i to make two KML files, it's that to say, One KML file for the Lines and another one for The Markers? We are about to develop a GIS track app, and we are testing what is the best way to achieve our project. here is and example, about what we want to do: GIS Track Example, Moving line and Marker Well is good to explain, that we gonna get a new KML or the data every 20 seconds to redraw the lines and the markers in the map. Or do you have better ideas? KML, Database(Mysql), Xml? Thanks to all.


How to Calculate Utilization Distribution Overlap Index (UDOI) in ArcGIS

I'm interested in calculating the overlap of home ranges (=utilization distributions in my case) of a bird species using sighting coordinates. This article introduced UDOI as the best index for such purpose: I have ArcGIS 9.3, and I am able to calculate kernel home ranges using the ArcMap plug-in "Home Range Tools" (HRT). I also have "Hawth's Tools" in my ArcMap. Now I am hoping to find a way to calculate UDOI to demonstrate the degree of overlap between individuals. I see that UDOI can be calculated in R, yet I do not know how to use R. Can someone tell me if there's any Arc tool that does this? Thanks a lot in advance! I also see that the user "MTGIS" has asked this same question before: And @whuber explained the math of UDOI in detail in the wonderful reply. However, I am not super familiar with ArcGIS, and did not understand how to do those steps in Arc. Sorry about repeating the same question! @whuber and anyone familiar with ArcGIS, would you mind walking me through the Arc function that does this? Thanks!!!


What might cause "python.exe has stopped working" when closing ArcPy script?

I created a script that take a .tab file and join it to a shapefile. The script works perfectly but when it finish, it gives me an unhandled exception which crashes python. I dont know what might be causing it but i think i have identify where it's happening. I wanted to ask if someone could help me identify the problem so i can fix it. Im using arcpy 10.1 and python 2.7. I think its happening in this part. For all the variables i get values prior this portion of the script. I do the same calculation for other fields so this code repeats itself but for different columns               #Cerate and calculate new fields             #Population             if(p == 1):                 pop_calc = '!pop_20{}!-!pop_2010!'.format(year)                 arcpy.AddField_management(outFeature, "pop_diff","LONG",15,"","","","")                 arcpy.CalculateField_management(outFeature,'pop_diff',pop_calc,"PYTHON_9.3")                 arcpy.AddField_management(outFeature, "popShare","DOUBLE",15,10,"","","")                 popSharedTotal = 0                             popFields = 'pop_diff'                 with arcpy.da.SearchCursor(fc, popFields)as cursor:                     for row in cursor:                         popSharedTotal = row[0] + popSharedTotal                                     arcpy.AddField_management(outFeature, 'temp',"LONG",15,"","","","")                 arcpy.CalculateField_management(outFeature,'temp',popSharedTotal,"PYTHON_9.3")                 arcpy.CalculateField_management(outFeature,'popShare','[pop_diff]/[temp]',"VB")                 arcpy.DeleteField_management(outFeature,'temp')      i can provide the entire script if needed but by commenting sections, this portion is what makes python not close correctly when done with the script. ![enter image description here](http://i.stack.imgur.com/7YIZZ.jpg)


PostGIS 2.0 function returns pseudo-type record rather than table

I'm writing a PL/pgSQL function to take a geography column and output a fishnet that bounds the extent of the shapes. I've tried to emulate the examples in docs and tutorials, but the function returns a pseudo-type result, not a usable table.               CREATE OR REPLACE FUNCTION ST_Fishnet(             nrow integer,              ncol integer,             geo_table varchar,             geom_column varchar)     RETURNS Table( ids text, geom geometry)     AS $$     DECLARE         collected_geom geometry;         xmin numeric;         xmax numeric;         ymin numeric;         ymax numeric;         xsize numeric;         ysize numeric;     BEGIN         EXECUTE 'SELECT st_collect("'||$4||'") FROM "'||$3||'"' INTO collected_geom;         xmax := st_xmin(collected_geom);         xmin := st_xmax(collected_geom);         ymin := st_ymin(collected_geom);         ymax := st_ymax(collected_geom);         xsize := abs(xmax - xmin) / $2;         ysize := abs(ymax - ymin) / $1;         return query              SELECT                 i+1||'-'||j+1 as ids,                 ST_Translate(cell, j * xsize + xmax, i * ysize + ymin) AS geom             FROM                      generate_series(0, $1 - 1) AS i,                     generate_series(0, $2 - 1) AS j,                     (SELECT ('POLYGON((0 0, 0 '||ysize||', '||xsize||' '||ysize||', '||xsize||' 0,0 0))')::geometry AS cell) AS temp;     END     $$ LANGUAGE plpgsql;      But while my output should have two distinct columns, ids and the geom, I'm getting pseudo-type record that looks like: (id, geom) Very much appreciate any pointers as to what I'm missing. Thanks.


Alternatives to Google Maps on Android Phone

Android phone has Google maps as its stock/default Maps, POI and Navigation app. What are other options that i have which can be used instead of Google Maps? One Obvious answer is OSMAnd. OSMAnd has some cool features and also offline POI search and Navigation. Similarly from the talks in 2013 SOTM i discovered Hikar which has some cool integration of routing and augmented reality. I was just interested to know what other such apps are out there? I know that there is a similar post for Android but the list there is mainly for data collection apps. What i am curious is on the application side. Apps that have Simple map viewing POI search and query, routing and navigation.


How to specify column names with v.in.ascii

I have managed to import a CSV file into a points vector file using GRASS v.in.ascii               v.in.ascii --o input=test1.csv output=test2 format=point fs=, skip=1 x=2 y=3 z=0 cat=0      This is test1.csv ...               p,east,north,band     TD11 3TX,375749,662231,1     AB54 7TH,362375,852448,1     ....      However the column names in the .DBF are not the names in my CSV (they become: str_1, int_1 etc). I though maybe the 'columns' option of the command might help. The manual isn't very clear. It says..               For example: 'x double precision, y double precision, cat int, name varchar(10)'      1)What is 'x'. 'y', 'name' etc? Is this a) the column names in the CSV file or b) new column names that will be matched from left to right with the columns in the CSV? 2) If (b) does it include the new 'cat' column (if you use the 'cat=0'option). I tried this....               v.in.ascii --o input=test1.csv output=test2 format=point fs=, skip=1 x=2 y=3 z=0 cat=0 columns='cat int, p varchar(8), east int, north int, band int'      But I get this error...               Sorry <int,> is not a valid option     Sorry <p> is not a valid option     Sorry <varchar(8),> is not a valid option      I thought maybe it didnt like the apostrophe so I changed to dbl quote marks - but then got other errors so I gave up experimenting until I understand the format of the command. I'm on Windows7 64 bit, 4GB RAM, GRASS 6.4.250870M (2012) Thanks


How to automatically export multiple maps with quantile symbology?

I am a relatively new ArcGIS user and I have a question about automating a tedious join/symbology classification/export operation. I have a very simple shapefile to which I join a bunch of fields. I then need to have these new fields symbolized with a specific color ramp using a five quantile classification and then exported to a JPG at a certain resolution with a specific filename. First of all, is this even possible? If so, is it possible to sort of "preload" the software manually with the layers and page layout I want and then have it loop in such a way that it merely changes the symbology field value and exports, over and over? There is a legend but since the labels will remain the same (quantile 1, quantile 2, etc) I can just leave that as a hardcoded graphic. I'm envisioning something like this: I add my two layers (one is a fill-free layer of US states to serve as an outline for the other layer) and then join one big file to the layer that needs symbology. This program I don't know how to write would then loop through and change the symbology field value to the next column I've added, and changes the classification back to a 5-class quantile (it always reverts to Jenks for some reason). Then since the legend is hardcoded it just needs to save this new map of field Beta1 as a jpg and then switch to Beta2, Beta3, etc. Does this make sense? Is it possible? Is it really complicated? Thanks for your help!


How to specify unit of measurement when accessing Geometry() object's 'length' attribute?

Using the CalculateField_management tool, one can specify the unit of measurement when calculating shape length:               #Calculate polyline lengths in miles     polylines = "C:\sampleShape.shp"     arcpy.CalculateField_management(polylines, "shapeLen", "!Shape.length@MILES!", "PYTHON_9.3")      I'd like to do the same thing within a cursor using the 'SHAPE@LENGTH' of each feature, with the length returned in a unit of my choosing:               #hypothetical example 1     with arcpy.da.UpdateCursor(polylines, field_names=["SHAPE@LENGTH.FEET", "shapeLen"]) as upCurs:         for row in upCurs:             row[1] = row[0]             upCurs.updateRow(row)      Or possibly by using the (less efficient) @SHAPE geometry object?:               #hypothetical example 2     with arcpy.da.UpdateCursor(polylines, field_names=["@SHAPE", "shapeLen"]) as upCurs:         for row in upCurs:             row[1] = row[0].length@FEET             upCurs.updateRow(row)      Is there some way to do this?


Tagging polygons within larger polygons (spatial join)

another QGIS newbie here. I have a number of smaller polygons which perfectly aggregate to a larger polygon. I want to "tag" the smaller polygons with the ID of the larger polygon they make up. Unfortunately when I used spatial join many of the smaller polygons were incorrectly joined to the large polygon they were adjacent to - rather than the large polygon they were contained by (all polygons are contiguous). The larger polygons were created using "dissolve" from the smaller polygons, so there shouldn't be a problem in compatibility of the geometries. In MapInfo you would use a spatial join term like "contained by" or "within" for this. What is the equivalent in QGIS to restrict the spatial join to large polygons the smaller polygon is entirely, or at least primarily, within? PS I have managed to partially work around this by creating centroids and then tagging them. However, that is somewhat unsatisfactory, and doesn't work where the polygons are strange shapes, meaning the centroid is actually outside the polygon.


Get boundary of raster image as polygon in ArcGIS 10

I have a rectangular raster image in ArcGIS. My question is: how can I produce a polygon which is just the extent of the raster image? That is, I want to have a polygon layer with a single quadrilateral which is the edge of the image. I've tried simply doing a Raster->Polygon conversion, but this tries to use the data in the image to generate the outline - all I want is the outline of the edge of the image. Any ideas?


How to divide polyline into 1-mile increments?

I have a river shapefile that I need to break up into 1-mile increments. The polyline is 53 miles in distance, so I should I have about 53 mile markers as a result. I have tried the Divide tool, but then it doesn't show if it did anything afterwards. Should I manually use the Split tool to split the river at every mile increment, or is there a better way to do this? I am creating a river mile map.


Interpolation without a point layer in QGIS

I have a vector layer with incidence data (i.e. frequencies) and I made a graded color map from this using the above frequencies. Now I am looking forward to creating an interpolated (kriging) map from the above frequencies. Is there a method to create such interpolated map from my incidence data? (or else is it possible to create a interpolated map with out a point layer?) Thanks.


Create an optimized point layer derived from a road layer so that the driving distance between each point is x

Consider a classic state-wide or country-wide roadway network. I want to create a point layer, where each point is on the roadway network. This point layer will have each point separated by its nearest neighbour by x km or y minutes. As an addendum, Is it possible to upgrade the algorithm, so that the distance between any point and all its nearest neighbours is the same or as close to the same as possible and there for having the algorithm figure out what that magic distance is given a fixed number of points. I'm open to suggestions on how to solve this problem. I have access to ArcGIS 9.3 (without network analyst), qgis 1.8 and postgis, python, and R. Most of my data is in SHP. **EDIT** The goal behind this exercise is to determine how far is to locate antennas, infrastructure so that it is equidistant from all points on the network **EDIT 2 to reflectwhuber's comment** I am trying to plan for proposed facility locations for a certain type of equipment on the highway network, in such a way that the driving distance distance between each one is x minutes, or the driving distances is y km.


What operations do the GPS recievers perform after capturing signal from Satellite?

What are the operations on the signals recieved by a GPS reciever ? How does it process them towards achieving a position fix ? I need explanation with the decoding and correlating part of the signal. How does it determine the position of a satellite when the signal it is recieving from many satellite is mixed up with the signals from other satellites in the wireless medium . I'd be glad if you point me to a good article/link that explains this well. Thanks


Where can I get country, region, and city data?

I need the names of countries, country regions and cities of the world. Where do I get that kind of information?


Shapefile wrong visualization

Just passed from 1.8 to 2.0.1. Opening a previous format project, some layers are visualized only at [each time] different scale; visualized at 1:313593 only if "zoomed at layer extension", otherwise never below 1:334000. any idea about this kind of visualisation problem?


Great-circle lines in Equirectangular projection

Just to check that I'm on the right track: Are all great-circles on the sphere and in equirectangular projection (i.e. latitude, longitude pairs) either:   1. meridians (i.e. going pole to pole)   2. of the form `tan latitude = sin360(longitude + rotation) * amplitude + offset` (with additional restrictions on the offset/amplitude combinations -- obviously, all great circle paths with an amplitude of 0 also have offset 0 - the equator). Or are there great-circle paths that do not fit into this scheme (again, only in a longitude-latitude coordinate system, not on other map projections). Note: I added the `tan` above after posting the question, in a reaction to whubers excellent reply. It turns out that `offset` then always is 0.


Open Trip Planner What is the correct url to use?

I have just built and installed Open Trip Planner. I am quite confused as to how to acess the rest api. Following This example, it says I should be able to make a rest query on my api at               http://otp.markware.net:9090/otp-rest-servlet/ws/metadata      but I get a Grizzly Not Found.saying the path does not exist. I can, however, get an XML Response back from               http://otp.markware.net:9090/otp      which is               <serverInfo>     <serverVersion>     <version>1.0.0-SNAPSHOT</version>     <major>1</major>     <minor>0</minor>     <incremental>0</incremental>     <qualifier>SNAPSHOT</qualifier>     <commit>c3ab14e3632d5c875d031687a8eb58bcb57f12b3</commit>     <describe>opentripplanner-0.9.1-2594-gc3ab14e</describe>     <commit_time>30.06.2014 @ 23:35:13 UTC</commit_time>     <build_time>06.07.2014 @ 04:21:20 UTC</build_time>     </serverVersion>     <cpuName>Intel(R) Xeon(R) CPU E5606 @ 2.13GHz</cpuName>     <nCores>8</nCores>     </serverInfo>      The documentation simply states to check out `http://otp.markware.net:9090/` after starting the server, I just get a blank page What is the correct URL to use for the version I have built for the Web interface? This is the Log showing the 404                    java -Xmx6G -jar target/otp.jar -p 9090 --server         07:33:24.405 INFO (GraphServiceImpl.java:86) attempting to automatically register routerIds []         07:33:24.410 INFO (GraphServiceImpl.java:87) graph files will be sought in paths relative to /var/otp/graphs         07:33:24.410 INFO (GraphServiceFileImpl.java:232) registering routerId ''         07:33:24.411 INFO (GraphServiceFileImpl.java:172) Loading graph...         07:33:24.421 INFO (MavenVersion.java:53) Parsed Maven artifact version: 1.0.0-SNAPSHOT => MavenVersion(1, 0, 0, SNAPSHOT, c3ab14e3632d5c875d031687a8eb58bcb57f12b3) UID=-1000000         07:33:24.694 INFO (Graph.java:658) Graph version: MavenVersion(1, 0, 0, SNAPSHOT, c3ab14e3632d5c875d031687a8eb58bcb57f12b3)         07:33:24.695 INFO (Graph.java:659) OTP version:   MavenVersion(1, 0, 0, SNAPSHOT, c3ab14e3632d5c875d031687a8eb58bcb57f12b3)         07:33:24.695 INFO (Graph.java:676) This graph was built with the currently running version and commit of OTP.         07:35:46.021 INFO (Graph.java:628) Main graph read. |V|=892461 |E|=2193825         07:35:53.572 INFO (GraphIndex.java:88) Indexing graph...         07:35:56.242 INFO (GraphIndex.java:137) Done indexing graph.         07:35:56.249 INFO (GraphUpdaterConfigurator.java:69) Using configurations:         07:35:56.249 INFO (OTPServer.java:65) Wiring up and configuring server.         07:35:56.265 INFO (GrizzlyServer.java:48) Starting OTP Grizzly server on ports 9090 (HTTP) and 8081 (HTTPS) of interface 0.0.0.0         07:35:56.266 INFO (GrizzlyServer.java:50) Base path is X, graphs are at /var/otp/graphs         07:35:56.897 INFO (ApplicationHandler.java:353) Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...         07:35:58.483 WARN (PropertiesHelper.java:321) There is no way how to transform value "true" [java.lang.Boolean] to type [java.lang.String].         07:35:59.397 INFO (NetworkListener.java:721) Started listener bound to [0.0.0.0:9090]         07:35:59.409 INFO (NetworkListener.java:721) Started listener bound to [0.0.0.0:8081]         07:35:59.417 INFO (HttpServer.java:298) [HttpServer] Started.         07:35:59.417 INFO (GrizzlyServer.java:108) Grizzly server running.         javax.ws.rs.NotFoundException: HTTP 404 Not Found                 at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:266)                 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)                 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)                 at org.glassfish.jersey.internal.Errors.process(Errors.java:315)                 at org.glassfish.jersey.internal.Errors.process(Errors.java:297)                 at org.glassfish.jersey.internal.Errors.process(Errors.java:267)                 at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)                 at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:252)                 at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1023)                 at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:364)                 at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:217)                 at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)                 at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)                 at java.lang.Thread.run(Thread.java:745)


How to assign values to field using if/then logic involving multiple fields?

I want to run a field calculation on a string field named [territory] that first looks at a string field [majr_src] to see if there is a value other than "NONE", if so [territory] = [majr_src]. If not, it looks at field [top_pct] to see if it is >30, if so [territory] is assigned the value of another string field called [Top_src]. Finally, if neither of these conditions are met it assigns [Territory] the value from a final string field called [Close_src] I have: Pre-Logic Script Code:               def selectter(n):      if [Majr_src] != "NONE":       n = "[Majr_src]"      else:       if [Top_pct] > 30:        n = "[Top_src]"       else:        n = "[Close_src]"      and               Territory =      selectter([Territory])      any help would be greatly appreciated. *Note I am on Arc 10.1


Link two Google Earth frames to mirror each other

I have a webpage with two Google Earth Frames side by side. Is there a way to link the two together so when I zoom or pan in one frame, it is mirrored in the other? Thanks.


OGRFeature::DestroyFeature fails

I am using OGR to read features from a shape file; when the feature is destroyed I am getting an error 0xC0000005: Access violation reading location 0xffffffffffffffff. This secton of the code looks pointless but is a simplification of a larger section showing where the error is occuring. I have removed lines of code that could interfere with the objects and I am still getting the same error message.               OGRDataSource *hDS;     OGRSFDriver   *Driver;     OGRFeature    *pFeat;          hDS = OGRSFDriverRegistrar::Open(BasePath,FALSE,&Driver);     OGRLayer *Layer = hDS->GetLayerByName(ThisLayerName);     Layer->ResetReading();          while ((pFeat = Layer->GetNextFeature()) != NULL)     {         // I did intend to do something here         OGRFeature::DestroyFeature(pFeat); // error occurs here     }     OGRDataSource::DestroyDataSource(hDS);      I am using OGR2OGR source as a reference on how to read an OGR datasource. I can see in the reference that each feature returned is destroyed before grabbing a new one until the last feature and the datasource is destroyed thereafter. I am using GDAL version 1.10 64bit on Windows 7 64bit; I have tried previous versions 1.9.2 and 1.8 and they all return the same error. I am using Visual C++ if that makes any difference.


A better way to auto pan to a feature in the attribute table?

I don't know if this question has been asked before but I took a quick look and didn't see it so I'll go ahead and ask... **I'm looking for a way to auto pan to the next feature in a data-set with one click**. I just used DataReviewer and when it brings back a list of attributes that need fixing it opens up a "browse features window." This window allows you to simply click the next arrow to pan to the next broken feature.It is super helpful/useful so why isn't it available in ArcMap for all attributes. I find that I have to manually look at each entry for QA/QC and this would save me a lot of time. Rather then right clicking, pan to feature, fix problem, lose place, etc. If this already a feature, an extension or a toolbox feature it would be very helpful if anyone knew a solution. Thanks in advance!


Setting Pixels Band Values

I have a single band RASTER of an area, in which I want to create 360 bands and then assign those bands values from a table. Is there a process for doing this?


Which are the differences between using javascript openlayer and gwt-openlayer API?

I am about creating a web app which should use openlayer API, but I would like to use GWT too. So I have the following questions:   * Is it the same to use GWT-openlayers API in terms of functionality and versions of the API?   * How does it work? Is it really the same API at the background or are they two different versions?   * Is the information I find for javascript API useful if I code using GWT? Thank you!


Filtering a loaded kml file in OpenLayers

I'm trying to create an interactive search engine (for finding event tickets) of which one of its features is a visual map that shows related venues using OpenLayers. I have a plethora of venues (3000+) in a kml file that I would like to selectively show a filtered subsection of. Below is the code I have but when I try to run it has a JavaScript error. Running firebug and chrome developer tools makes me think that it is not getting passed the parameters I give because it says that the variables are null. However, I cannot figure out why they are not getting passed. Any insight is greatly appreciated.               var map, drawControls, selectControl, selectedFeature, select;     $('#kml').load('venuesComplete.kml');     kml=$('#kml').html();     function showVenues(state, city, venue){         filterStrategy = new OpenLayers.Strategy.Filter({});         var kmllayer = new OpenLayers.Layer.Vector("KML", {         strategies: [filterStrategy,             new OpenLayers.Strategy.Fixed()],         protocol: new OpenLayers.Protocol.HTTP({             url: "venuesComplete.kml",             format: new OpenLayers.Format.KML({             extractStyles: true,             extractAttributes: true             })         })         });         select = new OpenLayers.Control.SelectFeature(kmllayer);         kmllayer.events.on({             "featureselected": onFeatureSelect,             "featureunselected": onFeatureUnselect         });         map.addControl(select);         select.activate();         filter = new OpenLayers.Filter.Comparison({             type: OpenLayers.Filter.Comparison.LIKE,             property: "",             value: ""         });         function clearFilter(){             filterStrategy.setFilter(null);         }         function setFilter(property, value){             filter.value = value;             filter.property = property;             filterStrategy.setFilter(filter);         }         var vector_style = new OpenLayers.Style();         if(venue!=""){             setFilter('name', venue);         }else if(city!=""){             setFilter('description', city);         }else if(state!=""){             setFilter('description', state);         }         map.addLayer(kmllayer);         function onPopupClose(evt) {             select.unselectAll();         }         function onFeatureSelect(event) {             var feature = event.feature;             var selectedFeature = feature;             var popup = new OpenLayers.Popup.FramedCloud("chicken",                  feature.geometry.getBounds().getCenterLonLat(),                 new OpenLayers.Size(100,100),                 "
"+feature.attributes.name + "
" + feature.attributes.description +'
'+feature.attributes,                  null,                  true,                  onPopupClose             );             document.getElementById('venueName').value=feature.attributes.name;             document.getElementById("output").innerHTML=event.feature.id;             feature.popup = popup;             map.addPopup(popup);         }         function onFeatureUnselect(event) {             var feature = event.feature;             if(feature.popup) {                 map.removePopup(feature.popup);                 feature.popup.destroy();                 delete feature.popup;             }         }     }     function init() {         map = new OpenLayers.Map('map');         var google_map_layer = new OpenLayers.Layer.Google(             'Google Map Layer',             {type: google.maps.MapTypeId.HYBRID}         );         map.addLayer(google_map_layer);         state="";         state+=document.getElementById('stateProvDesc').value;         city="";         city+=document.getElementById('cityZip').value;         venue="";         venue+=document.getElementById('venueName').value;         showVenues(state,city,'Michie Stadium');         map.addControl(new OpenLayers.Control.LayerSwitcher({}));         map.zoomToMaxExtent();          }


Which datasets are best used to construct minimal reproducible examples for ArcGIS?

I would like to construct a minimal reproducible example to illustrate a question here on `gis.stackexchange.com`. Ideally, that example would reference data that's easily accessible to any ArcGIS user, without requiring that they download data from some external site. Are there example feature classes (and/or data of other types) that I can rely on every user having access to as part of their ArcGIS installation? If so, are some of those frequently used in examples, and so familiar to many users?


Polygons missing from GetMap when stroke symbolizer is absent from SLD

We have an interesting scenario with one of our layers being served via GeoServer 2.2.3. The data is stored in a PostGIS DB. Certain GetMap requests were returning empty tiles, but only at certain zoom levels. In the end, we discovered a work-around that is more confusing than enlightening. The original SLD contained some simple rules, each of which had a filter and a symbolizer. The symbolizer simply defined a fill color. By modifying the symbolizer to include a stroke value as well as the fill color the issue was resolved. At no point during debugging this did the GeoServer or Tomcat logs show any kind of error. My question is, WHY!!! Here is a tile request using the new SLD that returns what one would expect: http://mapservices.nrel.gov/wms?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=re_atlas%3Aus_solar_all_120512&STYLES=reatlas_us_tilt_total_old&FORMAT=image%2Fpng&TRANSPARENT=true&HEIGHT=256&WIDTH=256&SRS=EPSG%3A3857&BBOX=-15028131.257091932,5009377.085697316,-10018754.171394622,10018754.171394628 And here is the same tile request with the original stroke-less SLD specified... notice that the corner of Washington state is missing from the response to this one: http://mapservices.nrel.gov/wms?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=re_atlas%3Aus_solar_all_120512&STYLES=reatlas_us_tilt_total&FORMAT=image%2Fpng&TRANSPARENT=true&HEIGHT=256&WIDTH=256&SRS=EPSG%3A3857&BBOX=-15028131.257091932,5009377.085697316,-10018754.171394622,10018754.171394628 Here are some additional tidbits:   * All GetMap requests in the layer's native 4326 was always succeeding perfectly, regardless of zoom   * The data is a simple grid covering the US, incl. Alaska and Hawaii   * Zoom levels 0,1,2 were at fault, all closer zooms were fine. Of course the GetMap request doesn't know anything about zoom levels, but this essentially expresses the fact that the tile was being generated for a bbox of a greater extent.   * The missing tiles were basically the upper half of the continental US. Alaska and Hawaii always showed up. When zoomed all the way out to a global extent, the entire continental US was blank. Again Alaska and Hawaii just fine.   * Even a super simple SLD (no filters, just a single symbolizer to paint all polygons) would exhibit the same strange behavior until a stroke component is added in Any thoughts?


Good resources on geocoding algorithms

Do you know of any good resources on geocoding algorithms? I am particularly interested in address query parsing, including matching and weighting parts of the query, dealing with misspellings and variations, as well as in details about the physical data storage (e.g. schemas for direct relational database queries, approaches to data indexing etc.). I have studied some documents about ArcGIS 10 geocoding, but they touch the actual implementation details just a little. Detailed documentation of other high-quality production implementations could also be helpful. The more technical the better. Theoretical algorithm papers are also great. Thanks.


Self organizing maps with Postgis

I am trying to plot hot regions. It's reorganizing mapping We have a table "product" with three attributes : lat   log   n_items: number of items that we sell I'd like to group point in one polygon (Clustering spatial points ) Following the post presented here: Spatial clustering with PostGIS I am trying to use kmeans-postgresql               SELECT kmeans, count(*)     FROM (       SELECT kmeans(n_items) OVER (), geom       FROM product      ) AS ksub     GROUP BY kmeans     ORDER BY kmeans;      But i am not getting the desired results ! How can I reorganize areas to distinguish the hot polygones.


Using interactivity from multiple layers produced in TileMill in a single map

I have a MapBox.js map with several layers here . I would like to be able to use TileMill's teaser and full interactivity on a few of the layers, but I have only been able to accomplish this for a single layer. How can I have interactivty for multiple layers in this map? The code for the map is here. I saw an example from MapBox.js but I don't know exactly how to implement it into my HTML code.


Cannot install ArcGIS for Desktop 10.2 following install guide on Windows 8

I'm trying to install ArcGIS for DEsktop 10.2, I get to the following screen: ![arcgis for desktop install screenshot](http://i.stack.imgur.com/AwuBj.jpg) But any of the instructions highlighted in blue do not open, the mouse hovers over them changing their colour to darker blue as if you can click and open, but nothing opens. I can't go through with the install. I thought there might be a problem with the download so I downloaded the file 'Arc GIS for desktop 10.2, from esri online again, using my authorisation codes. The file is 2GB. After downloading the program for install, the only .exe file is written ESRI.exe. I click this and receive the screen as shown in the screenshot above in my post. Both times I have not benn able to continue with the install as not setup links open. There has never been another version of ArcGIS for desktop on this computer. I have CORE i7, 64 bit, Windows 8, 16GB RAM. I did simulataneously download the ArcGIS desktop tutorial and the DBMS files, I didn't run any of those. I read the .net 35 has to be installed first, when I ran that, no options opened in any windows, other than to say can this program modify your computer? to which I answered yes. Here is a screen shot of all the downloads I did, I just want to get the ArcGIS for desktop going. I'm completely inexperienced: ![ArcGIS desktop 10.2 downloads](http://i.stack.imgur.com/MmKqe.jpg)


How can I save and re-apply symbology properties for a classified raster in ArcMap 10.2?

I have a classified raster which has the desired symbology configured in ArcMap, and I want to apply this symbology to other similar rasters. So I use the Save option on the Symbology tab, intending to save a *.lyr file - but the only option is to create a Raster Function Template XML file. ![enter image description here](http://i.stack.imgur.com/SCkOJ.png) When I attempt to import this symbology back onto the same layer, the only option is to import a *.lyr file: ![enter image description here](http://i.stack.imgur.com/Xq434.png) This is preventing me from applying this saved symbology onto multiple layers. How can the symbology Save and Import functions show different options for the same layer? This sounds like a bug, but I'm hoping for some workarounds/suggestions. thanks


Problems rendering tilestache served mbtiles in QGIS

I came across Geoffery Hing's walk through on using Tilestache to serve up mbtiles to QGIS. I followed the configuration and I was able to view tiles in the browser without any problems. However, when I try to load the XML in QGIS, all I get is an image that looks roughly like scrambled cable from the days of yore: ![enter image description here](http://i.stack.imgur.com/2MVuY.png) My tilestache.xml is as follows:               <GDAL_WMS>         <Service name="TMS">             <ServerUrl>http://127.0.0.1:8080/${z}/${x}/${y}.png</ServerUrl>         </Service>         <DataWindow>             <UpperLeftX>-73.009</UpperLeftX>             <UpperLeftY>41.3578</UpperLeftY>             <LowerRightX>-72.8394</LowerRightX>             <LowerRightY>41.2355</LowerRightY>             <TileLevel>13</TileLevel>             <TileCountX>1</TileCountX>             <TileCountY>1</TileCountY>             <YOrigin>top</YOrigin>         </DataWindow>         <Projection>EPSG:900913</Projection>         <BlockSizeX>256</BlockSizeX>         <BlockSizeY>256</BlockSizeY>         <BandsCount>3</BandsCount>         <Cache />     </GDAL_WMS>      I have a hunch that this is a problem with tilestache and perhaps its dependencies. GDAL is version 1.9, which should be sufficient. I have no problem loading tiles from openstreet map using this XML.               <GDAL_WMS>         <Service name="TMS">             <ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl>         </Service>         <DataWindow>             <UpperLeftX>-20037508.34</UpperLeftX>             <UpperLeftY>20037508.34</UpperLeftY>             <LowerRightX>20037508.34</LowerRightX>             <LowerRightY>-20037508.34</LowerRightY>             <TileLevel>18</TileLevel>             <TileCountX>1</TileCountX>             <TileCountY>1</TileCountY>             <YOrigin>top</YOrigin>         </DataWindow>         <Projection>EPSG:900913</Projection>         <BlockSizeX>256</BlockSizeX>         <BlockSizeY>256</BlockSizeY>         <BandsCount>3</BandsCount>         <Cache />     </GDAL_WMS>      When I run gdalinfo on the mbtiles, I get an error saying that they are not a recognized file format. I suspect this is at the root of my problem, but I am at a loss as to how to fix this.