title: What's the convention for "upside down" labels?

text: I have line features that are to be used for labels. These lines are correctly oriented(rotated) and positioned such that text placed on them should give a good cartographic output. Compare the below two images and their labels. In particular the word "Waverton" and its orientation in relation to "Avenue". !["Wrong" labelling](http://i.stack.imgur.com/Kaumi.jpg) !["Correct" Label](http://i.stack.imgur.com/HVMSd.jpg) The left is what all labelling engines seem to produce by default. The right is what it "should" look like according to the Ordnance Survey. So my main question is - Which one is correct and why? What is the cartographic convention here? I ask this because out of the 5 labelling engines split between: QGIS (has two), MapInfo and ArcGIS (has two), only Maplex has the option to allow the user to _insist_ the label follow the orientation of the line. The others all assume that upside down text is undesirable and automatically "correct" it. (Maps: © Crown Copyright and database right 2012. Ordnance Survey 100019520.)


title: Howto change OpenLayers BBOX request projection?

text: My map uses EPSG:900913 projection on the map. All coördinates in the database are stored in the 'normal' google format / GPS coordinates (WGS84). For instance, if you save a new location..Before I submit coordinates back to the server they get transformed like               mapPosition = OpenLayers.Projection.transform({             x: lon,             y: lat         }, new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));      The OpenLayers BBOX strategy makes request like:               ?bbox=497590.72212427,6707253.6848049,748304.17486475,6814265.5243893,EPSG:900913      How do I change this so the server gets the bounding coordinates in ESPG:4326?? That would be much better then transforming the coordinates serverside. **EDIT** I tried to create a function that appends an extra set of bounds to the request URL:               this.layer = new OpenLayers.Layer.Vector("POI",{             strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1})],             protocol: new OpenLayers.Protocol.Script({                 url: 'http://localhost/tests/poi', //this.get_poi_url,                 params: {                     bounds: this.get_poi_url()                 },                 callbackKey: 'jsoncallback',                 srsInBBOX: true             }),         });         tbMap.map.addLayers([this.layer]);      and the function:               get_poi_url: function(bounds) {         var bounds = tbMap.map.getExtent();         console.log(bounds);         bounds = bounds.clone().transform(             config.projection, config.displayProjection         );         console.log(bounds); // OK, it works, I want these coordinates         var url = ""             + bounds.top + ','             + bounds.left + ','             + bounds.bottom + ','             + bounds.right;         return url;     }      The problem is that this set of extra parameters (or if I would build the URL like this) doesn't get an update since it is set with the layer creation. So If you move the map, it would still transmit the original bounds.


title: How to embed ESRI maps on my website

text: I've got a website where I'd like to insert maps with some placemarks (restaurants, points of interest, ...). I'm tired of Google Maps and like to use ESRI basemaps. Is it possible to do this? I'd like to create these maps directly from my webpages (with JavaScript) and without embeding ArcGIS online maps (I suppose this would require to create the map in 'arcgis.com' before). Is it possible with any ESRI JavaScript API? Thank you very much.


title: How to Automate ArcGIS map production?

text: I am currently working with high volume ArcGIS (9.3.1 & 10) production of PDF files, part of the companies requirement is that a database (Access 2003) needs filling out with each map, this needs an automated (sequential) map number, the mxd location and the user (3 digit reference). This also needs to be filled on the map template in the specified fields of the map. I have seen some python script for exporting the layers of a map to a table, is there a way that I can automate my process so that I can fill the "username" field on the map and then have ArcGIS populate the "figure number" field with the next sequential number and then populate a table which I can link to the DB which my company uses? This would make my life a lot easier and I can see how it is possible though my python is letting me down :( Thanks for any advice :)


title: Code to calculate elevation profile along line from a DEM

text: Given a DEM (Digital Elevation Model) say in and a line (x1,y1) --> (x2,y2) (paired coordinates (x,y)), how can one calculate the elevation profile or cross-section projected on that line ? I am looking for open source code that i can use in my project or pseudo-code that I can use as a guide.


title: Calculate Percent coverage using another raster, with dif resolution and orientation

text: I have a 0.5 meter raster that defines presence or absence (cells are either 1 or 0). I have another 5 meter raster, which I created. I would like to calculate a percent coverage of the underlying 0.5 meter raster and pull that value into the corresponding cell in the 5-meter raster. The rasters don't line up and cannot be adjusted. * * * One thing I now realize is that the cells are slightly less than 0.5 meters, .46999 to be exact. I ran block statistics, using a 10.638298 X 10.638298 rectangle (5/.469999), with snap raster set to, the slightly offset, 5-meter raster. That's taking a while to run, but I'm guessing that it won't work quite right. I also have a 5-meter polygon fishnet and I could also convert the .46999 meter forest cover raster into a polygon feature. Then I could calculate the area within each 5-meter 'cell'.


title: Send Geometry to query using ArcGIS REST API

text: I am writing a windows console app in VS 2010 to perform an overlay using the ArcGIS Rest API. My first REST query returns information about the geometry for a specific feature. I then want to send that geometry to another feature class, to return data about the shared area. I am using the DeserializeObject method to convert the query results to a Dictionary. How do I take the geometry from that result set and post it to a new query? **Update:** What if I user the JavaScriptSerializer.Serialize method on the geometry string? Is there a way to pass the resulting JSON string to the REST service call? I already tried just assigning it to the "geometry" value in the querystring, but that failed.


title: arcpy "The table name is invalid"

text: I wrote a script that, ideally, loads raw .las (LiDAR data) files into a geodatabase, then creates a terrain from the multipoint files that are created. When I run the script though I get: > ExecuteError: ERROR 000210: Cannot create output > C:\Users\peter\Desktop\test.gdb\bare_earth\1las The table name is invalid. > Failed to execute (LASToMultipoint) So far the only thing I can figure out is that Windows 7 keeps changing my folder permissions to read-only, but I can still manually create, edit, and delete in the directories.               import os     import arcpy, math, glob     from arcpy import env          arcpy.CheckOutExtension("3D")     arcpy.env.overwriteOutput = True     #make workspace in memory     arcpy.env.workspace = "in_memory"          #define parameters using GetParameter in ArcMap     geodatabase = arcpy.GetParameter(0)         #0)input Geodatabase     outfeaturedataset = arcpy.GetParameter(1)   #1)Desired Name for the feature class     projection = arcpy.GetParameter(2)          #2)coordinate system     terrain_name = arcpy.GetParameter(3)        #3)Name of the Terrain     class_code = arcpy.GetParameter(4)          #4) the return class code to use     lasdirectory = arcpy.GetParameter(5)        #5) directory to get las data in          #designate directory where .las files are located     os.chdir (lasdirectory)          created_FC_tool = arcpy.CreateFeatureDataset_management(geodatabase, outfeaturedataset, projection)     created_FC = created_FC_tool.getOutput(0)     #Create a Terrain               arcpy.CreateTerrain_3d (created_FC, terrain_name, 1.24605815948, 50000, '', 'WINDOWSIZE', 'ZMIN', 'NONE', 1)          output_terrain = os.path.join (created_FC, terrain_name)     arcpy.AddTerrainPyramidLevel_3d (output_terrain, 'WINDOWSIZE', '2.5 1000; 5 2000; 10 4000; 20 8000; 40 16000')     #process the .las file and add to the feature dataset and terrain                    for LASfiles in glob.glob("*.las"):         print LASfiles         pointinfo = "point_file_information"         #Get Pointfile information         arcpy.PointFileInformation_3d(LASfiles, pointinfo, "LAS", "", projection)              #get average point spacing variable         pointspacing = arcpy.SearchCursor (pointinfo)         field = "Pt_Spacing"         for row in pointspacing:             avg_space = (row.getValue(field))         print avg_space              #convert las  to multipoint              #create lable for multipoint file         listlable = list(LASfiles)         del listlable[-4]         multipointlable = ''.join(listlable)         print multipointlable              print created_FC         outputPlable = os.path.join (created_FC, multipointlable)         arcpy.LASToMultipoint_3d(LASfiles, outputPlable, 1.5, class_code, "", "INTENSITY", projection, "las", 1)                        print outputPlable              outputPlable_parameters = outputPlable + ' Shape masspoints 1 0 40 true false R06305328las_embed <None> false'         print outputPlable_parameters         arcpy.AddFeatureClassToTerrain_3d (output_terrain, outputPlable_parameters)          #Build the terrain     arcpy.BuildTerrain_3d (output_terrain)      Any help is greatly appreciated, if it is a Windows 7 problem I don't know what I'm going to do as my work computer is locked down like Fort Knox by our help desk :( Thanks in advance, Pete


title: Shapefile to X3D

text: Does anyone know of an effective workflow to convert 3d-enabled shapefiles to X3D format? I have several projects containing anywhere from 10 to 5000 features (building sections) that I would like to convert into X3D format. The shapefiles in question have topheight and baseheight attribute fields. I have read these: How can a 3D model of a building be displayed in a web-browser? Georeferenced 3D Model Import I have browsed this list of applications and resources to see what is available for import/export/conversion. I have experimented with ArcGlobe, exporting my shapes to COLLADA using Layer 3D to Feature Class and Multipatch to Collada. This tool limited me to exporting building sections or contiguous building sections (whole buildings). I then used Meshlab to convert COLLADA to 3DX. The only downfall with this is that I would have to convert thousands of building files to 3DX. I would be interested in hearing of other workflows for similar situations. Thank you in advance for any input.


title: SLD encoding with GeoServer REST Configuration

text: I am using the GeoServer REST Configuration to add the following SLD file to GeoServer:               <?xml version="1.0" encoding="ISO-8859-1"?>     <StyledLayerDescriptor version="1.0.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld">       <NamedLayer>         <Name>MyWorkspace:MyLayer</Name>         <UserStyle>           <Name>MyLayer_default_style</Name>           <Title>MyLayer</Title>           <Abstract>Default style for Mylayer</Abstract>           <FeatureTypeStyle>             <Rule>               <Title>Polygon</Title>               <PolygonSymbolizer>                 <Fill>                   <CssParameter name="fill">#CBCCCC</CssParameter>                 </Fill>                 <Stroke>                   <CssParameter name="stroke">#CBCCCC</CssParameter>                   <CssParameter name="stroke-width">1</CssParameter>                 </Stroke>               </PolygonSymbolizer>             </Rule>           </FeatureTypeStyle>         </UserStyle>       </NamedLayer>     </StyledLayerDescriptor>      I have used the example from the GeoServer REST Docs and the sld file is added to GeoServer like expected. But the encoding of the sld file in GeoServer is now **"UTF-8"** instead of **"ISO-8859-1"** which I declared. See the SLD created by GeoServer below:               <?xml version="1.0" encoding="UTF-8"?>     <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">       <sld:NamedLayer>         <sld:Name>MyWorkspace:MyLayer</sld:Name>         <sld:UserStyle>           <sld:Name>MyLayer_default_style</sld:Name>           <sld:Title>MyLayer</sld:Title>           <sld:Abstract>Default style for Mylayer</sld:Abstract>           <sld:FeatureTypeStyle>             <sld:Name>name</sld:Name>             <sld:Rule>               <sld:Title>Polygon</sld:Title>               <sld:PolygonSymbolizer>                 <sld:Fill>                   <sld:CssParameter name="fill">#CBCCCC</sld:CssParameter>                 </sld:Fill>                 <sld:Stroke>                   <sld:CssParameter name="stroke">#CBCCCC</sld:CssParameter>                 </sld:Stroke>               </sld:PolygonSymbolizer>             </sld:Rule>           </sld:FeatureTypeStyle>         </sld:UserStyle>       </sld:NamedLayer>     </sld:StyledLayerDescriptor>      I have tested this using GeoServer 2.1 (all RC and final release). How can I add the SLD by using the GeoServer REST Configuration with my declared encoding and not "UTF-8"?


title: Openlayers geometry: how to convert area from degrees to square kilometres?

text: I get a multypolygon from my web service and want to calculate the area of that polygon. I was trying to use this piece of code:               var poly = new OpenLayers.Geometry.MultiPolygon(poligon);     var area = geom.getArea();      But that returns the area in square degrees. The projection is EPSG:3243.   I then tried to use               OpenLayers. Layer. SphericalMercator      But that didn't help me a lot. Is there any other solution or some other hint? Cheers!


title: How to select all cities in Germany from city and country layer?

text: I have 2 layers: layer_1: countries of europe, layer_2: cities of europe I want to create (and then save) a layer_3 which would be all the cities of Germany. Is there any good tutorial of how can i write spatial queries?


title: Pasing multivalue parameter using arcpy

text: I am trying to get my head around how multivalues derived from the arcpy command `GetParameterAsText` gets looped through a script. Could some please provide a sample script that does the follow basic task so that I may study it for further insight? Get a set of shapefiles from `arcpy.GetParameterAsText(0)` (the number of shapefiles can vary from to 10 say) and then loop through each shapefile, displaying the following with `arcpy.AddMessage` saying something to the effect: > "This is shapefile " shapefile name When looped through all of the shapefiles, print the message "No more shapefiles"


title: Problem with Converting XY Coordinates to LatLon

text: Here is the function that I use to convert from pixel x,y to lat,lon coordinate:                   public static Coordinate imageToWorld(Dataset gds, int x, int y)         {             double[] adfGeoTransform = new double[6];             double[] p = new double[3];             gds.GetGeoTransform(adfGeoTransform);             p[0] = adfGeoTransform[0] + adfGeoTransform[1] * x + adfGeoTransform[2] * y;             p[1] = adfGeoTransform[3] + adfGeoTransform[4] * x + adfGeoTransform[5] * y;                  OSGeo.OSR.SpatialReference src = new OSGeo.OSR.SpatialReference("");             string s = gds.GetProjectionRef();             src.ImportFromWkt(ref s);             //src.SetUTM(41, 1);             OSGeo.OSR.SpatialReference wgs84 = new OSGeo.OSR.SpatialReference("");             wgs84.SetWellKnownGeogCS("WGS84");             OSGeo.OSR.CoordinateTransformation ct = new OSGeo.OSR.CoordinateTransformation(src, wgs84);             ct.TransformPoint(p);             return new Coordinate(p[0], p[1]);         }      but this function doesn't work for utm projection and gives incorrect longitude. for example for an image with the following WKT it gives 35.25,3.65 but it should be 35.29,61.17 @(x=0,y=0). if I uncomment line 12 it gives correct result only for this image. > PROJCS["WGS 84 / UTM zone 41N",GEOGCS["WGS > 84",DATUM["WGS_1984",SPHEROID["WGS > 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32641"]] thanks and sorry for my poor english


title: Rhumb lines intersection

text: I looking for algorithm how to find out whether two rhumb lines given by point1 with azimuth1 and point2 with azimuth2 have intersecting point. Have anyone idea how to find intersection ? For example: _point1 = Latitude = 54.243694767757674, Longitude = -2.0064940902720076 bering1 = 36 degrees_ _point2 = Latitude =54.168824307242112, Longitude = -1.6983087834266664 bering2 = 301 degrees_ I know that rhumblines of these for 100 % have intersect (second is n the other hemisphere) Thanks in advance.


title: Shapefile and DEM: check rivers behaviour

text: I'm working with shapefiles representing rivers (rivers.shp), and DEM for the terrain elevation (terrain.tif). Basically, I want to check that my rivers (stored as polylines in my shapefile) behave like "natural" water flow, meaning that it mainly go downstream, can not go uphill first and downhill then, etc... I'm using GDAL/OGR in Python, and don't really see how to proceed. Should I extract the points of the polylines in the shp? Look for the elevation at those points in the DEM, and then compute my decision? Thanks,   eo


title: Masking/removing polygons from shapefile

text: I have a shapefile containing the road traffic noise of a city. The shapefile has 5 columns, where 'noise_in' (noise interval) ranging from 1-5 is included. I want to remove/mask the road noise from a specific area. My problem is that the noise intervals covers more than just this area, e.g. if I remove a polygon from the file, covering the area of interest, it will also remove the noise from an adjacent area, which I'm not interested in. The attribute table looks like this: ![enter image description here](http://i.stack.imgur.com/NTHso.png) The road noise for the area looks like this: ![enter image description here](http://i.stack.imgur.com/HULWv.png) I would like to remove all the road noise from this area, meaning all 5 noise intervals. Unfortunately, I have no available date for recalculating the road noise for the area. I don't have a polygon for each area. Here's an example of "Identify Features":![enter image description here](http://i.stack.imgur.com/NgUhD.png) ![enter image description here](http://i.stack.imgur.com/Fd7S9.png) The red highlighted areas are two different polygons covering large areas of road noise, and I'm only interested in the big blue "vein" in the middle. I'm using QGIS 1.8 Lisboa for MAC Thanks in advance


title: How to print selected features in QGIS?

text: I have a detailed map in qgis (vector, .shp) and I would like to split the map in four parts based on attributes to print each part of the map separately. Unfortunately, I didn't figure out how to do that, yet. I can select the desired values (for one printout) in the attributes table and the region of the map gets highlighted. I could now save the selection as a new layer, reopen it, and print it. however, that doesn't seem to be the smart way, because i would end up with too many files. I thought i could simply print only the selection. Is there a way to achieve this? Thanks


title: Minimum Information to be kept on importing OSM data to use it for creating random start and ent points

text: I want to only import the minimum of data from OpenStreetMap, to be able to distribute random start and end points for a simulation in administrative areas in germany. I found this file https://github.com/openstreetmap/osm2pgsql/blob/master/empty.style which will act as my starting point. Basically what I need are the bundaries of the districts, what type of distict it is and the streets. Nice to have would be if it is an area, where people life, office buildings or factories, since people commute between their home and work. What I came up with so far is this. My Question to you: Am I missing something? Did I put in too much? Generally I want to have a small database with the correct datatypes etc.               # osm2pgsql style file for simulation of commuter routes.     # The data is mainly used to determine random start and destination points     # for the route generation          # OsmType   Tag                     Type    Flags     # Insert your own columns here, or change phstore to polygon below     node,way    access                          text    linear     node,way    admin_level                     int4    linear     node,way    amenity                         text    polygon     node,way    area                            text    # hard coded support for area=1/yes => polygon is in osm2pgsql     way         boundary                        text    polygon     node,way    building                        text    polygon     way         de:amtlicher_gemeindeschluessel int4    polygon     way         de:regionalschluessel           int4    polygon     node,way    highway                         text    linear     node,way    landuse                         text    polygon     node,way    name                            text    linear     node,way    name:de                         text    phstore     node,way    office                          text    phstore     node,way    place                           text    polygon     node,way    population                      text    linear  # sadly text is used here as well     node,way    route                           text    linear     node,way    type                            text    linear     node,way    z_order                         int4    linear  # This is calculated during import     way         way_area                        real            # This is calculated during import          # Deleted tags     node,way    note                    text    delete     node,way    note:*                  text    delete     node,way    source                  text    delete     node,way    source_ref              text    delete     node,way    source:*                text    delete     node,way    attribution             text    delete     node,way    comment                 text    delete     node,way    fixme                   text    delete     node,way    created_by              text    delete     node,way    odbl                    text    delete     node,way    odbl:note               text    delete     node,way    SK53_bulk:load          text    delete     node,way    tiger:*                 text    delete     node,way    NHD:*                   text    delete     node,way    nhd:*                   text    delete     node,way    gnis:*                  text    delete     node,way    geobase:*               text    delete     node,way    accuracy:meters         text    delete     node,way    sub_sea:type            text    delete     node,way    waterway:type           text    delete     node,way    KSJ2:*                  text    delete     node,way    yh:*                    text    delete     node,way    osak:*                  text    delete     node,way    kms:*                   text    delete     node,way    ngbe:*                  text    delete     node,way    naptan:*                text    delete     node,way    CLC:*                   text    delete     node,way    3dshapes:ggmodelk       text    delete     node,way    AND_nosr_r              text    delete     node,way    import                  text    delete     node,way    it:fvg:*                text    delete      EDIT: Updated the style file


title: Sending Shapefile to SQL Server 2012?

text: How can I send a shapefile to an SQL Server table? I have searched and found a tool called ShapetoSQL but I am developing a c# Windows application so I am looking for an Open Source solution.


title: Need help in Print task in ArcGIS JSAPI 3.2/3.3

text: I am using print task in my code and using dynamic map service layer and graphics layer (not using feature service layer) and I am able to print the map but it’s not displaying info window and graphics in the print out. So any help will be great!! Complete code on JSFiddle (I removed my server name) What I am trying:   1. I am going though this example in which I found that they are using graphics layer + feature layer and graphics is coming while printing the map   2. Replaced with ESRI sample REST service for the print task still not getting the graphics and info-window   3. Researching on my side ## ![screenshot 1 : with graphics and info window](http://i.stack.imgur.com/XkBXt.png) ![screenshot 2: after performing print task](http://i.stack.imgur.com/9Pqg8.png) Software’s: ArcGIS for Server and Desktop version 10.1 and JSAPI version 3.2/3.3


title: File organization for sharing ArcGIS python code

text: What is the best organizational structure for sharing ArcGIS python code and geoprocessing tools? Or even, are sharing code and sharing tools separate questions? Esri has a Methods for distributing tools structure, published for Arcgis 9.3 and 10.0: ![distributing tool folder structure example](http://i.stack.imgur.com/Bdl8l.png) However in other places people are saying things like _`Also do avoid distributing your code the way its done in Arc Scripts or Code Galleries`_ in favour of the native python Distutils. Esri doesn't seem to have a corresponding distributing tools article for 10.1 (ref), lending some weight to the counter-argument. What says GIS.se? **Update:** though perhaps too late, but the nub of this question is more about best practices for file and folder structure before the tools-used-for- sharing (arcgis online, google drive, dropbox, github, bitbucket, etc.) come into play. **Update2:** and will no-one speak up for the apparently orphan distutils approach?


title: How does one modify selected geometry with a function in qgis python console?

text: My example use-case is that I want to redistribute vertices along lines as in:   * Redistribute linestring vertices to specified distance   * How to create points in a specified distance along the line in QGIS？   * How to automatically add vertices to lines every x meters?   * How to densify a polyline according to a specific length? I've written some functions to do some of the work:               import math          def redistribute_vertices_num(line,num):         return LineString([line.interpolate(i/float(num),normalized=True) for i in range(num+1)])           def redistribute_vertices_dist(line,dist):         return LineString([line.interpolate(i*float(dist)) for i in range(int(math.ceil(line.length/dist)))])      I would like to apply these functions (or other, modified functions) to the selected objects in the current layer to modify the layer. I'm looking for a general function like this:               edit_layer_selection_geometry(redistribute_vertices_dist,500)     # or      def my_function(line):         redistribute_vertices_dist(line,500)     edit_layer_selection_geometry(my_function)      ...that might do something like the processing in How can I create a line with three points with Python in QGIS? or How can I switch line direction in QGIS? on the active layer with the user-defined function.               def edit_layer_selection_geometry(myfun, extra_arguments...):         layer = qgis.utils.iface.mapCanvas().currentLayer()         # check for selected_layer, editability ?         for feature in layer.selectedFeatures():             newgeom=myfun(feature,extra_arguments)             # update feature with geometry             layer.changeGeometry(feature.id(),newgeom)         ...         # update layer stuff (extents?)      I'm looking for the edit_layer_selection_geometry() or an equivalent functionality, and I'm happy to modify the potential 'myfun' functions to fit requirements of the general function. I've put this in my .qgis2/mycode.py directory:               from qgis.core import (QgsFeature, QgsGeometry,                            QgsVectorLayer, QgsMapLayerRegistry,                            QgsField)     from PyQt4.QtCore import QVariant     from qgis.utils import iface     import math                    def redistribute_geometry_vertices(geom,dist):         mylen=geom.length()         line=geom.asPolyline()         return QgsGeometry.fromPolyline([geom.interpolate(i*float(dist)).asPoint() for i in range(int(math.ceil(mylen/dist)))])          def redistribute_selection(dist):         """Redistribute the vertices along a polyline """         layer = iface.mapCanvas().currentLayer()         for feature in layer.selectedFeatures():             geom = feature.geometry()             newgeom=redistribute_geometry_vertices(geom,dist)             layer.changeGeometry(feature.id(),newgeom)      Then I can solve the use-case by selecting the layer and feature, opening the python console and typing:               import mycode     mycode.redistribute_selection(0.1)


title: coordinates in dbf file wrong

text: I am new to ArcGis, so please bare with me :D . I converted a polygon in an mdx file I have to a shape file, then converted its vertices to points, then used "add X Y feature" and choosed coordinates "WSG 84", now when i open the dbf file I get coordinates like "3.17328051950, 3.07370669600" and they are really out of the country I am using (Egypt), so what is wrong here? Points to help: \- The mxd file I am using has Egypt and some neighboring countries around it not the whole world..   * I used the MID option when converting to point.


title: How to prepare road network for routing in QGIS or GRASS

text: I have been working on a road network and I want to run shortest path algorithms on it. One problem is that some lines come very close to each other, but are not connected.![disconnected road network ](http://i.stack.imgur.com/bgF0x.png) Is there a way to connect these lines when they are closer to each other than some threshold? Thanks


title: Gravity/Huff model tools

text: I am looking for a way to simulate a gravity model using a point-based layer. All my points are assigned a z-value and the higher this value, the larger is their "sphere of influence". This influence is inversely proportional to the distance to the center. It is a typical Huff model, each point is a local maximum and valleys between them indicate the limits of the zone of influence between them. I tried several algorithms from Arcgis (IDW, cost allocation, polynomial interpolation) and QGIS (heatmap plugin), but I found nothing that could help me. I also found this thread, but it isn't very helpful for me. As an alternative, I could also be satisfied by an way to generate Voronoi diagrams if there is a way to influence the size of each cell by the z-value of the corresponding point.


title: Is QGIS Supported on Windows 8?

text: Can QGIS be installed on Windows 8? I'm going to buy a laptop with Windows 8, but I have no idea if Windows 8 can run QGIS.


title: How do you format the legend in Geoserver when using GetLegendGraphic?

text: I'm new to the world of GIS and geoserver so sorry if I'm asking an obvious or simple question. I'm using GetLegendGraphic to create a legend for a raster layer on the server, as it stands it looks like this: ![legend](http://i.stack.imgur.com/qar3h.png) http://norsewind.eu:8080/geoserver/wms?REQUEST=GetLegendGraphic&FORMAT=image/png&WIDTH=20&HEIGHT=20&SCALE=160000000&LAYER=norse:norse_map_1 I'd like to know how to format the numbers to a specific number of decimal points. Also I don't need the '=x' part, can that be removed? Thanks


title: Insert XY table data into SQL Spatial column

text: ArcGIS Server 10.1.1 SQL Server Standard 2012 Current workflow is user submits a table (text file) containing lat-long data (same spatial reference each time); SQL Server Integration services pushes this data into an SQL table. Data is viewed as an XY Event Layer in ArcGIS Desktop and published to AGS. The ideal workflow is to to utilize a Query Layer instead of a XY Event Layer (according to ESRI). My question is what is the best to get these XY (Lat-Long) fields into the spatial column? At this point in the workflow, I think we would be limited to SQL commands (or something within SSIS); the table is a text file going into SSIS so I doubt we'd be able to add an appropriately formatted column/field which would could then be mapped/loaded into the spatial column of the target SQL table. [The question is much less about ArcGIS Server but I added that background for context.]


title: Why does QGIS raster calculator create a raster with band values=0?

text: I have a slope raster (value in %) created with the DEM (Terrain models) tool. I am trying to create a new raster showing the slopes > 15%. In the Raster calculator, I used : `(my_raster@1 > 15) * my_raster@1`. ![enter image description here](http://i.stack.imgur.com/DJTic.png) The calculator creates a new raster where every cells equal 0. I tried different codes, same result. ![enter image description here](http://i.stack.imgur.com/BO6ja.png) Any idea why I can't extract the values greater than 15%? I used QGIS Lisboa and have a Windows 7 OS. Thanks


title: QGIS, making a topo map from an excel file

text: I will appreciate your help. I am new to QGIS, this question might be common but trough me search I did not find the answer I needed hence my question here. How do I make a topo map ( raster) from the excel file (X,Y UTM), attached is an a image since I did not have a better idea how to upload some of the data. Thanks ![enter image description here](http://i.stack.imgur.com/i4s0W.png)


title: Problems running zonal statistics - not all zones represented

text: I have been working on a Python script to automate the steps illustrated by whuber here:Create points around the edge of viewshed results I am trying to create a horizon graph illustrating the maximum viewing angles from a single observer point in all directions. Here is the script:               import arcpy     from arcpy import env     from arcpy.sa import *          env.Workspace = "C:/Temp/Python"     env.overwriteOutput = True          inDEM = "C:/Temp/multiDEM.tif"     env.extent = inDEM          inPoints = "C:/Temp/Points_ALL.shp"     outPoints = "C:/Temp/Python/output/pts.shp"     outPath = "C:/Temp/Python/output/observers"     outputPath = "C:/Temp/Python/output"     outEuclidean = "C:/Temp/Python/output/euclidean"     fieldFID = 'FID'     Elevations = 'RASTERVALU'     arcpy.CheckOutExtension("Spatial")          ExtractValuesToPoints(inPoints, inDEM, outPoints)          arcpy.MakeFeatureLayer_management (outPoints, "pts")          with arcpy.da.SearchCursor('pts',[fieldFID, Elevations]) as cursor:         for row in cursor:             fid = str(row[0])             print fid             ### Select and export each feature             arcpy.SelectLayerByAttribute_management ("pts", "NEW_SELECTION", '"FID" = {}'.format(fid))             arcpy.FeatureClassToFeatureClass_conversion("pts", outPath, fid+".shp")             ### Create Viewsheds             outViewshed = Viewshed(inDEM,"pts",1,"CURVED_EARTH",0.15)             outViewshed.save("C:/Temp/Python/output/viewsheds/"+fid)             ### Euclidean Distance             outEucDistance = EucDistance(outPath+"/"+fid+".shp")             outEucDistance.save(outEuclidean+"/"+fid)             Euclid = outEuclidean+"/"+fid             ### Subtraction for Relative Elevations             elevation = row[1]             outMinus = Minus(inDEM, elevation)             ### Division for "viewing angle"             outDivide = Divide(outMinus, outEucDistance)             ### Tangent Angles             outTimes = Times(outViewshed, outDivide)             outSetNull = SetNull(outTimes, outTimes, "Value = 0")             tangentAngle = Tan(outSetNull)             tangentAngle.save(outputPath+"/angles/"+fid)             ### Aspect of Euclidean Distance             outAspect = Aspect(Euclid)             outInt = Int(outAspect)             outInt.save("C:/Temp/Python/output/int/"+fid)             ### Zonal Statistics             ZonalStatisticsAsTable(outInt, "VALUE", tangentAngle, outputPath+"/tables/"+fid, "DATA", "MAXIMUM")      So this script does the following:   1. Iterate through Points_ALL.shp to select one row at a time   2. Export each row to a feature class   3. Create a viewshed of each using inDEM   4. Find the Euclidean Distance   5. Find relative elevation through Subtraction   6. Find Viewing angle - Dividing relative elevation by the Euclidean Distance and taking its TANgent to find the viewing angle   7. Deriving the aspect of the Observer (then discretizing it using INT)   8. Running ZONAL Statistics on the Integer Zones and finding the MAXIMUM angles from step 6 in each aspect "zone." So what's the problem? Well... After investigating each table, I noticed that I receive two errors:   1. The maximum viewing angles in some areas are greater than 90 degrees (some as high as 600) so I think I am missing something in my calculations.    2. Not all zones end up in the resulting table. I'll have missing aspect values even though I check the data and there are obviously results in the directions that are missing. Can someone help me find what I am missing? Did I skip a step or misinterpret a step from the previous question?


title: Warping Rasters in QGIS

text: There seems to be a bug warping rasters in the new QGIS version 2.0 When you have to option of target and Source SRS, the Coordinate reference system does not get automatically writen into the box after you tick one option. i.e. EPSG: 4326 does not get automatically inputted into the box and stays bank. This leads to no warping taking place. Just reporting the bug.


title: calculate proportion of polygon greater then 40 degrees in grid cell QGIS

text: I would like to calculate the proportion of greater then 40 degree slope within my polygon grid cells. I have a Slope Raster layer for my given area and have a polygon that overlays this raster layer. I want to know what percentage of each polygon have above 40 degree slope within it. The only ways I could think was using the Raster caculator to make a new raster with only the greater then 40 degree slope. But then I still dont know how to create the proportion of this slope within my polygon.


title: shadow simulation from buildings

text: is it possible to use hillshade function in ArcMap to calculate shadow areas of buildings or simulate shadows of buildings, using DSM of the buildings and the sun angle and azimuth?


title: Arcpy CreateUniqueName usage: keep original input names

text: This is a continuation of the question I asked here: At this point I'm really just trying to get everything in one place and keep the original shapefile basename. I'll tackle merging like-named files later, which is why I'm using CopyFeatures for now. I'm confused about why the second sample below didn't have a result list similar to the first one. It looks like the first sample ran through the first folder and copied those shapefiles to the gdb, and when it got to the next folder with a 'Bank_Ero' name it failed. So now, I'd like to create a unique file name (keeping that original shp base name) if one already exists. As always, any hints, or direction will be greatly appreciated, and thanks for looking. Original sample:               for dirname, dirnames, filenames in os.walk ("C:\FOR MIKEK\GPS Files\GPS_ANDY"):         for subdirname in dirnames:             env.workspace = os.path.join(dirname, subdirname)             All_List = arcpy.ListFeatureClasses()             for shp in All_List:                 outFeatureClass = os.path.join("C:\FOR MIKEK\Python_Scratch.gdb", shp.strip(".shp"))                 arcpy.CopyFeatures_management(shp, outFeatureClass)               <Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Bank_Ero'>     <Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Fish_Bar'>     <Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Flag'>     <Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Outfall'>          Traceback (most recent call last):       File "<pyshell#82>", line 7, in <module>         arcpy.CopyFeatures_management(shp, outFeatureClass)       File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures         raise e     ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000725: Output Feature Class: Dataset C:\FOR MIKEK\Python_Scratch.gdb\Bank_Ero already exists.     Failed to execute (CopyFeatures).      and now attempting to use CreateUniqueName:               import arcpy, os     >>> from arcpy import env     >>> env.workspace = "C:\FOR MIKEK\GPS Files\GPS_ANDY"     >>> for dirname, dirnames, filesnames in os.walk ("C:\FOR MIKEK\GPS Files\GPS_ANDY"):         for subdirname in dirnames:             env.workspace = os.path.join(dirname, subdirname)             shpList = arcpy.ListFeatureClasses()             for shp in shpList:                 outFC = os.path.join("C:\FOR MIKEK\Python_Scratch.gdb", shp.strip (".shp"))                 if arcpy.Exists(outFC):                     arcpy.CreateUniqueName(os.path.join, "C:\FOR MIKEK\Python_Scratch.gdb")                     arcpy.CopyFeatures_management(shp, outFC)               >>> xferFiles = arcpy.ListFeatureClasses("C:\FOR MIKEK\Python_Scratch.gdb")     >>> print xferFiles     []


title: Where can I download Real time Traffic and weather data for the world?

text: Where can I download real time data for traffic and weather? I'd like to use it as an overlay on a mapping service of my choice (eg. Google maps, OpenLayers etc.)


title: How to auto fill or delete sliver polygons without losing precision?

text: I am developing some boundaries in which precision holds the key value. Using ArcGIS 9.3 I am converting lines to polygons using the "feature to polygon" tool. The lines are accurate but I find gaps in between polygons. Using GT [=ET?] wizard tools I made slivers and then eliminated them. However, the problem persists:   1. some gaps still remains   2. I lose precision.  As I have a huge number of polygons, solving them manually will take ages & I am running short of time. Can anyone help me resolving the 2 issues I mentioned, please? I have no knowledge of programming but I can work in either ArcGIS or Quantum GIS. Thanks in advance.


title: Delivering map tiles in real-time without caching?

text: I am wondering how useful would you find to have a way to deliver map tiles quickly over the web without worrying about caching or seeding them? With raster map engines we know that this is a problem. Rendering raster tiles is resource consuming therefore it is often required to cache them in advance. Every time map changes map tiles should be recreated and cached if you want to have them quick delivered. We focus to overcome this issue by rendering map tiles quickly in real-time as vector tiles. What do you think about this approach? Here is a benchmark that we did: http://www.giscloud.com/blog/realtime-map-tile-rendering-benchmark-rasters-vs- vectors/ Thanks!


title: OpenGeo-Suite SDK add Pan button

text: Ok, this may obvious but I can’t find the answer anywhere... I´m building an app using OpenGeo Suite SDK and I need to add a Pan tool. By default the pan option is activated, but, if I enable another tool like a ZoomBoxAction then I need to have a button to be able to go back to the pan tool... I can’t find the tool I have to put on the bar to be able to do that...


title: Failing to get wkt to reference for a multiline

text: I apologize, I'm quite new to WKT (and most everything else). I have a shape that I've exported to csv. & geoJson to be loaded into CartoDB. Unfortunately, the geoJson doesn't work so I am trying to upload the csv but don't quite understand how to get the array to reference, I am guessing I should convert it somewhere? Somehow? Ideally for free and with low bandwidth (I'm currently in Uganda). Here is the table for reference: https://alissarose.cartodb.com/tables/kcca_scrape_osm_linejoin4 Also, if the geoJson would just upload- that would be great. Here's a link to the file that won't load any data into CartoDB https://github.com/alissarose/test_spot/blob/master/kcca_OSMlinejoin.geojson Thanks for any help/advice/guidance!


title: How can I perform linear regression on a file geodatabase table in ArcGIS?

text: I'm trying to use the Ordinary Least Squares tool in ArcGIS 10.2 but it only accepts feature classes as input and I have a file geodatabase table. I realize that I can export the table to Excel or MATLAB and perform the linear regression there, but I am working in ModelBuilder and need to keep everything within the model. Are there any workarounds or conversions that anyone knows about?


title: Using get count with if statment

text: Pretty simple question though I am struggling with how to operationalize this, I want to rename a shapefile based on the number of features it contains. My initial thoughts are that I would need to create a list of the shapefiles contained in a folder, for those shapefiles use arcpy.GetCount and where count >= X rename the shapefile. I used an if statement followed by arcpy.rename and it managed to rename all the shapefiles. Thanks for your help with this one.


title: postgis loader osm shapefile

text: I downloaded the map of my city already in shapefile into postgis http://metro.teczno.com/ to load in order to consult routes using pgRouting. Iss happening the error: http://metro.teczno.com/               Importing with configuration: port-alegre.osm online, public, geom, C: \ Cassia \ Shape POA-OSM \ port-alegre.osm-line, mode = c, dump = 1, simple = 0, geography = 0, index = 1, shape = 1, srid = 4326      C: \ Cassia \ Shape POA-OSM \ port-alegre.osm online: DBF file (. Dbf) can not be opened.      Shapefile import failed.       I do not know what the geometry column in esquecificar postgisloader, can someone help me?


title: View attachments in popup when using the editor widget

text: I am using ArcGIS javascript API to construct an editor app for a layer. I am using the default out of the box editor widget to edit and display data for an app. The layers I am editing contain attachments, which show up as a link within the editor's attribute viewer. Attachments are by default opened in a new window. I would like a dialog box with the attachment ( which is images) to load via a ajax request once the link is clicked. Has anybody been able to get attachments, such an image to open in a popup of some type, while using the default editor widget? My logic was to trigger an event handler that changes the link to the attachment, after the attribute inspector loads but I can't seem to find an event that is triggered during that time. Am I going at this from the right approach, or would there be a better way to accomplish this with the default editor? I know you could probably write a custom widget to to do this, but I would prefer to stick with the functionality that the editor widget provides.


title: In ArcMap how do I print to an image (jpg or pdf) with a transparent background?

text: I am trying to print a contour shapefile to an image (jpg) with a transparent background instead of white. What I want to do is add this into powerpoint as a layer over the top of a basemap so I can see both the basemap and the contours. I realize that there are ways around this. Example, I could just print two different maps; one with the contours and basemap and one with just the basemap. I also know that I could also use the remove background in powerpoint, but we had issues with some of the maps not picking out the right areas. However, my boss is adamant that there should be a way to do this exclusively in ArcMap. Anybody know of a way.


title: How to use ArcGIS 10.2 Features to JSON output in web maps?

text: Using the Features to JSON tool that is now available with 10.2, is there additional formatting that needs to be done to the files before they can be displayed as web maps?


title: How to display information when a certain dataset is loaded into QGIS?

text: I need to show the quality information of a dataset that was manually created by me, that is saved as a text file. The text file will "pop up" when the dataset is added into QGIS. I have no experience in creating plugins in QGIS. Can you help me with the approach to create a plugin for the above mentioned purpose.


title: How can I read the geospatial properties of ArcGIS web services using C#?

text: I need to display the Geospatial properties of ArcGIS web-services (like service name, service type, description, copyright, etc.) which are available in the "ArcGIS Services Directory", in my C# application. Any thoughts would be much appreciated.


title: WFS data expiration check

text: Does WFS protocol offer a way to know when layer/featureType data was last modified? If not, is there another protocol that allows retrieving such information?


title: Any android application for field mapping with Google map in background

text: I need a android/iPhone app, through which I can draw point/line/polygon while survey only. The app should have facility to use Google satellite imagery or provision for uploading base maps. Please suggest, if any.


title: How to use pointstacker for polygons?

text: I have a lot of polygons and i would like to use poinstacker. I am not familiar with sld code. I am thinking to make a point shp from the polygons centroids. Where in the sld code will i put the table feature name? Is there something else i must replace? **vol_stacked_point** Stacked Point **Styles volcanoes using stacked points** **data** cellSize 30 outputBBOX wms_bbox outputWidth wms_width outputHeight wms_height rule1 Volcano count 1 triangle #FF0000 8 rule29 2-9 Volcanoes **count** 2 9 circle #AA0000 14 **count** Arial 12 bold 0.5 0.8 2 #AA0000 0.9 #FFFFFF 1.0 rule10 > 10 Volcanoes **count** 9 circle #AA0000 22 **count** Arial 12 bold 0.5 0.8 2 #AA0000 0.9 #FFFFFF 1.0


title: Web GIS attribute editing forms - open source

text: I would like to create input masks similar to QGIS "data input masks" on web GIS. I could program this forms by hand in PHP and show form "on click". I was wondering if there is something existing there to help us speed up this proces of dynamic form building. What kind of technology should I use to build input forms for attribute data entry - review with identification? I think this is a common IT problem and I don't want to rediscover something new. Is there a web GIS that simplyfies this tasks? Maybe also support spatial editing? I wonder how large enterprises handle this kind of data input problem with open source GIS software. GS


title: How to calculate LS Factor of Watershed for RUSLE Calculation?

text: I managed to get subbasins for my catchment (7 km^2) with their areas but I haven't figured out how to get the LS factor (see Revised Universal Soil Loss Equation) from it. I have the vector file for my subbasins and I have the DEM (digital elevation model) file. I extracted the LS raster file from the DEM file (via r.watershed) but I dont know what to do afterwards. I figured I can isolate the subbasins within the LS raster file and calculate the average LS factor of those areas. Do you know how to do this? On a side note, is there a way to split up the subbasins since there are slopes that are steep with slopes that are flat? Thanks in advance.


title: OpenLayers ModifyFeature for multiple layers

text: Is it possible to configure the ModifyFeature control to edit features in multiple layers?


title: Points in polygon by months

text: I have two tables: points(gid,id,datum,x,y,geom) and hexa_grid(gid,geom). I must create new table hexa_grid_pip (gid,2008_01,2008_02 ... 2011_12, geom) In column 2008_01 ... 2011_12 must be number points in polygon. Columns 2008_01 ... 2011_12 are shortcuts of months. Is it possible to do this by using script in PostGIS, or do I have to count month by month in QGIS?


title: How can i select a polygon in MS SQL 2008

text: I am very new to MS SQL 2008. I got a task to select a polygon from the polygon layer by giving the X-Y coordinates. I already got the script for PostgreSQL for the same thing, but i need it for MS SQL 2008. the code in PostgreSQL is, `SELECT * FROM "Kar_bbmp_198" WHERE ST_Within ((ST_GeomFromText('POINT(773824 1442012)',32643)), the_geom) = TRUE;` Can anybody help me from this, thanks in advance


title: Query WMS GetFeatureInfo with known latitude and longitude

text: My issue is that normally, when you want to query a WMS layer, you need to pass width & height of a map, and x,y (in pixels) which describe a point on the map where user clicked. I want to do this in other way - I want to query this WMS layer with longitude and latitude known before. I assume, that by using some ArcObjects libraries I will be able to convert latitude,longitude and projection to width,height,x,y so that I can use GetFeatureInfo. Can someone please explain how to achieve this? I'm using ArcObjects SDK 10.1 for .NET.


title: Can I use GRASS algorithms in Sextante under ArcGIS?

text: Sextante for ArcGIS comes with SAGA modules. I know that I can use GRASS algorithms in Sextante under gvSIG. But how can I use GRASS algorithms in Sextante under ArcGIS? I tried to look for any instructions, but could not find any. Any suggestions?


title: How to customize legend icons in QGIS?

text: Under layers in QGIS shapefile polygon layers always seem to be denoted by right angled polygons which translates to the map legend in Composer. Is there any way to change the outline to a more representative shape, i.e. lakes don't normally have right angles. ArcGIS has a feature under the legend options to substitute the symbol being used in the layer with a preferred symbol, e.g. square to rounded or "blob" shaped. I'm after a similar feature in QGIS. Thanks.


title: What must be learned to build 3D web map?

text: I wish to build a 3D web map based on Silverlight or JavaScript. I cannot build 3D in Silverlight. What I should do then? Should I learn "Balder" or OpenGL or what? I must do it before 09/2014. Can you give some ideas?


title: Saving rasters to postgresQL using raster2pgsql, saving forecast time

text: I would like to save a forecast which is saved as geoTiffs into a postgresQL database. I've been able to import the rasters using: raster2pgsql -s 0 -I -d tiff/field*.tiff -F public.latest | psql -d optigrid THis gives me a table latest which looks like               rid  | rast  | filename     1      ...     field1.tiff     2      ...     field10.tiff      and so forth. However I would like to add another column which stores the time the forecast, something like               rid  | rast  | filename      | forecast_date     1      ...     field1.tiff      2012-08-09     2      ...     field10.tiff     2012-08-10      Is this possible? Thanks Matt


title: min function not found compiling osrm

text: I'm trying to compile OSRM in a Xubuntu 12.04 virtual machine following these instructions. I had some problems installing boost (a requisite) and I compiled it manually. The error is this:               /home/user/src/Project-OSRM/datastore.cpp: In function 'int main(int, const char**)':     /home/user/src/Project-OSRM/datastore.cpp:163:86: error: no matching function for call to 'min(long unsigned int, std::basic_string<char>::size_type)'     /home/user/src/Project-OSRM/datastore.cpp:163:86: note: candidates are:     /usr/include/c++/4.6/bits/stl_algobase.h:187:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)     /usr/include/c++/4.6/bits/stl_algobase.h:233:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)     make[2]: *** [CMakeFiles/osrm-datastore.dir/datastore.cpp.o] Error 1     make[1]: *** [CMakeFiles/osrm-datastore.dir/all] Error 2      I've tried to define these variables in compile time               CFLAGS=/usr/local/include     LDFLAGS=/usr/local/lib      The directories where boost headers and libs can be found. Just in case. Still getting the same error. Any suggestions? I've used boost 1.49 (I know there's a problem with it, but I'm still not there). And maybe the problem isn't boost, but something else. Many thanks in advance


title: ArcGIS - Create a join based on multiple fields

text: I have two feature classes in a File Geodatabase that I would like to join based on multiple fields. I've searched this site and Google and all I have come up with was to use the Make Query Table tool. I've tried this, but I keep getting an SQL error. My SQL is pretty poor and I'm pretty sure I'm missing something. I am aware I can create a new field and concatenate the values from my fields, but I would like to avoid this, if possible. I'm using something that looks like this:               (Table1.Field1 = Table2.Field1) AND (Table1.Field2 = Table2.Field2) AND (Table1.Field3 = Table2.Field3)      When I verify the query, I get an error that says: There was an error with the expression. An Invalid SQL statement was used. An invalid SQL statement was used. [Table1] Also, if someone has another solution that doesn't use this tool, I'm happy to hear about it. Thanks.


title: How to rotate sphere when using Vertical Near Side Perspective projection?

text: **Situation** Data is currently displayed on a globe using the Vertical Near Side Perspective projection with a blue circle as a backdrop. **Problem** I would like to 'rotate' the globe by altering the projection parameters without causing the shape files to shift away from the backdrop. The parameter that was changed was the Longitude_Of_Center ![Current layout](http://i.stack.imgur.com/sMeaP.jpg) ![Shift in shape files](http://i.stack.imgur.com/3NBuk.jpg)


title: How to implement a Gaussian function in field calculator?

text: Are there any build-in functions like Gaussian or Epanechnikov functions in field calculator? Or I have to write that by myself?


title: How to calculate the height of buildings from satellite/aerial images using MATLAB

text: I want to calculate the height of buildings from satellite/aerial images using MATLAB automatically with no or least possible human interaction. I am not using LIDAR or any DEM information. Can anyone help me out in this? My project is simple but very difficult to be completed. There are some GIS tools available for determining height of buildings but they are proprietary software and not automatic. What I am trying to do is to read satellite images in MATLAB and calculate the heights of buildings present in the images. There is no compulsion of what type of images I should use i.e I can use aerial or satellite images, normal or stereo images or oblique images. I hope this information is sufficient to answer my question, I would be really happy to provide further clarification if needed. Thanks in advance.


title: How to take polygon centroid in Postgis

text: I have table with column name,Latitude and Longitude.I want to update this with polygon name and its centroid latitude longitude.I know there is a function in postgis st_centroid(geometry). But I want to enter x value and Y value in a separate column.How can I do this? Please help me Regards, Sreesha


title: How to rasterize vector data correctly in GRASS GIS 6.4.0?

text: I try to rasterize some vector data in GRASS GIS 6.4.0. Unfortunately, it always just works with one layer. Afterwards, there are just lines generated instead of rectangles. What am I doing wrong?


title: openlayers - Access to geoserver layers with php authentication

text: I disable all anonymous requests (wms/wfs/... ) to my geoserver, but now I can't access to any layer from my openlayers app. I want to know if it is possible authenticate on my geoserver via php or javascript before any openlayer request. If yes, what is the best option? Via php crul, javascript or proxy (http://docs.geoserver.org/stable/en/user/security/tutorials/httpheaderproxy/index.html) Best regards


title: When is Qgis 1.9 being released

text: I've been working in the alpha of 1.9 for quite a while (because of doing bug reports) and I like it a lot. It's more than a year since 1.8 was released, so I wonder when 1.9 is expected out.


title: Radar Data - Animated Gif in Geoserver

text: I have 7 animated gifs (5 animations in each gif) (with bounding coordinates) of real time radar data. The number of these will grow significantly over the next year or so. We are currently serving each gif as a separate raster layer using open layers but this is causing problems on slower connections as openlayers appears to load the gifs even if not being displayed in the viewport. I would like to be able to combine and serve all the animations via Geoserver as one layer, probably animated using the Geoserver Animation feature. This is totally rocket science to me so I am reaching out for suggestions from more experienced users. I guess we have to break the gifs apart for each animation, combine them into one raster for each time slice (they are all synced), load each georeferenced raster into postGres then use geoserver's animation feature to display the layer. Am open to any and all suggestions, thanks in advance.


title: Customizing opentripplanner webapp

text: I am using opentripplanner for an app development. I want to customize the webapp. It has many different maplayers (its using openlayers). I want to change some mapslayers, but i couldn't find in which java-script file they are creating map and maplayers.


title: Frequency of partially or fully overlapping lines

text: Let **L** be a set of line-segments (lines) in a two-dimensional (2D) Euclidean space that are randomly (say, using uniform random function) distributed, that is, some may overlap other(s). Overlapping could be on a point or a line segment (in this case it is partial or full overlapping). **_We aim to represent any frequency of overlapping lines in a reasonable way_**. For those may think of rendering; it is not of our interest in this post. To start, for example, our naive solution was to discretise all the lines into a grid, that is, aiming to generate a 2D raster map i.e., a matrix. In this way, we are able to count the number of visiting per cell for all lines in the set. The resulting map/matrix (as of our quick experiments) is promising. ![enter image description here](http://i.stack.imgur.com/JGFyp.jpg) **{1} What is the closest topic (if exists) to the aim of our question?**   _The answers may help us for improving our search keywords._   **{2} Any thoughts on better ideas or suggestions for improvement?**


title: Overwrite option on a standalone ZonalStatisticsAsTable using ArcPy

text: How can I code an "overwrite option" on a standalone ZonalStatisticsAsTable using ArcPy? I don't see any overwrite option from a Esri example.               # Execute ZonalStatisticsAsTable     outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster,                                       outTable, "NODATA", "MEAN")      Is impossible or possible to overwrite?


title: Comparing data from two different time periods

text: I am trying to compare DWI frequency over the period of 3 years. I want to create 3 maps, with each one showing where DWI's occurred during 2011, 2012, and 2013. I have the point data for this, but I am unsure on the best way to display it.


title: Alternative to using ArcGIS Online Geocoding

text: I have 1.4 million addresses that I need to batch geocode. I can't find a free service to do so. Does anyone know of something out there that I can use? Oh, the service needs to be were I can upload a file in a .txt file formate, not a copy and paste. Copy and paste services crash the 661 mb size file.


title: SRID 4326 and geometry conversion

text: From this line:               SELECT ST_AsEWKT(geom) FROM buildings LIMIT 1;      I get this result:               "SRID=4326;MULTIPOLYGON(((404269.308014269 4543087.6184561,...)))"      I'm wondering if the coordinations are actually in the right format as SRID 4326? Thank you. EDIT ---- > The table was updated using this line:               SELECT UpdateGeometrySRID('buildings','geom',4326);


title: Distance calculation : Integrating incremental gps data

text: I am trying to build a GPS based odometer based on android. Currently , I am calculating incremental distance changes very frequently ( < 5 meter movement). The distance calculation in android is using the WGS84 ellipsoid. Currently on test runs, The gps calculations overshoots by 3 - 5% depending on route taken and duration of travel. There are two problems I am facing :   1. The distance calculation is not considering altitude.   2. When the vehicle is stationary, gps starts injecting errors due to position changes which even though the device is stationary gps does calculation errors. This is the source of most of the error. Details for error 2 : Typically, when in a traffic signal / just plainly stopped on road. The android api tells me the new lat long pair when there is a displacement of minimum 5 meters. The problem is the api informs me of even the "drifted" lat long to be 5m away and hence I increment the odometer value which keeps accumulating errors because device did not move.Hence if the device is stationary it keeps accumulating this error. An example "error" data when device is stationary               Device  Latitude    Longitude   Accuracy    Speed   Altitude    Heading     gps 13.0311466666667    77.5577383333333    41.5    1.9193991   894.7   295.77     gps 13.0311516666667    77.557795   38.8    0.99907583  892.8   294.88     gps 13.0311616666667    77.55784    38.4    0.5883275   886.4   294.88     gps 13.031175   77.5578866666667    37.5    0.74892086  886.1   294.88     gps 13.0311816666667    77.5579383333333    32.5    0.6552414   886 294.88     gps 13.0311516666667    77.557975   27.6    0   885.9   294.88     gps 13.0312016666667    77.5579733333333    32.4    0.7175228   885.9   294.88     gps 13.0312316666667    77.5579366666667    31.8    0.5610472   885.9   294.88     gps 13.031235   77.557885   30.4    0.9028228   885.9   294.88     gps 13.031245   77.5578366666667    30.5    0.81634945  885.8   294.88     gps 13.0312416666667    77.55779    27.9    0.5559  885.8   294.88     gps 13.0312233333333    77.5578433333333    23.9    0.43236667  886 294.88     gps 13.0312066666667    77.5578883333333    23.6    0.43905807  886.2   294.88     gps 13.03119    77.5579366666667    23.6    0.49258918  886.3   294.88     gps 13.0311666666667    77.5579983333334    24.9    0.77208334  886.7   294.88     gps 13.0311316666667    77.557945   22.4    0.3958214   887.8   241.89     gps 13.03113    77.5578416666667    25.2    0.24089 890.5   269.19     gps 13.0311133333333    77.5579 20.7    0.40663055  891.2   221.69     gps 13.0311116666667    77.5578516666667    21.9    0.47302973  891.3   251.03     gps 13.03104    77.55787    26.7    0.40199804  891.3   134.23     gps 13.0311033333333    77.5579333333333    23.6    0.5193547   891.6   332.92     gps 13.0310766666667    77.557985   19  0.38346806  893 118.18     gps 13.0311333333333    77.557945   27.9    0.3381725   896.9   287.31      Full data set is available here . It has > 5000 data points corresponding to a round trip from my home to office and back. From the start about ~800 data points are error beyond that the device starts moving. Also adding raw nmea strings..               $GPGGA,191215.557,1301.8784,N,07733.4765,E,0,0,,912.5,M,-88.1,M,,*68          $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,1.00*01          $GPGSV,3,1,11,29,53,169,18,21,49,005,,18,44,334,17,15,34,037,*76          $GPGSV,3,2,11,14,31,211,,22,27,284,,09,27,107,,27,22,087,*76          $GPGSV,3,3,11,25,10,183,,06,09,318,,30,04,261,*42          $GPRMC,191215.557,V,1301.8784,N,07733.4765,E,0.009,0.00,160712,,N*68          $GPVTG,0.00,T,,M,0.009,N,0.017,K,N*3D          $GPACCURACY,27947.3*04          $GPGGA,191216.557,1301.9128,N,07733.4723,E,0,0,,911.4,M,-88.1,M,,*6A          $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,1.00*01          $GPGSV,3,1,11,29,53,169,18,21,49,005,,18,44,334,18,15,34,037,*79          $GPGSV,3,2,11,14,31,211,,22,27,284,,09,27,107,,27,22,087,*76          $GPGSV,3,3,11,25,10,183,,06,09,318,,30,04,261,*42          $GPRMC,191216.557,V,1301.9128,N,07733.4723,E,0.001,0.00,160712,,N*60          $GPVTG,0.00,T,,M,0.001,N,0.002,K,N*31          $GPACCURACY,27942.6*04          $GPGGA,191217.557,1301.8573,N,07733.5089,E,0,0,,909.4,M,-88.1,M,,*6F          $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,1.00*01          $GPGSV,3,1,11,29,53,169,18,21,49,005,,18,44,334,18,15,34,037,*79          $GPGSV,3,2,11,14,31,211,,22,27,284,,09,27,107,,27,22,087,*76          $GPGSV,3,3,11,25,10,183,,06,09,318,,30,04,261,*42          $GPRMC,191217.557,V,1301.8573,N,07733.5089,E,0.068,0.00,160712,,N*63          $GPVTG,0.00,T,,M,0.068,N,0.126,K,N*39          $GPACCURACY,19781.4*0A      Also, I am finding it very hard to visualize this data using excel, can anyone suggest better tools ( I use a MAC ) Can some one give me ideas to reduce the errors , perhaps a better algorithm to consider even altitude?


title: MapServer Pixmap Symbol GAP for Park Polygon Layer

text: I have a   * Polygon layer (National Park)   * PNG Pixmap symbol (from Maki icon set)   * MapServer 5.6 If I use the PNG Pixmap symbol for my Polygon Layer, Mapserver fills the polygon layer with the png symbols. I tried using GAP 300 However it doesn't seem to work with pixmap (works fine with vector symbol) Is there another way to use GAP for pixmap ?


title: Geoserver returning Translator Error when I use PropertyIsLike

text: I'm converting a WFS app from MapServer to GeoServer (2.1.4) and have hit a snag around PropertyIsLike. Whenever I include it in a getFeature's filter I get back a ServiceException as seen below. This is the filter sent to getFeature:               <Filter xmlns='http://www.opengis.net/ogc' >         <ogc:And>                      <BBOX>             <PropertyName>geom</PropertyName>             <Box srsName="EPSG:4326">               <coordinates>174.74029566015622,-37.005568168501505 175.0849917050781,-36.89582122701751</coordinates>             </Box>           </BBOX>           <ogc:PropertyIsLike  wildcard="*" matchCase="false" singleChar="." escape="!">             <ogc:PropertyName>locality</ogc:PropertyName>             <ogc:Literal>*reek*</ogc:Literal>           </ogc:PropertyIsLike>       </ogc:And>     </Filter>      And this is the error               <ServiceExceptionReport version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">       <ServiceException>         error:Translator error         Translator error         java.io.IOException         null         null       </ServiceException>     </ServiceExceptionReport>      It works fine if I remove the PropertyIsLike, and it works if I change it to PropertyIsEqual, but I need a wild-card search. I've looked over and over the filter and I can't see a problem with it. Can someone see an error, or suggest another way to achieve a wild-card search on GeoServer? _Update_ Here is the requested full stack trace. 2012-07-16 15:55:41,953 ERROR [geoserver.ows] - org.geoserver.platform.ServiceException: error:Translator error at org.geoserver.wfs.xml.GML2OutputFormat.encode(GML2OutputFormat.java:286) at org.geoserver.wfs.xml.GML2OutputFormat.write(GML2OutputFormat.java:295) at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:141) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:751) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:238) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.transform.TransformerException: Translator error at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:136) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:111) at org.geoserver.wfs.xml.GML2OutputFormat.encode(GML2OutputFormat.java:276) ... 73 more Caused by: java.lang.RuntimeException: java.io.IOException at org.geotools.data.store.ContentFeatureCollection.iterator(ContentFeatureCollection.java:258) at org.geoserver.feature.RetypingFeatureCollection.iterator(RetypingFeatureCollection.java:44) at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:53) at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:513) at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:939) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:299) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:132) ... 75 more Caused by: java.io.IOException at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:576) at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:484) at org.geotools.data.store.ContentFeatureCollection.iterator(ContentFeatureCollection.java:255) ... 82 more Caused by: java.lang.NullPointerException at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:450) at org.geotools.filter.LikeFilterImpl.accept(LikeFilterImpl.java:614) at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:544) at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:496) at org.geotools.filter.AndImpl.accept(AndImpl.java:64) at org.geotools.data.jdbc.FilterToSQL.encode(FilterToSQL.java:205) at org.geotools.data.jdbc.FilterToSQL.encodeToString(FilterToSQL.java:234) at org.geotools.jdbc.JDBCDataStore.selectSQL(JDBCDataStore.java:2885) at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:564) ... 84 more


title: Python: Run script when opening an MXD in ArcGIS 10

text: This post is related to Run a Python Script when opening an MXD? I would like a python script to run every time a .mxd is opened. However, the link above uses VBA to do it, which ESRI suggests migrating away from.... http://events.esri.com/uc/QandA/index.cfm?fuseaction=answer&conferenceId=2F6DC1A1-1422-2418-883C3868A9004888&questionId=3182 I am looking for way to do it with python. Thoughts?


title: Making calls the PostGIS functions with Java

text: We have Java stored procedure in Oracle that make calls to functions offered by Oracle Spatial to perform spatial analysis and return results. I am looking to the same in PostGIS, is this possible?


title: Any tool to monitor ArcGIS Server Usage

text: I am using ArcGIS Server 10.1 on AMI instance. I have around 10/12 simple map services (Used query layer in all services) I want to check performance/time/statistics of map services in ArcGIS Server. So is their any tool to monitor ArcGIS Services ?? **What I found so far :** 1.According to http://ideas.arcgis.com their are few third party tools available. 2.Using windows task manager I can monitor only process not the services. 3.In 10.0 version its possible to see the statistics/min ,max time using 'statistics' tool in ArcGIS Server I think in 10.1 its not present 4.Using ArcPy I doubt its possible .Even I tried using ArcGIS ADMIN API for server. 5.Screenshot of windows task manager (javaw.exe taking too much memory but its important to run the ArcGIS Server according to this post) ![ArcGIS Server 10.1_windows task manager](http://i.stack.imgur.com/UMNrZ.png) Any help will be great !! thanks in advance : ) **Update** According to @Alex Tereshenkov answer I downloaded the tool but it work with Web adapter only. We do not have the Web adapter we are using reverse proxy at our end. Found this useful article for ArcGIS Server to test the load balance using Jmeter


title: Can we do operations like Geo-referencing and Geo-coding in NoSQL Databses

text: I want to generate a map, using some spatial data provider like OSM. I am trying to put in some dynamic data-set on top of the base map. The data size is considerably large enough to be called as BigData. Its taking hours to insert data into PostGIS. NoSQL Databases are meant to be scalable for humongous data sets. So my query is can i replace my PostGIS database with NoSQL, considering the scale-out factor and the enormous growth of data. If so which seems best MongoDB, Hbase or Neo4j.


title: How to set a definition query for an AGS layer?

text: Is it possible filter out some features using a definition query set from the client on a AGS layer? I've checked out the map server layer but it only supports find and identify. Also looked at WMS, WFS and the Feature Service. Can't find a way that works. Do I need to extend the AGS to get this functionality? **Update:** What I'm trying to do is opening an MXD in an ArcGIS Engine application. The MXD has an ArcGIS Server map server layer. I would like to filter out some of the features in one of the ArcGIS Server layers by using an definition query.


title: Create closest-distance line in MapInfo

text: As part of a larger program (basically a remake and extension of DistanceCalc) I want to programmatically create a line between the two closest points of two regions in MapInfo. The ObjectDistance function effectively measures this line and returns its length but there is no way to store the line itself. The "Nearest" statement almost does what I want but it does too much! - it measures from one site (or each item in a table) to each item in another table. Also it puts the results in a table whereas I want to manipulate them before storing them. Is there a simple way to do this?


title: Is there a good GPS track analysis library?

text: I keep writing custom code to work with GPS tracks: GPX files and NMEA logs from my phone, dedicated GPS logger, etc. I feel like I'm reinventing the wheel and am wondering if there's some standard library / tool I can use to work with GPS tracks. Some of the things I like to do:   * Calculate the distance travelled on the track   * Calculate the average speed and instantaneous speeds along the track   * Calculate time in motion vs. time stationary   * Simplify the track, eliminate stationary segments   * Segment a track into separate tracks, one per trip   * Smooth out GPS sampling error   * Create an elevation profile by looking up points in a DEM   * Convert the tracks to GPX, KML, etc for visualization There are a variety of applications that analyze GPS tracks. I'm looking for a software library or scriptable set of tools so I can write my own applications. I don't much care about input formats; any sort of timestamped lat/lon points is fine. I mostly work in Python on Unix but pretty much any language will do. Existing tools I use include GPSBabel and GDAL/OGR for conversion and PostGIS for working with the track geometry as a line string. But mostly I end up writing my own Python code that works on arrays of lat/lon pairs and that feels too low level. Also some of the tasks above (like removing GPS error) are quite subtle. Is there some existing library out there I should be using?


title: How to load postgis layer to map control with mapwingis?

text: I search over the internet but couldnt find out the resolution. I create GIS app with MapWinGIS library, I have some spatial table in PostgreSQL (table with geometry column). I want to load these table as shapefile to map control. Is there any way to do that ? Thank all.


title: combine two OCG filters in Openlayers : ERROR: invalid input syntax for integer

text: **i need to combine two OCG filters. each one works fine separably but if i combine them using Filter.Logical.OR, the first one works only.**               var c_filter = new OpenLayers.Filter.Logical({      type: OpenLayers.Filter.Logical.OR,      filters: [      new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.EQUAL_TO,          matchCase:false,          property: 'id',          value:(document.getElementById("Text")).value              }),        new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.LIKE,          matchCase:false,          property: 'name',          value: "*" +(document.getElementById("Text")).value + "*"            })           ]      });       **as you can see, the first one expect integer and the other one a string. also i tried:**               var id_filter = new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.EQUAL_TO,          matchCase:false,          property: 'id',          value:(document.getElementById("searchText")).value              });        var name_filter = new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.LIKE,          matchCase:false,          property: 'name',          value: "*" +(document.getElementById("searchText")).value + "*"            });               var orFilter = new Array();      orFilter.push(id_filter);      orFilter.push(name_filter);                     wfsProtocol.read({                      filter: new OpenLayers.Filter.Logical({                       type: OpenLayers.Filter.Logical.OR,                       filters: orFilter                   }),                 callback: processTheQuery,          scope: strategy               })       **and still, the id_filter works fine. but the name_filter i got the error: ERROR: invalid input syntax for integer: "test name" i don't understand why it should be integer !! and if i try name_filter alone, it works fine !**


title: is there any relationship between drawing graphics and IIS overloading

text: I'm running gis web application built on silverlight but when many users connect to the system the IIS reaches the full memory so could the reason be from many users draw graphics at the same time ,if not what could makes the IIS overloaded and not responding. regrads.


title: How to trim Landsat 5 scene edges

text: I have a bunch of Landsat 5 scenes that I want to mosaic together. However Landsat 5 scenes have a zigzag pattern on the left and right edges as well as some bad data values along these edges. Is there a program that can automatically trim the edges of the Landsat 5 scenes so that all the edges are nice and straight?


title: How to perform an attribute-weighted sum of multiple polyline features from a single vector layer?

text: I have a shapefile of ~8000 polyline vector features representing traffic journeys on road routes. Each has an attribute representing volume of traffic for that journey. The routes are all generated by the same routing engine so the node coordinates should match exactly where routes follow common sections of road. I am wanting to effectively add these together in a "map algebra" sort of way to give a representation of network usage. Keeping the result in vector would be preferable, but ultimately not essential. I can see how this could be done conceptually simply by converting each feature to a separate raster of pixel values = traffic volume, then summing all the rasters but this would practically be very painful to combine 8000 high-resolution rasters. Ironically, QGIS is effectively already doing this visually for me - I am displaying the layer using combining of features by "addition" method.. but I can't see any way of getting that directly out into a much higher resolution raster format than my display: ![QGIS-rendered display screengrab](http://i.stack.imgur.com/EihUh.png) Surely there must be a vector way to do this? (QGIS or ArcGIS) If it makes it easier to not go the shapefile route I have all the route nodes in CSV format, one line per route. The polygon "union" then "dissolve" method outlined in How to union polygons and add attribute values of combined output features looked promising, but Union does not work on line features it seems. Flicking through the ArcGIS Network Analyst "Route Analysis" pages looked potentially promising if rather OTT for this purpose and I'm guessing would require a lot of messing round to get there - I'm sure there must be a simpler way!


title: How to link to external files with relative path in QGIS actions?

text: _Objective_ : I have point layers with attributes contain paths to external files (visio, autocad dwg...). I want to put them all in one folder together with the project file, compress the folder into a zip file and send it to my colleagues for reviews. When my colleague de-compress the zip file, they would be able to open those files with simple actions like the posts linked below. _My observation_ : what I want to accomplish is very similar to those discussed in this post and this post with one difference: when the zip file is de-compressed, absolute path to referenced files will be different. But I think that RELATIVE PATHS to the project file will be the same, so why not use this? The problem is: I can not find a way to open external files with relative paths inside QGIS. Any idea how to solve this problem? Thanks a lot!


title: How can I force ArcGIS to generate "color pallets" for display of GeoTiffs in the FAIMS Mobile App?

text: The FAIMS Mobile App 1 displays a black pane instead of a well rendered geotiff when I try to import files directly from ArcGIS 10.1 instead of processing them through gdal and grass. Running gdalinfo, the major difference between pre and post processing with GRASS is the presence of: > >     Band 1 Block=256x256 Type=UInt16, ColorInterp=Palette >       Color Table (RGB with 65536 entries) >         0: 5,5,5,255 >         1: 5,5,5,255 >   >     ... >   >       65534: 0,0,0,255 >       65535: 0,0,0,255 >   The ArcGIS produced Geotiffs by our resident mapping person do _not_ have this, unfortunately. I know a limitation of the Nutiteq rendering engine the app uses requires either this color palette or the kind of tiff that shows up normally when viewed with a normal image viewer. Our normal prep methodology is kind of painful, and I'm wondering if there isn't a simpler solution. Is there a way to force ArcGIS to generate a geoTIFF that:   1. Is in the required projection for display (EPSG:3857),    2. equivalent to -co TILED=YES (I know tiled means many different things, so this is the tiled of gdalwarp)   3. And has a written colour pallette for the UInt16 that it needs? 1Fair disclosure, I'm one of the FAIMS project leads.


title: QGIS: creating lines from starting to arrival points?

text: Is it possible in QGIS to create lines from a table storing the X,Y-coordinates of starting and arrival points? So that a line.shp is automatically created? Or exists a plugin to achieve that? Thank's for any advice! Best regards, phil


title: Can I view a Postgis Geometry Array in QGIS?

text: I have got an array of geometry as a column in postgis database. Is it possible to view the data (even the nth element?) in qgis?


title: How to add raster data to Table of Contents using python?

text: I can easily add shapefiles to the Table of Contents in Arcmap using the following codes:               mxd = arcpy.mapping.MapDocument("current")      df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]     path = os.path.abspath("shapefile_path")     addLayer = arcpy.mapping.Layer(path)     arcpy.mapping.AddLayer(df, addLayer)     arcpy.RefreshActiveView()     arcpy.RefreshTOC()     del mxd, addLayer       but I am confused how to add raster data (which usually consists of several files). Any help would be much appreciated.


title: How do osm2pgrouting and osm2po differ in their ways creation?

text: How do osm2po and osm2pgrouting differ in their algorithms for creating their `ways` table ? I've seen significant differences between their processing of the same osm extract. Processing the same file (us-midwest-latest.osm) from geofabrik using both `osm2po` and `osm2pgrouting` (and using config for cars only with both) resulted in nearly 400K more entries in the `ways` table from `osm2pgrouting` than in the corresponding `*_2po_4pgr` table. Does osm2pgrouting just create more nodes/vertices?


title: How to delete column/field in PyQGIS?

text: How to remove or delete column fields in a shape file using python?


title: Importing KML in QGIS - what are all the node elements that QGIS looks for other than Name and Description?

text: Of all elements given at (ref: http://service.kmlvalidator.com/ets/ogc- kml/2.2/) only Name and Description seem to be recognized on importing KML using QGIS 1.8.0-Lisboa. I would like to know if this is completely true or few other elements from the spec are also recognized? My question is related to the two below:   1. GDAL 1.9.1 ogr2ogr KML to PostGIS not incuding ExtendedData   2. How to convert KML to shape file without losing attributes?


title: How to compute geometric intersection using ArcPy?

text: I want to take geometric intersection of line and polygon shapefile. ArcPy has a tool:               arcpy.Identity_analysis      but it is available with "ArcGIS for Desktop Advanced" and I have "ArcGIS for Desktop Basic". Any replacement suggestions would be appreciative.


title: Any case when one must use older ArcPy cursors (not da module based)?

text: I was using the arcpy.da cursors in ArcGIS 10.2 to iterate for quite some time now yet didn't use "classic" cursors that became available in 10.0 a single time. Is there any situation where one would must (due to a limitation or a similar reason) use arcpy.%type%Cursor instead of arcpy.da.%type%Cursor? Esri help doesn't seem to outline any case when one would need to use classic one: > ArcGIS 10.1 added a new data access module (arcpy.da) The previously > existing cursors (that are still listed under arcpy) are still functional > and valid; however, the new arcpy.da cursors include significantly faster > performance. So, I am just wondering why Esri keeps updating the older arcpy cursors in 10.2 when the Data Access module is available since 10.1 and provides "better" cursors? Is there any other reason apart from keeping 10.0 scripts that use arcpy (not da module based) cursors running?


title: How to set style in the database (QGIS)

text: Is it possible to set style layers in the database? (QGIS) [MySQL database] I would like to set and share my style to other users when they open the layer it's still as my style. Thank you


title: Calculate shortest path between each lat/lon point in one table and each lan/lon point in another in Postgresql

text: I have two tables, both of them have only 2 columns. The first one contain only latitude and longitude coordinates of my source points and the other one only latitude and longitude coordinates of my target points. For each source point I have to find the closest (along the streets) target point (and tell what's the distance). I have already developed a function give_me_cost, that finds the closest node and performs the routing:               create or replace function nearest_node (double precision, double precision) returns           integer as     $$     SELECT id::integer as source_id FROM roads_vertices_pgr                             ORDER BY the_geom <-> ST_GeometryFromText('POINT('                             ||$1|| ' ' ||$2||')',4326) LIMIT 1;     $$ language sql;          CREATE OR REPLACE FUNCTION give_me_cost(double precision, double precision, double precision, double precision)       RETURNS decimal(8,8) AS     $BODY$     with subset as (     SELECT seq, id1 AS node, id2 AS edge, cost       FROM pgr_dijkstra(         'SELECT gid as id, source, target, st_length(geom) as cost FROM roads',         nearest_node($1,$2),nearest_node($3,$4), FALSE, False       ) as di     )     select sum(cost)::decimal (8,8) from subset          $BODY$       LANGUAGE sql VOLATILE;      Now I have to use it in some kind of loop, but don't know how. The most preferable solution would be the function, where I can input my source table and my target table and get an output of a table with sources, the closest targets and the distances between them. Any help appreciated.