title: How to Insert Feature into Feature Class (in Memory) ESRI

text: I'm looking for suggestions on how to insert a new feature instance into a feature class that is in memory -- assuming that I don't have access to the feature workspace. For example, the feature class has 4 "rows", and I want to add another to make the total 5. So something like this ....               void InsertFeatureInstance(IFeatureClass fc, IFeature feature)     {          // Do the work here.     }      I have a good idea how to do this when I have the feature workspace, using a feature cursor, calling CreateFeature, etc. But in this case, I want to be able to accomplish it all without touching the underlying geodb. Working in a stand-alone C# application, ArcGIS 10, and ArcGIS Engine. -- **EDIT** : _Here is the solution I came up with_. Some of it was copied from other code I got from somewhere else (can't remember where).               public static void InsertFeatureInstance(IFeatureClass targetFeatureClass, IFeature sourceFeature)     {         IFeature newfeature = targetFeatureClass.CreateFeature();         var simplifiedFeature = newfeature as IFeatureSimplify;         IGeometry myGeometry = sourceFeature.ShapeCopy;         simplifiedFeature.SimplifyGeometry(myGeometry);         newfeature.Shape = myGeometry;              for (int i = 1; i < sourceFeature.Fields.FieldCount; i++)         {             IFeatureClass sourceFeatureClass = (IFeatureClass) sourceFeature.Class;                  string fieldName = sourceFeature.Fields.Field[i].Name;             bool bCondition1 = fieldName == sourceFeatureClass.ShapeFieldName;             bool bCondition2 = (sourceFeatureClass.LengthField != null &&                                 fieldName == sourceFeatureClass.LengthField.Name);             bool bCondition3 = (sourceFeatureClass.AreaField != null &&                                 fieldName == sourceFeatureClass.AreaField.Name);                  if (!(bCondition1 || bCondition2 || bCondition3))             // Don't do shape fields             {                 int myTargetFieldId = targetFeatureClass.FindField(fieldName);                 // Id of field in source feature                 newfeature.Value[myTargetFieldId] = sourceFeature.Value[i]; // Copy value             }         }              newfeature.Store();     }


title: How do I performance test ArcGIS 10.0 in a Citrix environment?

text: I have a project (ArcGIS 10.0) for a client that could potentially be deployed in a Citrix environment. It will contain a fairly complex Add-In that will, among other things, import data, allow them to perform reclassifications on rasters, digitize features, and ultimately let them setup, through the Add-In interface, parameters for a 3D modeling scenario in a package outside of ArcMap. These setup parameters will probably be written to a XML file via .NET in the Add-In. The application of course isn't developed yet (as we are in the early stages of the project), but we need to test as much of the future functionality of the application as we can in their Citrix environment and on their local PC installs as well. We have test data to use. My question then is, **how do I go about performing tests that can provide metrics to compare performance of ArcGIS in their Citrix environment versus their local ArcGIS installs - are the there any software packages and/or methods/protocols I can employ?** Edit: We have thought about this some more and are thinking of doing some qualitative tests such as having bookmarks in the ArcMap project and having the user across the country time the draw speed, see how editing of point and line features performs, and 3D display in ArcScene. These are obviously very qualitative and subjective, but it's one approach.


title: Accessing additional ArcObjects from Python (i.e. without ArcPy)?

text: I would like to be able to script some things that are not exposed via `arcgisscripting` or ArcPy. How do I access ArcObjects from Python? I'm working with ArcGIS Desktop 9.3.1 right now, but will be upgrading to version 10 in the next few months.


title: In arcgis10.2, can I access arcobjects using python?

text: I am using python in Arcgis 10.2, but it seems Python cannot meet all my developing demands, from the forum, others recommend to use python to access arc objects,but what they mentioned is the old version, so I want to confirm whether I can make it in 10.2, any extension needed? If can, I can use vb.net and c# right? Everybody has experience on it?


title: Where can I find Stream codes for the State of Utah?

text: Does anyone know where I can find Stream (rivers, waterbodies) codes for the State of Utah? Thank You.


title: Finding distance of point along polyline?

text: We need to find the distance of a series of point along a given polyline. We have a polyline dataset repsenting rivers in a catchment, broken up into river reaches (FID 1 through 35 for example). We also have a point dataset of abstraction licenses within this catchment, some of which are situated along rivers - we can tell from the attribute table which these are as they are defined as groundwater or surface water licenses. The two are not related - i.e. one has not been derived from the other. Therefore not all the surface water licenses lie exactly over the river polylines, despite in 'reality' being on these rivers. We need to be able to see which points are "upstream/downstream" of each other, and so wanted to have a list of which river reach the point is on, followed by the distance downstream from the start of this reach. We can then compare the downstream distances of two point to see which is upstream and which is downstream - the desired outcome! To solve the problem of finding points on/very close to the rivers we were told to use a (small) buffer around each river reach and then to query the buffer to find the points within it. This is fine but we are then left with an area (buffer), not a line, so we can't measure a distance along/within this. Can we use a buffer as described to find out the points on/near the river reach in question and then, somehow (?!) query these points for distance along the river reach (polyline segment)?


title: How to convert a String variable to a Raster datatype using Calculate Value

text: I have a GP service I would like to consume in a Flex application, but one of the input data types can be a raster. ArcGIS Server does not support a raster data type as an input parameter, but according to their documentation here - Input and Output Data Types - you can create a variable in your model/script of type String and convert that into the data type your model requires. In their example they use an Areal Unit, but I need to convert to a raster dataset/raster layer. How would I implement this?


title: The layer added did not move in ArcGIS 10

text: I have a favor to ask. I already done the step that Mr PolyGeo and Aaron gave me from my previous question and it really look great when the layer did match all together. Thank you for that advise. It almost the same problem. The problem is, why the layer that I add into table of contents did not move into any single place that I edit in the properties?? It only stick into one place only. I have try many ways to change the location of the layer added. ![enter image description here](http://i.stack.imgur.com/43e0f.png) The red point is my layer added after I add the Bing Maps from Arcgis 10. Then I click the right click button < properties < Coordinate system. ![enter image description here](http://i.stack.imgur.com/kZoA7.jpg) ![enter image description here](http://i.stack.imgur.com/wRoth.jpg) ![enter image description here](http://i.stack.imgur.com/aXNCn.jpg) I'm still learning the basic tho. Please kindly help me. Thank you.


title: Vectors created in OTB Monteverdi are displaced

text: I'm using the Orfeo Toolbox Monteverdi in combination with QGIS in order to produce classified vectors of vegetation cover which I then use in maps in QGIS. (I can't use the QGIS OTB plugin because as far as I can tell it doesn't run on OS X - I'd be pleased to be corrected on that though). Versions:   Monteverdi 1.10 (edit - just updated to 1.12 and tried that, same result)   QGIS 1.80   OS X 10.6.8   When I load the resulting shapefile into QGIS, it always appears displaced by about 75km to the north east of where it should be. As far as I can tell it's not a datum/projection issue as the CRS is the same for all layers. My work flow is as follows:   * produce georeferenced raster image from scanned jpg in QGIS   * load raster in Monteverdi   * perform supervised classification using SVM Classification tool   * export resulting classified vectors as shapefiles   * open vectors in QGIS The vectors then display at a location different to the original georeferenced image. I'll post the files of interest if anyone would like to check them out to see if I'm doing something wrong. http://bit.ly/NCXasm - original GeoTiff raster (270kb zipped)   http://bit.ly/TDFWiS - final vectors produced in OTB and then merged to a single shapefile in QGIS (119kb zipped) Any assistance or advice would be much appreciated.


title: Convert SmallWorld GIS topology to pgRouting topology

text: Is there any way to convert SmallWorld GIS topology to the format that pgRouting use? My costumer have use SmallWorld GIS and make his topology on it. but when he export his information as shape file, the topology is gone! How can the topology be preserved?


title: Convert MGRS using gdaltransform

text: I'm using gdaltransform to convert coordinates. What's the best way to convert MGRS using gdaltransform given that it doesn't have an EPSG code?


title: Why esriSpatialRelTouches relation does not work?

text: I have two feature layers. The first one is just a polygon and the other one consists of a series of polygons which are enclosed by the first one. Thus, some polygons of the second feature layer touch on the boundaries of the first feauture layer. I wrotre a code (the basic part shown below to identify which polygons of the second layer touches the boundary of the polygon in the first layer but while the code runs without a problem it does not identify (e.g. by giving FID with Msgbox) any such polygon whilsty it should. Any help please?               Dim pBlockBoundaryFC  As IFeatureClass     Set pBlockBoundaryFC = pBlockBoundary.FeatureClass               Dim pBlockBoundaryFields  As IFields     Set pBlockBoundaryFields = pBlockBoundaryFC.Fields          Dim pGeom As IGeometry               Dim pSpatialFilter As ISpatialFilter     Set pSpatialFilter = New SpatialFilter          Dim pBlockBoundaryCursor As IFeatureCursor     Set pBlockBoundaryCursor = pBlockBoundaryFC.Search(pSpatialFilter, False)               Set pBlockBoundaryFeature = pBlockBoundaryCursor.NextFeature     Do Until pBlockBoundaryFeature Is Nothing          Set pGeom = pBlockBoundaryFeature.Shape     With pSpatialFilter      ' ** _*_ ** _*_ ** _*_ ** _*_ ****** 'Conversion Dim pPolygonBoundary As ITopologicalOperator Set pPolygonBoundary = pFeature.Shape Set pGeom = pPolygonBoundary.Boundary ' ** _*_ ** _*_ ** _*_ ** _*_ *****               Set .Geometry = pGeom         .GeometryField = "Shape"         .SpatialRel = esriSpatialRelTouches     End With          Dim pRelOp As IRelationalOperator     Set pRelOp = pGeom            Set pNewParcelsFeature = pNewParcelsCursor.NextFeature       Do Until pNewParcelsFeature Is Nothing              FID = pNewParcelsFeature.Value(intposFID)         If pRelOp.Touches(pNewParcelsFeature.Shape) Then              ''Report the FID of each parcel that 'touches' the exetrnal boundary         MsgBox FID         End If          Set pNewParcelsFeature = pNewParcelsCursor.NextFeature          Loop               Set pBlockBoundaryFeature = pBlockBoundaryCursor.NextFeature          Loop


title: Using GeoServer with ArcGIS Viewer for Flex

text: I need to create a web GIS application using the ArcGIS Viewer for Flex graphical Appbuilder. Can I use it with GeoServer to publish my GIS data or is the viewer made exclusively for ArcGIS for Server?


title: Source for countries/country codes for the entire world?

text: Is there any Google API which would return all the countries in the world with the country code?


title: Request data from OpenLayers to a standalone GeoWebCache

text: I'm actually using OpenLayers and GeoServer to make a GIS application. For the moment, GeoWebCache is directly integrated into GeoServer, but for my future needs, I'll need to have it as a stand alone. I've dowloaded it and deployed it, but now I can't make it work. But I basically want to do is, for the moment, use it as a "firewall". Typically, in OpenLayers I have such requests :               "http://129.182.247.82:8080/geoserver/wms,"      to retrieve WMS data. What I want to do, is to change this URL to make it point to the GeoWebCache stand-alone, and then the GeoWebCache stand-alone will call the right layers into GeoServer. I followed this documentation : http://geowebcache.org/docs/current/quickstart/index.html But I can't make it work. I had no geowebcache.xml to test layer so I created one from github and put it into WEB-INF/classes, but it still does not work. Inside my geowebcache-core-context.xml I've added lines like this :               <bean id="gwcWMSConfig" class="org.geowebcache.config.GetCapabilitiesConfiguration">     ...     <constructor-arg value="http://http://129.182.247.82:8080/geoserver/ows?service=WMS&request=GetCapabilities&version=1.1.0">      and this               <bean id="gwcTLDispatcher" class="org.geowebcache.layer.TileLayerDispatcher">     ....     <constructor-arg ref="gwcGridSetBroker"/>     <constructor-arg ref="gwcWMSConfig"/>     <constructor-arg ref="gwcXmlConfig"/>     </bean>      But still nothing is working, and I'm quite lost :'( ! Any help would be gladly appreciated :-)!


title: ArcMap reports that PostGIS polygon data is self-interescting

text: I have an ESRI File Geodatabase of data that I upload to PostGIS using FME. Seeing as I have to have the data in PostGIS for other purposes, it would be great to view the data in ArcMap straight from the PostGIS database, rather than having to use the file geodatabase. I dont need to edit the data in ArcMap. If I open the data from the ESRI File Geodatabase in ArcMap or QGIS, the data displays fine. If I load the PostGIS version in QGIS, it displays fine. However, when I open the PostGIS version in ArcMap, I get the following error: > One or more layers failed to draw: Linestring or poly boundary is self- > intersecting In my FME workspace I am using a GeometryValidator transformer to check that the geometries are correct - I use the tests Fails OGC Simple and Fails OGC Valid and write only the valid geometries to PostGIS. At the moment I am only loading the valid geometries to PostGIS (I will deal with the invalid ones once I get get ArcMap to display the valid ones). I have double checked that the data is valid in PostGIS by checking the data with ST_IsValid(). I am using ArcGIS 10.2.1 and what I believe is a supported version of PostgreSQL/PostGIS (PostgreSQL 9.2.4 64-bit and PostGIS 2.0.3). I also have the dll files on the client machine and have no problems connecting the the database. I have also tried with a newer version of both PostgreSQL and PostGIS (which are not supported by ESRI) and they dont work either. Any ideas?


title: Cut polylines at intersections in QGIS (or how many km road for each country)

text: I want to measure how many km a road stand on each country it intersect (i.e. how many km of the european road "E45" stand on Italy, Austria, Germany, and so on). I have a polyline-shapefile with the "road" and a point-shapefile with the intersections of the "road" with the "nation-borders". 1) How I can cut automatically the road on each point? 2) How I can measure the distance on road between two consecutive point? I'm trying to do it with QGIS. Thanks, ge.Ko


title: Dynamically cutting shapefiles based on an eliptical or polygonal form

text: I have been trying to cut a shapefile in small parts in order to reduce the processing of the graph created based on that map. I did find the ogr2ogr clipsrc option however, as far as i know, that one uses only a bounding box which is ok, but still includes unnecessary data that i want to get rid off. Basically i need to cut the shapefile in an elliptical form and that ellipse would have the major axis determined by the 2 points that i would insert. Is there any way i can accomplish that?


title: How to build, store and index a road network from a digital city map

text: I'm totally new to this domain so my question may sound like a little bit silly…… I'm eager to know how to extract, store and index the coordinates of the road segments(edges) and intersections or endpoints(nodes) according to a digital city map. First, the map contains a lot of layers yet I'm only concerned about the roads layer. It seems like I'm not allowed to choose a certain layer map (road layer) to be exported in OpenStreetMap. Is there any solution or alternative map to recommend? Second, I have no idea what software or programming language is appropriate to extract the road network. I downloaded and installed arcGIS which seems like a very complicated software and I just want to learn the skills that I need to solve my problem. So I hope someone could recommend some software or tutorial or just give a clue to me. Third, if there is a flyover or overpass in the map, how to distinguish it from other roads? After extracting the road segments from map, how to store them and index them like using a database? Many thanks!


title: Postgres self self intersecting polygons and error

text: I have a land parcel which has self intersecting polygons and I am trying to create a view to select all the distinct polygons but sql query does not generate correct results. The polygon has 500 attributes and hence the query generates 1000 attributes instead of the distinct intersecting polygons. I would like to also generate the distict gid from the parcel as a rownumber   select Distinct a.gid,a.geom,b.geom,b.gid   from polygon_layer as a   inner join   polygon_layer as b   on st_overlaps(a.geom, b.geom)   where a.gid <> b.gid


title: Is there a way to quick change the outline color of a polygon in ArcGIS 10 without open the "Symbol Selector" window?

text: Sei que é possível alterar a cor de um preenchimento clicando com o botão direito na caixa do símbolo de qualquer layer e aí basta escolher uma com simples. Tem como alterar o contorno do polígono sem abrir a janela "Symbol Selector"? -- I know it's possible to quick change the fill color of a polygon by right- clicking the symbol box of any layer and just pick a simple fill color. Is there a way to change the outline without open the "Symbol Selector" window? ![How to change outline color without this window?](http://i.stack.imgur.com/MG32Y.jpg)


title: How can i set scale for each layer symbol?

text: I'd like to use reference scale : 1:10000000 for layer a and 1:2000000 for layer b to set scale of labels and symbologies. one method is Working with data frame reference scales but this method works for all of layers in data frame . i want to use scales separately. How can i set scales for each layer? or any method to set size of symbology and labels?


title: What's the best way to produce a density map from weighted points in QGIS?

text: I'd really like to repeat the functionality of the ArcGIS Kernel Density tool - how could I do that? I would like to **limit answers to easy-to-install free-and-open-source software** – i.e. QGIS installs easily with GRASS on all platforms so QGIS+GRASS would be fine, but SAGA does not (unfortunately, since it has what may be the ideal tool). I am trying to produce density maps of wildlife across protected areas in QGIS. The density map in the following example was produced in ArcGIS from point observations of wildlife, with raw counts of group size (a field in the vector file) used to weight the density of each grid cell in the Kernel Density (SpatialAnalyst) tool, with a chosen search radius and grid cell size: ![Wildlife density in Kafue National Park with 5x5km grid cells and 7.5 km radius kernel density](http://i.stack.imgur.com/RASzd.png) In a previous question on density, it was suggested to use the GRASS v.kernel tool to mimic the ArcGIS Kernel Density tool, but **v.kernel doesn't do the same job**. After looking at the manual and (successfully) producing a density map, it seems that the v.kernel function only works with **point density** , and there is no opportunity to give a variable for each point (such as raw counts) to weight each point. **UPDATE** There seem to be various `*.surf.*` tools in GRASS that may help create a density surface - and these do accept a weighting column or z-value, or are performed on rasters. @underdark suggested v.surf.rst - and the 'zcolumn' would be my weighting (count) variable - but I cannot figure out how to ask the tool to create a certain grid size or use a certain radius. Suggestions on how to use v.surf.rst or any other method? * * * **Sample data**               x,y,count     431250,8707500,0     418750,8707500,5     413750,8707500,3     411250,8707500,1     408750,8685000,0     411250,8685000,0     416250,8685000,0     416250,8682500,6     411250,8682500,3     418750,8680000,0     433750,8677500,3     421250,8677500,0     423750,8675000,1     431250,8672500,0     428750,8672500,2     426250,8672500,2     423750,8670000,0


title: How to restrict search area by city in cloudmade?

text: I use cloudmade geocoding api for search some geographic entity in a certain city, but i don't know how to restrict search area by city. I try to use structured query, for example: **http://beta.geocoding.cloudmade.com/v3/api key/api/geo.location.search.2?q=[city=my_city_name]** but, response, what i retrieved, doesn't looked like what i need. I know about bbox, but i don't know how to determine bbox for a certain city. I will welcome any suggestions.


title: Placement of a fixed-radius circle on a sphere to maximize point containment

text: There are many papers on the "Circle Placement Problem" in 2D Euclidean space, but I haven't been able to find any papers discussing this problem on the sphere. The problem is: given a set of points on a sphere and a fixed radius for a circle, find the location to place the circle that will cover the maximum number of points. An example of a paper that discusses this problem in 2D is "On a Circle Placement Problem" by Chazelle and Lee. As discussed in this paper, this problem could be used to find the best location for a radio transmission tower with a fixed range given the locations of nearby cities. Any thoughts you may have would be welcome. Thanks!


title: How to number polygons according to their spatial relationships?

text: I have, for example, this layer in postgresql (polygons):               table : poly (objectid: integer, num: integer, shape: geometry)      ![](http://i.stack.imgur.com/cGGgl.jpg) I want to enumerate the polygons from left to right and top to bottom like this: ![](http://i.stack.imgur.com/N7GVZ.jpg) I am working with Vb.net, ArcEngine, PostgreSQL, and ArcSDE. ### Solution that I proposed I think to create grid lines (red layer; see picture) and iterate it, then verify intersection and finally enumerate the polygons. Will this work? ![](http://i.stack.imgur.com/MKJlP.jpg)


title: How can I create a basemap from an NAIP image using QGIS?

text: I unzipped the image and loaded it in QGIS as a raster. Now, how can I turn that image file into a basemap that lines up with a specific coordinate system?


title: Unique Character Generator Help

text: I am working on a script that will populate 3 letters into a field. I have to use letters due to field limitations and to make sure that I have enough combinations. I'm not really sure where I am going wrong but I don't get the repeated values filtered out consistently. It seems to happen most of the time, just not all. Any one see anything wrong in my code?               import random, string, arcgisscripting, time          gp = arcgisscripting.create(9.3)     gp.OverwriteOutput = 1          # Lets set up some variables     layer = "Layer Goes Here"      field = "Code"      length = 3 # Declares the number of character to be created.          uniquelist = [] # Empty list to store already created characters.               ##########Define the random character generator##############          def ranchar(length):         myrg=random.SystemRandom              characters=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]         pw=string.join(myrg(random).sample(characters,length))         randomval = (pw.replace(' ', '')) # Removes some spaces between the letters.                   return randomval          #############################################################          cur = gp.UpdateCursor(layer)     row = cur.Next()          while row:         randomval = ranchar(length) # Grabs a random character.              if randomval in uniquelist: # check to see if it already exists.             print str(randomval) + " already exists, generating new value"         else:             uniquelist.append(randomval) # If the value isn't in the list, adds it.             print uniquelist[-1] # Just for display.             row.SetValue(field,uniquelist[-1]) # Grabs the last value from the list and writes it.         cur.UpdateRow(row)         row = cur.Next()          # Delete cursor and row objects to remove locks on the data     #     del cur, row      Thanks, -Mike


title: Geoprocessing in 3D

text: I am looking for some advice regarding suitable software for geoprocessing in three dimensions. Specifically, I need to regularly undertake the following tasks:   * Intersect a line with a surface and output the XYZ value of the point   * Intersect a surface with a surface and return a 3D polyline   * Clip a solid to a surface What software do others in the community use for such tasks? I am especially interested in software that others have used successfully in the resources industries, particularly for hydrological and geotechnical work.


title: How can I create a simple basemap in QGIS that will allow me to trace a polygon with an accurate projection?

text: I need to find an aerial photograph, create a new vector layer, trace several fields in this aerial photograph, and find random coordinates within these polygons. I first tried this with the Google plugin. This, unfortunately, uses the Mercator projection, which I think threw everything off. What is the easiest way to do it?


title: Group adjacent polygons with similar (but not same) attributes

text: In ArcMap 10, I have a few dozen tiffs with cells that represent habitat area that has been burned. Each burned cell has a Julian date of the fire associated with it. I want to end up with polygons that represent a single fire event each, defined as (8-way) contiguous groups of cells where no bordering burned cells differ by >1 Julian day; i.e., where burned cells differ by 2 or more days, these would be classed as separate fires. If I convert the tiffs to shp files based on the date field, it groups all the contiguous cells for a single date. How can I merge only the polygons that are both adjacent and differing by one day?


title: What units are my coordinates in?

text: I opened a georeferenced NAIP photo to a new project in QGIS. The coordinates were expressed as: 2199240.6, 616858.7. The same point in Google Earth was expressed in degrees, minutes, seconds, as 41°51'25.33"N, 76°54'12.14"W. In what form is QGIS displaying the coordinates? Are these correct? When I opened the NAIP tif in QGIS, the CRS set itself to NAD83/Pennsylvania North.


title: How can I view a .kml or .kmz file on a mobile device offline?

text: I need to view a KML/KMZ file on a mobile device in a remote area where there will not be service.   I have downloaded apps that have maps of the area;   these maps will be available offline.   However, I dont think they have a capability to import the kml/kmz file. What can I do to make these files accessible without pulling data from the network?   Keep in mind I also need GPS capability (all the mapping apps Ive downloaded have it, so this shouldnt be a problem).   If thats not possible, can I save the text of the kml/kmz and at least have that on my mobile device?   IPhone 5   Thanks!


title: getLonLatFromPixel not always correct / consistent

text: I have a problem with the conversion from pixel to lon/lat. It's not always correct. The map is a simple XYZ map. The items on it are dragable. But after I dragged an item it gives me a wrong lon/lat value. Most of the time it's 50 pixels to low. I've created a grid on the map with lines every 100 pixels. When I move an item on the 3th line sometimes I get 300, other times 250. Is this a bug in OpenLayers or is there something I did wrong?               groundplan = new OpenLayers.Layer.XYZ(         'GroundPlan',         '@Url.Content("~/Centrals/" + ViewBag.Id)/Maps/' + planId + '/${z}/${x}/${y}.jpg',         {             attribution: "© Limotec",             transitionEffect: 'resize',             maxExtent: new OpenLayers.Bounds(0, 0, 4096, 4096),             maxResolution: 4096 / 256,             numZoomLevels: 5         }     );     map.addLayer(groundplan);          markers = new OpenLayers.Layer.Vector("Markers",         {             renderOptions: { yOrdering: true },             renderers: renderer         }     );     map.addLayer(markers);          dragFeature = new OpenLayers.Control.DragFeature(markers);     dragFeature.onComplete = function (feature, pixel) {         var id = feature.geometry.id;         id = id.replace('Det_', '');              //var lonLat = map.getLonLatFromPixel(pixel);         var lonLat = groundplan.getLonLatFromViewPortPx(pixel);         console.info("Moved detector " + id + " naar " + lonLat.lon + " - " + lonLat.lat + " (x: " + pixel.x + " y: " + pixel.y + ")");              $.post('@Url.Action( "MoveDet", "Api" )',             { "centralId": @ViewBag.Id, "id": id, "lat": lonLat.lon, "lng": lonLat.lat }         );     }          dragFeature.handlers['drag'].stopDown = false;     dragFeature.handlers['drag'].stopUp = false;     dragFeature.handlers['drag'].stopClick = false;     dragFeature.handlers['feature'].stopDown = false;     dragFeature.handlers['feature'].stopUp = false;     dragFeature.handlers['feature'].stopClick = false;      map.addControl(dragFeature);     dragFeature.activate();


title: TopoJSON: how to calculate scale and translate?

text: ## Context: I'm using the topojson file format along with d3. Since I could not find a library in Python that handles this format, I'm writing one. I've got the topojson to other formats working. ## Question: **When converting other formats to topojson, how do I calculate the ideal value for the topojson transforms`scale` and `translate`?** In order to save space (among other tricks), the format uses relative integer offsets from the previous point. For example, this is the topojson file for Aruba:               {       "type": "Topology",       "transform": {         "scale": [0.036003600360036005, 0.017361589674592462],         "translate": [-180, -89.99892578124998]       },       "objects": {         "aruba": {           "type": "Polygon",           "arcs": [[0]],           "id": 533         }       },       "arcs": [         [[3058, 5901], [0, -2], [-2, 1], [-1, 3], [-2, 3], [0, 3], [1, 1],           [1, -3], [2, -5], [1, -1]]       ]     }      The same information as a GeoJSON feature looks like this:               {         "type" : "Feature",         "id" : 533,         "properties" : {},         "geometry" : {             "type" : "Polygon",             "coordinates" : [[                      [-69.9009900990099, 12.451814888520133],                       [-69.9009900990099, 12.417091709170947],                       [-69.97299729972997, 12.43445329884554],                       [-70.00900090009, 12.486538067869319],                       [-70.08100810081008, 12.538622836893097],                       [-70.08100810081008, 12.590707605916876],                       [-70.04500450045005, 12.608069195591469],                       [-70.00900090009, 12.55598442656769],                       [-69.93699369936994, 12.469176478194726],                       [-69.9009900990099, 12.451814888520133]                 ]]         }     }      It is easy to see how the former is more compact than the later. In order to obtain the absolute coordinates, the function is:               def arc_to_coordinates(topology, arc):         scale = topology['transform']['scale']         translate = topology['transform']['translate']              x = 0         y = 0         coordinates = []              for point in arc:             x += point[0]             y += point[1]             coordinates.append([                 x * scale[0] + translate[0],                 y * scale[1] + translate[1]              ])              return coordinates      Reading topojson is easy enough:               >>> arc_to_coordinates(topology, topology['arcs'][0])     [[-69.9009900990099, 12.451814888520133],      [-69.9009900990099, 12.417091709170947],      [-69.97299729972997, 12.43445329884554],      [-70.00900090009, 12.486538067869319],      [-70.08100810081008, 12.538622836893097],      [-70.08100810081008, 12.590707605916876],      [-70.04500450045005, 12.608069195591469],      [-70.00900090009, 12.55598442656769],      [-69.93699369936994, 12.469176478194726],      [-69.9009900990099, 12.451814888520133]]      ## Update: Reading Mike Bostock's code, I saw this:               kx = ((Q - 1) / (x1 - x0)) if x1 - x0 else 1     ky = ((Q - 1) / (y1 - y0)) if y1 - y0 else 1     ...     scale = [1/kx, 1/ky]        In the example, given the bounding box in the form (x0, y0, x1, y1), Q seems to be around 6 and 12 for the values [0.036003600360036005, 0.017361589674592462].               >>> x0, y0, x1, y1     (-70.08100810081008, 12.417091709170947, -69.9009900990099, 12.608069195591469)     >>> Q = 6     >>> 1 / ((Q - 1) / (x1 - x0))     0.036003600360035644     >>> Q = 12     >>> 1/ ((Q - 1) / (y1 - y0))     0.017361589674592892      I know the Q has to do with quantization, any idea where the Q values near 6 and 12 came from?


title: Bounding geo points

text: I am kinda new to geo data processing. For my sample project I am trying to solve next problem. I have array of geo points. If we place it on plot we can visually see that there are areas where density is higher. I need to find this areas. I heard about R-tree's and bounding box. But can someone advice me on what way should I go and what material should I read? Thank you for your time. ![example boud](http://i.stack.imgur.com/8sEpo.png)


title: Labeling in MapInfo using expressions

text: How do I do this? Columns - Sitecode Acres   271730-001 .75 271730-002 .50 I'm trying to label objects by multiplying the Acres column by "2.5". As an example using first row from above: ????(Acres*2.5, ??) should label as "1.875"


title: How to parse fields values using ArcView 10.0 scripting

text: I am using 10.0 ArcView and am trying to get the "R" in R12345678910 to drop. I lost all my scripts I've saved and appreciate some assistance. The numbers are in a column in the attribute table and i've always used VB scripting. I was using Field Calculator.


title: Running a Python Script to Extract Raster Data in QGIS

text: I am trying to use QGIS to extract raster statistics for shapefiles (I have shapefiles of species distribution and I want to extract environmental data from within each species' range). This is possible using the Zonal Statistics plugin however I have about 300 shapefiles I need to get data from. I've tried merging the shapefiles into one but this results in massive files that cause QGIS to crash (using shapfiles >15mB causes problems). Is there a way to automate the procedure using a Python script? I found a post that details how to run ZonalStats using Python (How to calculate raster statistics for polygons? second answer) but can't get it to work. I know absolutely nothing about Python and so I'm not sure if there's something that needs to be done before attempting to run the script or if the problem is something else. A similar script that will run on its own without user input would be ideal. I'm running QGIS 1.8 on a Linux machine. Any help would be much appreciated.


title: Problem loading output layer QGIS

text: Every time I run operations with temporary file output from the graphical modeler, I get the following error message: > Oooops! The following output layers could not be open CLIP: > C:\Users\Amine\AppData\Local\Temp\processing\371888fc2a8e444082652967444c577e\OUTPUTALG1.tif > The above files could not be opened, which probably indicates that they were > not correctly produced by the executed algorithm Checking the log > information might help you see why those layers were not created as expected This is a simple clipping operation that should not cause such drama in QGIS. I also get similar, if not worse errors, when outputting rasters using GRASS or SAGA commands. Can anyone please help? I've looked through and updated the processing options however this doesn't change anything.


title: How to extract elevation from .HGT file?

text: I want to asign a specific long/lat position on a map the elevation from SRTM3 data files, but have no idea how to find the specific value. So I want some example of how I can find in N50E14.hgt elevation to 50°24'58.888"N, 14°55'11.377"E. Thanks so much.


title: How to make Stored Queries for WFS 2.0.0 in Geoserver

text: I am a new user of Geoserver. I have created a WFS and also could connect it with the QGIS WFS 2.0.0 Client plugin available now. But as like the default WFS link in that plugin I am not able to make a query in my service. Also the metadata is not coming for my service. Can anyone help me in this regards? What do I actually have to do to make the stored queries and also to get metadata? Where to start doing that?


title: QGIS 1.8 fails to add vector data layer from directory

text: I 'm running QGIS 1.8 on Windows 7 and trying to add vector data from an ESRI gdb directory. It worked before on another machine, after following the instructions on this thread: How to get ".GDB" (Esri File Geodatabase) support in Quantum GIS (osgeo4w - qgis) I followed the same instructions again and while I receive a 'select vector layers to add' window showing the list of layers, after the selection the application crashes. I just take a 'qgis.exe has stopped working' message. Any ideas?


title: Handling "bad layers" in QGIS version 1.9

text: I'm having a problem every time I try and open any project in qgis 1.9. It will load part of a few layers and then a yellow bar comes up across the top of the map area that says "Handle Bad layers: 23 of 23 bad layers were not not fixable." (I was going to post a screenshot but apparently I don't have enough "reputation" to do so.) It doesn't tell you any thing about what's wrong with any of these layers or allow you to do anything other than close the warning! Does any one have any ideas? **_Please_** help!!! * _*_ *Sorry about that, this is from a project that I made. I'm using pgAdmin III and the layers are postGIS and it was working fine yesterday when I shut my machine down. I have the log message if that would help? * * * When you bring up the log messages, there are four tabs: General, Plugins, Python and PostGIS. This log was under the Python tab.               warning:/usr/lib/python2.7/dist-packages/osgeo/gdal.py:81: DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal       DeprecationWarning)          traceback:  File "", line 1, in        File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 212, in startPlugin         plugins[packageName].initGui()       File "/usr/share/qgis/python/plugins/plugin_installer/installer_plugin.py", line 69, in initGui         plugins.getAllInstalled()       File "/usr/share/qgis/python/plugins/plugin_installer/installer_data.py", line 634, in getAllInstalled         plugin = self.getInstalledPlugin(key, False, testLoad)       File "/usr/share/qgis/python/plugins/plugin_installer/installer_data.py", line 531, in getInstalledPlugin         exec("import %s" % key)       File "", line 1, in        File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 452, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/home/localadmin/.qgis2/python/plugins/image_cutter/__init__.py", line 26, in          from image_cutter import Image_Cutter       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 452, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/home/localadmin/.qgis2/python/plugins/image_cutter/image_cutter.py", line 33, in          from dlgImageCutter import ImageCutterDlg       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 452, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/home/localadmin/.qgis2/python/plugins/image_cutter/dlgImageCutter.py", line 30, in          import gdal       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 452, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/usr/lib/python2.7/dist-packages/gdal.py", line 3, in          deprecation_warn('gdal')           * * * Under the PostGIS tab it just says: invalid PostgreSQL layer * * * I tried manually re-adding the layers that didn't load earlier today and it gave this under the PostGIS tab: ` Erroneous query: SELECT styleQML FROM layer_styles WHERE f_table_catalog='howell' AND f_table_schema='original' AND f_table_name='oh_secondary' AND f_geometry_column='the_geom' ORDER BY CASE WHEN useAsDefault THEN 1 ELSE 2 END,update_time DESC LIMIT 1 returned 7 [ERROR: relation "layer_styles" does not exist LINE 1: SELECT styleQML FROM layer_styles WHERE f_table_catalog='how... ` I have no idea what styleQML is...or layer_styles for that matter. lol.


title: Joining intersected polylines using rules based rendering

text: > **Possible Duplicate:**   >  Setting rendering order of line layers in QGIS I have trouble getting two intersecting polylines to look like they were joined at rendering. I am using rules based rendering and these two lines are rendered with same rules, so they look identical. One line ends where the other begings, but the line does not render to look smooth - rather it renders the end of other line. Example: ![http://s8.postimage.org/j4nvf2ubp/rendering_problem.png](http://i.stack.imgur.com/2WA2T.png)


title: Symbol levels in QGIS 2.0

text: I have used symbol levels in my current project to define the hierarchy of the different roads. I have tried to make the symbol levels the same in order to achieve the desired look, with no luck. The roads are a minor element in the map that I am making and will all be symbolized the same except for width. shown in this![screenshot](http://i.stack.imgur.com/jmCvZ.png), FYI colors have been added for clarification. The green are US Routes, orange are State Routes and white are local roads. If they are all white, is there a way in QGIS to have them look joined at there intersections, similar to all intersections of the local roads? This is a tough one to explain, so if clarification is needed, please let me know.


title: Getting dataProvider from vector layer outside QGIS

text: I'm using PyScripter to explore PyQGIS API because of it's very handy auto- completion function. I've managed to get a handle on a PostGis vector layer by:               >>> from qgis.core import *     >>> uri = QgsDataSourceURI()     >>> uri.setConnection("<some URL>","5432","<DB name>","<user>","<password>")     >>> uri.setDataSource("public","<table name>","<geometry column name>")     >>> vLayer=QgsVectorLayer(uri.uri(),"<layer name>","postgres")     >>> vLayer     <qgis.core.QgsVectorLayer object at 0x052B4D68>      So far so good. My next step is to explore the layer's dataProvider.               >>> vLayer.dataProvider()     >>>      Why doesn't vLayer.dataProvider() yield anything, like in QGIS Python Console? Do I need to initialize vLayer more?


title: How to compile QGIS with Oracle Spatial support for Linux?

text: I compiled it on Fedora and Ubuntu, but got error "Cannot get Oracle select dialog from provider." while trying to add Oracle layer. Packages in repositories don`t have oracle spatial support. Can somebody help me? I need deb or rpm package with oracle spatial and qgis-mapserver support.


title: How to check for overlapping check with tolerance using JTS / GeoTools

text: I have several hundered polygons which may overlap but need to be considered 'not overlapping' when the overlapping is less than 1 meter. The overlapping check in JTS does not offer a tolerance parameter. I'm looking for a pattern how to solve the problem.


title: Inserted Images distorted on exported Map

text: I have a map set that has images on top of the map I have created in ArcMap, that I arranged in layout view. I have tried both PNG and Tiff images, to try to keep the resolution as high as possible because when I go and export to PDF and then print the maps, I am loosing graphics in the images. I have increased the Output image quality to Best and increased the Resolution to 350dpi, which has increased the file size to 13MB, some of the lines that were disappearing before have shown up, but they are not complete. I am converting these image file from PDF's through adobe. Is there a best file type, or export process that may help rectify this issue of the image files that are overlaid on my map to come through as complete?


title: Where can I find country borders data in human-readable format?

text: I'm trying to obtain some data representing the borders of all countries in the world. This data doesn't have to be very precise, it is to draw the countries on a computer screen. I did a bit of research and keep stumbling upon binary formats for this data to be opened in various programs and what not. Here is an example of what would be a good resource, but unusable to me. I don't want to have to write a binary format parser if possible. So my question is two-fold:   * Are there any resources for simplified country borders in plain text? (XML, JSON, CSV, etc)   * If not, are there any programs where I could export the binary data found all over the web in those formats? Thanks.


title: Draping floating layers on elevation surface in ArcGlobe not working

text: I've been trying to drape floating layers in a globe document onto a new elevation surface programmatically, but haven't had much luck. The big picture is as follows: 1) Assign globe document to my application's GlobeControl 2) Add an elevation layer to the globe 3) Loop through all floating layers, and re-drape on that elevation surface. I found several ESRI developer articles on the various pieces, but haven't had success putting them together. Here's the code: ADD ELEVATION LAYER TO GLOBE (works OK):                IGlobe theGlobe = axGlobeControl1.Globe;      IRasterLayer mergedElevLyr = new RasterLayerClass();      mergedElevLyr.CreateFromFilePath("C:\\temp\\Alpacas\\DTED\\MergedElev_111711.img");      mergedElevLyr.Visible = false;      theGlobe.AddLayerType((ILayer)mergedElevLyr, esriGlobeLayerType.esriGlobeLayerTypeElevation, false);      RE-DRAPE FLOATING LAYERS (doesn't seem to work):                IGlobeDisplay theGlobeDisp = theGlobe.GlobeDisplay;      IGlobeDisplayLayers theGlobeDispLyrs = (IGlobeDisplayLayers)theGlobeDisp;          IGlobeLayerProperties globeLayerPropertiesCls = new GlobeLayerPropertiesClass();      globeLayerPropertiesCls.Type = esriGlobeDataType.esriGlobeDataElevation;          ILayerExtensions layerExtension = (ILayerExtensions)mergedElevLyr;      layerExtension.AddExtension(globeLayerPropertiesCls);          IGlobeLayerProperties pGlobeLyrProps = null;      IGlobeHeightProperties pGlobeHtProps = null;          // Find and loop through floating layers (works OK)      IEnumLayer floatingLayers = theGlobe.get_GlobeLayers(null, false, false, true);      ILayer theFloatingLayer = floatingLayers.Next();      while (theFloatingLayer != null)      {      pGlobeLyrProps = theGlobeDispLyrs.FindGlobeProperties(theFloatingLayer);      pGlobeHtProps = pGlobeLyrProps.HeightProperties;          pGlobeHtProps.BaseLayer = mergedElevLyr;      pGlobeHtProps.BaseOption = esriGlobeLayerBaseOption.esriGlobeLayerBaseLayer;      pGlobeHtProps.Apply(theGlobe, theFloatingLayer);      theGlobe.GlobeDisplay.RefreshViewers();          theFloatingLayer = floatingLayers.Next();      pGlobeLyrProps = null;      pGlobeHtProps = null;      }      For the re-draping, I'm doing what I found in the following articles:   * http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000019z000000   * http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004900000003000000 If I go into ArcGlobe, add the elevation layer, and then do the re-draping everything seems to be OK. However, when doing it in my application, I don't see any change in the view after the re-draping. If anyone can offer any suggestions, I'd really appreciate it. Thanks!


title: Split a line feature using nearby points

text: I have a line shapefile and a point shapefile, and   * the line has its own segments ![enter image description here](http://i.stack.imgur.com/7SFxH.png) and its attribute table, ![enter image description here](http://i.stack.imgur.com/36WiZ.png)   * the point shapefile has points near the line above, not on it ![enter image description here](http://i.stack.imgur.com/s5OKI.png) and the close look, ![enter image description here](http://i.stack.imgur.com/euTe6.png) **Can I use QGIS or other open source tools to split this line at locations which are nearest to the points？** **And after this procedure I can get the original line with more segments(because being split).** For example, find the location on the line, which is the nearest to the point, and split the line at this location(star). ![enter image description here](http://i.stack.imgur.com/curgz.png) I am using QGIS 2.2 under Windows 8.1 x64.


title: How to smooth/interpolate a raster in python using GDAL?

text: This is my first post so please feel free to critique where necessary. **Background** : I am developing in Python and using GDAL from OSGEO to manipulate and interact with rasters and shapefiles. **Problem** : I want to take a shapefile that has point features and interpolate it into a surface raster. Right now I am using the method 'RasterizeLayer' which burns a value from the point feature into the raster (which is set with all nodata values) but leaves all untouched pixels as a 'nodata' value. I am therefore left with a checkerboard type raster. What I have after using RasterizeLayer: ![\[Raster from using gdal.rasterizelayer\]](http://i.stack.imgur.com/OPyqQ.jpg) What I want for a final product: ![\[Wanted raster, interpolated\]](http://i.stack.imgur.com/NPchl.jpg) I believe the function I am looking for is known as 'Spline_sa()' from the arcgisscripting import. Does GDAL have a similar function, or is there a different method to get my desired output? Thanks!


title: Segment road network line shapefile into new equal length segments line shapefile

text: I would like to subdivide a road network for an entire state into segments of equal length. So, Highway X would be divided into 0.5 mile segments, with a record for each segment, and Highway Y would similarly be divided into 0.5 mile segments. Currently, segments vary in length based on intersections and curviness. I must restrict the segments to trace the road network, so I cannot just connect vertices/nodes, or trace existing arcs/edges. In most cases, the script must insert a new vertex for the 0.5 mile point, to serve as the end point of the segment and the start point for the next segment. I am familiar with Python/ArcPy and think I may need to use OGR to grab a list of vertices. My GIS software is ArcInfo 10.1 SP2. Has anyone successfully implemented a solution to this problem, or have an idea on how to solve it? Thanks! Brian EDIT I've been further exploring the standard tools in ArcGIS 10.1. I'm currently trying the idea of converting all of the vertices to a separate points layer using the Feature Vertices to Points tool. My next step will be playing with this new shapefile in Python: The tool preserve the topology of the original line road network with the new points, and there is a sequential order to the FIDs, so I believe I can connect the points {for each road, i.e. Interstate 80} from {n} to {n+1}. I can keep track of the accumulated distance between the vertices-now-points. When the accumulated distance adding another point is greater than the threshold {d}, then I need to create a new point between the most recent point and the point-too-far at a distance that will equal the threshold. This becomes the end point for the new segment. Accumulate these points together, draw a line connecting them, and voila, a segment of length {d}. My goal of course is to have these lines be segments in a shapefile, rather than 1000s of new line shapefiles. If anyone has any experience with those sort of geometric solution, by all means, please chime in. Thanks!


title: Why does ArcMap connect to a Personal Geodatabase (PGDB) even when no feature classes (or tables?) are referenced in the MXD?

text: I have an odd question from a user in the same goverment that I work for. When he opens a .MXD-project in ArcMAP a Personal Geodatabase also opens that is not part of the project and does not have any connection join/relates to the project (an LDB-file is created an points to his computer). He removed all his OLE DB-connections and saved the project under a different name but the problem still occurs. Does anyone have a clue of what's going on here? I myself think the user opened the PGDB in Access and did something the he shouldn't have.


title: Sum vector data correlating with a second vector layer

text: There are a lot of questions _very_ similar to mine, but I couldn't find one that accurately described what I want to do. I am working in QGIS. I have one vector layer which, among other attributes, has a production volume for oil wells. I have a second layer which represents townships. Some townships have five wells, some have none etc., all with different levels of production. I want to create a new layer which displays all the townships with a summation of the total production volume within the township. Can anyone think of an efficient way to do this? EDIT: I would also like to be able to the sum of the production volumes to the township layer. Thanks!


title: Auto delete surrounding objects from different layers

text: I'm quite new to GIS technology so pardon me if I make any mistakes or use the wrong terms here. So, I got a map, with point layer A, B, C. A is the main point layer. I would like to make something like this but got no idea how I'm gonna do this. When I start an edit session, click on a point in layer A, delete it, all surrounding object within a radius of r meters in layer B and C would be deleted as well.


title: How to suppress moveend event while switching the base layer?

text: I have created a map that contains a two base layers (Google Street Map and Open Street Map). A `moveend` event listener is registered to listen for any map movement which would perform a function call to load in new data based on the bounds of the map view port. I realise that the function call is performed even when switching the base layer without causing any map movement. Is there a way to switch the base layer silently? As requested, the code in brief:               var map;     var gmap_r = new OpenLayers.Layer.Google('Google Street Map');     var osm = new OpenLayers.Layer.OSM('Open Street Map');     var options = {       layers: [gmap_r, osm, markers]     ...     };     map = new OpenLayers.Map('map', options);     map.events.register('moveend', map, my_function);     //code above used for triggering a call to my_function upon a map pan or zoom event       The change of base layer unfortunately triggers the above as well.


title: How do you create a CSVT on a Mac?

text: I am working with QGIS on a Mac, and understand the process for importing a CSV file. But I do not know how to create the CSVT file to define the CSV file's data types. Can someone please instruct me on how to do this?


title: Setup own Openlayers Proxyhost

text: > **Possible Duplicate:**   >  Problems with OpenLayers and WFS - proxy.cgi issues I have seen some example related to WMS Get Feature Info like : http://openlayers.org/dev/examples/getfeatureinfo-control.html In this example they are using                OpenLayers.ProxyHost = "proxy.cgi?url=";      My question is : How we can setup our own proxthost for our geoserver layers? Help would be appreciated.


title: AJAX WMS Request from Linux to Windows ArcGIS Server

text: I am trying to figure out a CORS header or cross domain issue but to no avial. We have an OpenLayer application hosted on a Linux server.   However, it calls a WMS service that is hosted on a Windows Server created through ArcGIS Server. The request goes out via an AJAX call but never comes back.   The outgoing request looks like this:               http://.../WMSServer?TRANSPARENT=true&LAYERS=6&QUERY_LAYERS=6&STYLES=,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-84.82432751264871,34.890657004827005,-79.56736950410722,36.72589197674798&FEATURE_COUNT=100&HEIGHT=824&WIDTH=1914&FORMAT=image/png&INFO_FORMAT=application/vnd.ogc.gml&SRS=EPSG:4326&X=1088&Y=271      I have verified this is something to do with a CORS header or cross domain I think because I took the same OpenLayers site and put in on the Windows server and it works. I have tried a couple of thing like putting a crossdomain.xml in a couple of places on the Windows server but had no luck. Any help would be greatly appreciated. Thanks, Derek


title: openlayers- WFS- Cross-domain problem

text: I got the typical cross-domain problem when access to WFS layer by using openlayers,               XMLHttpRequest cannot load http://XXXX/geoserver/ows?service=WFS. Origin http://XXXX is not allowed by Access-Control-Allow-Origin.      I did some research about how to handle this. it seems that a web proxy solution is a good. so I edited a proxy.py file, and put it at the root of my IIS server. however, it seems that I need to explicitly put the following code somewhere:               Openlayers.ProxyHost = "/cgi-bin/proxy.py?url"       but I don't know where to put. If I put like below:               var map;     Openlayers.ProxyHost = "/cgi-bin/proxy.py?url"           Ext.OnReady(){        //more code      }      It will popup an error saying "OpenLayers is not recognized". Any hints? thank you all!


title: I create getfeatureinfo with popup but it dosn't work (error 404)

text: This is my code for my page (index.html)                           info = new OpenLayers.Control.WMSGetFeatureInfo({                 url: 'http://localhost:8080/geoserver/wms',                 title: 'get feature info',                 queryVisible: true,                 eventListeners: {                     getfeatureinfo: function (event) {                         map.addPopup(new OpenLayers.Popup.FramedCloud(                             "chicken",                             map.getLonLatFromPixel(event.xy),                             null,                             event.text,                             null,                             true                         ));                     }                 }             });                  map.addControl(info);             info.activate();      and it's proxy code : OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; But I see a 404 error. Can someone please help?


title: Problems with OpenLayers and WFS - proxy.cgi issues

text: I am having problems getting WFS data to display on a map using OpenLayers/GeoExt/GeoServer. I created a proxy script like on this page: http://trac.osgeo.org/openlayers/browser/trunk/openlayers/examples/proxy.cgi I have put this is file in C:\Program Files\GeoServer 2.0.2\webapps\geoserver. I have changed the path at the top line of the file to read #!C:/Python26/python.exe -u I have also added the address of the machine that I want to allow to the file (10.0.0.155:8080) and added an environment variable for python (the machine is running Windows XP). When I point to the proxy.cgi in a web browser it just displays the proxy.cgi file in the web browser, when from what I have read it should be showing the OpenLayers homepage. Does anyone know how I can get this to work? Regards, James


title: openlayer wfs problem

text: > **Possible Duplicate:**   >  Problems with OpenLayers and WFS - proxy.cgi issues hi friends i have a problem with simple openlayer web page. i have two layer, first one is wms layer and work perfectly on quantum gis and openlayers but second layer wfs(tasmania_road) work on quantum gis but dont work on openlayers. i simply show two layer which wfs tasmania_road on the wms earth . my code shown below, please help me, thanks               <html>     <head>         <script type="text/javascript">             var map;                  function init() {                           OpenLayers.ProxyHost = "proxy.cgi?url=";                 map = new OpenLayers.Map('rcp1_map');                 var wms = new OpenLayers.Layer.WMS(                         "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",                         { layers: 'basic' }                     );                       var layer = new OpenLayers.Layer.Vector("WFS", {                     strategies: [new OpenLayers.Strategy.BBOX()],                     protocol: new OpenLayers.Protocol.WFS({                         url: "http://demo.opengeo.org/geoserver/wfs",                         featureType: "tasmania_roads",                         featureNS: "http://www.openplans.org/topp"                     })                 });                      map.addLayer(wms);                 map.addLayers([wms, layer]);                 map.setCenter(new OpenLayers.LonLat(146.7, -41.8), 6);             }         </script>     </head>     <body onload="init()">         <div id="rcp1_map" style="width: 100%; height: 100%;">         </div>     </body>     </html>


title: OpenLayers/Geoserver cross domain problem

text: I'm using OpenLayers and OpenGeo Suite with WMS requests.The tiles load fine, but when I try to load a getFeatureInfo I get a cross domain error. I read about including crossdomain.xml in the Geoserver folder structure but I'm not sure where that is on OpenGeo Suite and couldn't get it to work. I've also read about setting up a proxy but don't completely understand it. How would I set that up on IIS?


title: How to label a dynamic KML file in OpenLayers?

text: How can I display labels for features in a KML file on an OpenLayers map. I was thinking of using popup messages, but labels are more attractive and eye- catching. I want to replicate the labeling method of Google Earth: ![enter image description here](http://i.stack.imgur.com/t6OTa.jpg) Any hints? Thanks in advance.


title: WPS in QGIS Web Client

text: I have managed to work the QGIS Web Client on my server with the basic buttons and functions. Now I would like to add "extra" geoprocessing tasks (for example create buffer), based on WPS. I understand how to add new button to the QGIS Web Client toolbar by the Customizations.js file, but I can not find any working example about how to define the button's function as a geoprocessing task, based on a public WPS (for example Zoo project's WPS capabilities, which I can use in QGIS Desktop). Is it possible to do? If yes, could you please help me with the basics or show me a working example and code behind it? Thanks in advance!


title: How to create a symbol with no fill color in qgis?

text: Where can I find a simple circle to draw it around a point feature. I can change symbol fill color as well as symbol border color. But I didn't find a way to set fill color to no color.


title: Scaling x,y coordinates in proj4

text: This question was asked before, but without answer. Let's say we have mercator map with given resolution (for simplicity in centimeters). Now let's get coordinates of (lat,lon) = (50, 15):               $ proj +proj=merc +ellps=WGS84     50 15     5565974.54      1678147.52      Since we don't know the boundaries, we can't scale it to desired resolution. The only way I've found to get boundaries is compute the coordinates for (lat, lon) = (180, 0) and (0, 90), but that's more like a hack and it's not universal (other projections might map only from (±90, ±90)). Any suggestion? Does proj4 deal with scaling differently? Thank you!


title: GeoServer create layer from PostGIS (data type point)

text: (Several days ago a user on gis stackexchange suggest that I should use OpenGeo (I was using geojson before). I succeed at what I was doing at that time, but now I have a different problem.) I was using MySQL, but for easier work with GeoServer I decidec to migrate to PostgreSQL. I spend a few days to migrate a PHP project. I have a table events with fields: id(integer), name (varchar), ... , and coords(point). I am trying to display some point/icon/whatever on layer, where the event is taking place. I went through different tutorials on OpenGeo, GeoServer, Google ... For now I manage to create a SQL layer with SQL statement: SELECT id, coords FROM realestate WHERE coords IS NOT NULL. But when I go to LayerPreview and click OpenLayers->Go, the browser download file (with wms filename) with content > ?xml version="1.0" encoding="UTF-8" standalone="no"?>!DOCTYPE > ServiceExceptionReport SYSTEM > "http://localhost.just_for_validation:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> > ServiceExceptionReport version="1.1.1" > ServiceException> > /ServiceException>/ServiceExceptionReport> (I had to remove all < characters.) ![enter image description here](http://i.stack.imgur.com/am6JD.jpg) I am not sure if I took the right approach. To sum up: I have PostgreSQL table with several fields, one of them is coords(point). I want to display icon/dot/image/something on map with OpenLayers through GeoServer WMS. I don't know how to create layer which draw dot on lat,lon based on coords field in PostgreSQL.


title: postgis update geom from lat and long

text: I have a table that contains a lat/long column... i'd like to have a trigger that populate the geom column when a row gets inserted into the database. are there examples that I can look at?


title: Adding OGC complaint WMS Aerial Images as Base Maps using arcgis javascript api

text: I have an WMS layer which is a cross domain resource and I wanted to embed those layers as basemap in my application using JavaScript api rather than using built in ArcGIS Basemaps. WMS Layer is complaint with OGC WMS specification & it has 5 different layers of Aerial photography images. If it is possible, can you add these layers a basemaps in my application. Can you please piont me in the right direction.


title: Saving a gml layer does not change coordinates

text: I am trying to export a gml layer to geojson with lat/lng as the preferred coordinate system. So what I did was a 'save as' on the layer with selected CRS: 'IGNF: WGS84G'. Now I was hoping it converted the coordinates of the GML but it did not. Part of GML data:               <gml:PolygonPatch>         <gml:exterior>             <gml:LinearRing>                 <gml:posList>264124.695 566223.95</gml:posList>             </gml:LinearRing>         </gml:exterior>     </gml:PolygonPatch>      Part of converted JSON data: "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 264124.695, 566223.95 ] ] ] ] } As you can see the coordinates remain the same. I tried other formats in order to test if something is converted but not. I am not an expert on GIS transformations so probably I did something wrong. Environment: Windows 2012 Standard running inside VMWare Fusion QGIS version: 2.0.1 - Dafour 64 Bit A screenshot of my actions: ![enter image description here](http://i.stack.imgur.com/B7jjX.jpg)


title: How to interpolate polyline or line from points?

text: We have a lot of points, but with no timestamps to create ways. For now, I've created a sample of the way the points traverse. It's in here, this way can be compared with a Google one. I haven't found a proper function in PostGIS or a tool in Python to do so. Does anyone have any hints for how I can accomplish this? Remember the points have no timestamps or another way to be ordered, and we do not have a way to follow, just the points and from those we want to generate the polyline. We have about 500,000 points in the country to work with, and we want to trace some new ways where there are not still in OSM. The first task we want to address is to interpolate the ways. Preferably we would work with PostGIS or libs in python. The hard thing is to "isolate" in some way the points that could conform a way.


title: Using MS SQL 2005 as the data store in GeoServer

text: In my project, I am trying to set up a simple WFS service in GeoServer in order to create a layer consisting of point features. I have succeeded doing so with the points being stored in a shapefile. However, now I need the data to be stored in MS SQL 2005. I know that unlike the 2008 version, MS SQL 2005 does not support geometry/geography. Googleing for some advice, I kept encountering this article: https://www.seegrid.csiro.au/wiki/Infosrvices/GeoserverMsSqlServer2005Connectivity I followed the instructions, installed the MsSqlSpatial extension to MSSQL and the MSSQL plugin into GeoServer. Indeed, now I can add my database as a store into GeoServer and publish a table from it as a layer. However, this does not work entirely. The table consists of several columns, most of them containing metadata like "town", "street" etc., one of them named "the_geom" contains the points themselves. The points are stored in the WKB (well known binary) format, so the datatype of "the_geom" column is varbinary(max). However, GeoServer doesn't seem to like this. When trying to publish the layer, GeoServer correctly reads all the columns with the metadata, but for the "the_geom" column, it publishes the message:               Could not find mapping for 'the_geom', ignoring the column and setting the feature type read only      The last chapter of the article I posted suggests to use the WKT (well known text) format to represent the points. In this case, the type of the database column would be Text. When trying to publish the layer, GeoServer recognizes the "the_geom" column, but with the type 'String' instead of 'Point'. Thus, when I request the WFS service with parameter geometryName = "the_geom", GeoServer throws an exception stating that               Property the_geom is not geometric      Have I misunderstood something? Is there another datatype to use for the points in the database? I have tried different approaches and none worked for me; however, the author of the given article claims he successfully managed to connect MS SQL 2005 to GeoServer, so it should be possible. Finally, please do not reply in the manner "Upgrade to 2008". I want to. Or I would use PostGis. But, in this case, I just can't. Thank you for your help in advance. Imp


title: ArcGIS 10.1 using Repast's Agent Analyst Extension - refresh.exe does not work

text: I have installed the agent analyst extension for ArcGis. The refresh.exe, however, does not work. I have made a direct reference to the folder where refresh.exe is.


title: Python scripting- compute statistics

text: I'm new to Python but I've heard is a good way to automate tasks. I have thousands of point shapefiles and need to extract the maximum value of each one and put them in a new table. I'll appreciate your help.


title: creating a raster of the residuals of a regression between two rasters

text: I am trying to create a raster of the residuals of a regression between two rasters. i.e. I would like to carry out a regression of one raster against another of the same extent and plot the residual for each cell of the raster at the same resolution and extent as the original rasters It seems the GRASS 7.0 has a function called r.regression.multi which would let me carry this out but I have zero experience in GRASS and I cant even get GRASS 7.0 to work (GRASS 6.4 works fine but doesnt have r.regression.multi so is useless!) I currently have the files in almost every format possible (Idrisi raster, TIFF, ASCII .grd in R) any help would be much appreciated!!! Cheers!


title: How to print/plot a city map from OSM data with tools like QGIS, GRASS, openJUMP?

text: The question is, once set up Geoserver and having all layers accesible, we need to print a portion of the city in a paper of size A0. When I wan to print a city, if I zoom to the city extent, I loose details on the map, that would be needed in a printed square meter paper. Thank you very much, in advance.


title: Looking for a pure Python method to convert Lat/Long To MGRS

text: Does anyone know of any packages out there that implement a pure python method to convert lat/long coordinates to MGRS coordinates? PyPi has a package, but it requires some c-extensions from another source, and I didn't want to use that. I figured before I go an recreate a complicated process, I'm hoping the community can make my life a tad easier. Thanks everyone!


title: How to use GDAL-commands in QGIS?

text: I recently used a GDAL-command working with the OSGeo4W command line, but it does not feel that comfortable. Is there a way to somehow execute a GDAL- command directly in QGIS? Right now the gdal-extension is installed in QGIS, but i can not find a command line.


title: Geocoding API Comparison

text: Is there a good updated source for comparing existing Geocoding APIs (i.e. Google, Mapquest) and their features? I'm really interested in their language support as well. For example, Google has libraries for its Geocoding service in JavaScript, Java, Python, and many more.


title: Converting x, y, zoom for Calculating tile bounds

text: i am working on calculating tile bounds lat lon from x,y,z tile coordinate. i have looked gdal2tiles code structure and i have found this good function:               def TileLatLonBounds( tx, ty, zoom ):     "Returns bounds of the given tile in latutude/longitude using WGS84 datum"          bounds = TileBounds(tx, ty, zoom)     minLat, minLon = MetersToLatLon(bounds[0], bounds[1])     maxLat, maxLon = MetersToLatLon(bounds[2], bounds[3])      with this code and its dependies i am getting result of this for tms scheme:               1.TileLatLonBounds(0, 3, 2) # 66.51326044311185, -180.0, 85.0511287798066, -90.0     2.TileLatLonBounds(3, 0, 2) # -85.05112877980659, 89.99999999999999, -66.51326044311185, 180.0      but i know world extent is for upper left -180 90, for lower right is 180 -90. so for first function (minLat, minLon, maxLat, maxLon) maxLat must be 90 instead of 85.0511287798066 and for second function minlat must be -90 instead of -85.05112877980659. if i want use gdal translate function for rectifying for an image which contains world extent, then web tiling it, and using with openlayers or anything like this i think there will be problem with click into place of its.... and when opening -180 90 180 -90 tif and -180 85.05112877980659 180 -85.05112877980659 tif with global mapper you can see the diffrence of coordinate... ok. what is your opinion for fixing this problem? or is it not a problem for tiling with gdal2tiles


title: ArcGIS : SpatialFilterClass to WFS filter

text: I want to translate a MapServer Query URL to a WFS GetFeature query. Then I try to serialize a SpatialFilterClass to WFS filter. any idea ?


title: How to fix the QGIS for Android GPS panel?

text: I have installed qgis on my samsung galaxy s1. But I cant test the gps. I found how to turn the gps on, but I cannot open the gps pannel to do it. When i press view->panels there is nothing happens.


title: What's the difference between gdalwarp and gdal_merge for mosaicing

text: I wanted to merge around 20 dem tiffs each around 100MB, and I used gdalwarp (I know about virtual file option): `gdalwarp $(list_of_tiffs) merged.tiff` However this command took very long time, and after some 15min it was processing 5th image from set. I terminate it. I then found that gdal_merge.py script can be used also for mosaicing, and tried it: `gdal_merge.py $(list_of_tiffs)` which completed in less then 3min. As I expected that both commands would produce same result, I wonder what's the difference between the two, as to why gdalwarp takes so much time if result is same?


title: layers in opentripplanner webapp

text: I am customizing the opentripplanner webapp according to my needs. it has 5 different base layers. but in code (in map.js and OpenLayersUtils) i can't find where it adds these layers to map.


title: DXF format for QGIS

text: I am trying to import some DWG files into QGIS. I am using ODA to convert the DWG files to DXF and then want to use the Dxf2Shp converter plugin in QGIS. The ODA converter has many options for the format of the DXF files it will output various options of ASCII or BINARY DXF file e.g. 2003 ASCI DXF, 2010 Binary DXF, R9 ASCII DXF plus more in similar styles Which of the DWG file types will the Dxf2Shp plugin use best?


title: How to create a loop for multiple points with cost distance / cost path in ArcGIS 10.2 in python

text: I would like to know how to simplify the following code in order to execute it more efficiently than copy paste 82 processes (with a loop I guess?) but I don't know how to do it. There are 4 main processes : Select analysis, cost distance, cost path, and raster to polylines. The study region is Uganda and there are 82 points and therefore 82 (or 81) routes to be founded. In the future, I would like to execute this code for other countries as well with more points. Many thanks in advance for your help :-)! * * *               # Import arcpy module     import arcpy     arcpy.env.workspace = "E:\HEC\strategicmap\strategicmap.gdb"     arcpy.env.overwriteOutput = True          # Check out any necessary licenses     arcpy.CheckOutExtension("spatial")          # Set Geoprocessing environments     arcpy.env.scratchWorkspace = "E:\\HEC\\strategicmap\\scratch.gdb"     arcpy.env.snapRaster = ""     arcpy.env.extent = "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda"     arcpy.env.cellSize = "MAXOF"     arcpy.env.mask = ""          # Local variables:     WorldWGS84WM = "E:\\HEC\\strategicmap\\strategicmap.gdb\\WorldWGS84WM"     PRIOcAfricaWGS84 = "E:\\HEC\\strategicmap\\strategicmap.gdb\\PRIOcAfricaWGS84"     costsurface = "E:\\HEC\\strategicmap\\strategicmap.gdb\\costsurface"     Uganda = "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda"     outputcostdist = "E:\\HEC\\strategicmap\\strategicmap.gdb\\outputcostdist"     outputcostbacklink = "E:\\HEC\\strategicmap\\strategicmap.gdb\\outputcostbacklink"     PRIOUganda = "E:\\HEC\\strategicmap\\strategicmap.gdb\\PRIOUganda"     outputcostpath = "E:\\HEC\\strategicmap\\strategicmap.gdb\\outputcostpath"          #all files for Uganda (82 points)     route1= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route1"     route2= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route2"     route3= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route3"     route4= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route4"     route5= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route5"     route6= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route6"     route7= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route7"     route8= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route8"     route9= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route9"     route10= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route10"     route11= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route11"     route12= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route12"     route13= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route13"     route14= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route14"     route15= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route15"     route16= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route16"     route17= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route17"     route18= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route18"     route19= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route19"     route20= "E:\\HEC\\strategicmap\\strategicmap.gdb\\route20"     ##etc...until route82          Uganda1= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda1"     Uganda2= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda2"     Uganda3= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda3"     Uganda4= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda4"     Uganda5= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda5"     Uganda6= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda6"     Uganda7= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda7"     Uganda8= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda8"     Uganda9= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda9"     Uganda10= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda10"     Uganda11= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda11"     Uganda12= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda12"     Uganda13= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda13"     Uganda14= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda14"     Uganda15= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda15"     Uganda16= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda16"     Uganda17= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda17"     Uganda18= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda18"     Uganda19= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda19"     Uganda20= "E:\\HEC\\strategicmap\\strategicmap.gdb\\Uganda20"     ##etc... until Uganda82          arcpy.Select_analysis(WorldWGS84WM, Uganda, "\"FIPS10_4\"='UG'")     arcpy.Clip_analysis(PRIOcAfricaWGS84, Uganda, PRIOUganda, "")          arcpy.Select_analysis(PRIOUganda,Uganda1, "\"OBJECTID\" =1")     arcpy.gp.CostPath_sa(PRIOUganda, outputcostdist, outputcostbacklink, outputcostpath, "EACH_CELL", "OBJECTID")     arcpy.RasterToPolyline_conversion(outputcostpath,route1, "ZERO", "0", "SIMPLIFY", "VALUE")     arcpy.gp.CostDistance_sa(Uganda1, costsurface, outputcostdist, "", outputcostbacklink)     arcpy.gp.CostPath_sa(PRIOUganda, outputcostdist, outputcostbacklink, outputcostpath,"EACH_CELL","OBJECTID")     arcpy.RasterToPolyline_conversion(outputcostpath,route1, "ZERO", "0", "SIMPLIFY", "VALUE")          arcpy.Select_analysis(PRIOUganda,Uganda2, "\"OBJECTID\" =2")     arcpy.gp.CostPath_sa(PRIOUganda, outputcostdist, outputcostbacklink, outputcostpath, "EACH_CELL", "OBJECTID")     arcpy.RasterToPolyline_conversion(outputcostpath,route2, "ZERO", "0", "SIMPLIFY", "VALUE")     arcpy.gp.CostDistance_sa(Uganda2, costsurface, outputcostdist, "", outputcostbacklink)     arcpy.gp.CostPath_sa(PRIOUganda, outputcostdist, outputcostbacklink, outputcostpath,"EACH_CELL","OBJECTID")     arcpy.RasterToPolyline_conversion(outputcostpath,route2, "ZERO", "0", "SIMPLIFY", "VALUE")          arcpy.Select_analysis(PRIOUganda,Uganda3, "\"OBJECTID\" =3")     arcpy.gp.CostPath_sa(PRIOUganda, outputcostdist, outputcostbacklink, outputcostpath, "EACH_CELL", "OBJECTID")     arcpy.RasterToPolyline_conversion(outputcostpath,route3, "ZERO", "0", "SIMPLIFY", "VALUE")     arcpy.gp.CostDistance_sa(Uganda3, costsurface, outputcostdist, "", outputcostbacklink)     arcpy.gp.CostPath_sa(PRIOUganda, outputcostdist, outputcostbacklink, outputcostpath,"EACH_CELL","OBJECTID")     arcpy.RasterToPolyline_conversion(outputcostpath,route3, "ZERO", "0", "SIMPLIFY", "VALUE")          ##etc... until 82


title: Providing Catalog Service for Web (CSW) using ArcGIS software?

text: I need to harvest catalog data from a ArcGIS database, and as I understand it, a Catalog Service for the Web (CSW) should be the way to go. Some docs mention vaguely the "GIS Portal Toolkit" or the (discontinued) "ArcIMS". Others mention the Geoportal Server. **What is the recommended way of providing catalog data as CSW using ArcGIS?** Namely, which components should I use, and where can I find concrete/detailed instructions on how to do it?


title: Is there a tool to buffer features with more than one distance value in GRASS GIS?

text: I´m looking for a tool like **Multiple-Ring-Buffer** in ArcGIS, but for GRASS GIS to be able to buffer with different distances but only having to start the process once.


title: Aggregate/dissolve MySQL geometry

text: On Centos, I have a MySQL 5 database with a MyISAM table that has a geometry column with a spatial index, containing US county boundaries. Trying to combine/aggregate/dissolve some of these into as few polygons as possible, to create minimum KML/KMZ files for public use, using the ogr2ogr just built with the GDAL 1.10.1 sources.               INFO: Open of `MySQL:mydb,user=root,password=password'           using driver `MySQL' successful.          Layer name: counties     Geometry: Unknown (any)     Feature Count: 3234     Extent: (-178.309480, -14.601813) - (145.909365, 71.441059)     Layer SRS WKT:     (unknown)     Geometry Column = geo     county_fips: Integer (0.0)     state_fips: Integer (0.0)     state_abrv: String (100.0)     county_name: String (255.0)      @afalciano kindly provided the syntax for combining the data for ESRI Shapefiles, but I have virtually no GDAL/ogr experience, and am having problems translating this to work with MySQL. Ideally, I'd output as KML, but have had issues with that, so would be happy to get the output in WKT or anything Perl could be made to parse, or into another MySQL table with geometry column. Any tips on ogr2ogr tutorials (other than the online driver doc pages) woud be much appreciated, too. Many thanks in anticipation. EDIT: I need to do this programmatically, on demand, on a headless Centos web server.


title: Minimum requirements (especially screen size) for QGIs - Android

text: I would like to try Qgis on Android devices, but before, I would like to know the minimum terminals requirements, and especially the screen size or resolution, what is the minimum screen size do you recommends? At least to don't have any trouble to use it (I tried it on my smartphone... but some menu where larger than the screen size, so I had to stop my smartphone)! At the same time, if some people have already used it, do not hesitate to give more requirement (memory, cpu, etc.). Thanks


title: Is it possible to change dynamically the map spatial reference?

text: I have a map that uses ArcGIS Online in the small scales. So my map needs to be in Web Mercator in small scales. In the big scales, my web client Flex application uses some feature and map services to do some area and distance calculations. So my map needs absolutely to be in Lambert93, in the big scales, because geometric calculations in Web Mercator are not accurate at all. => I need to change the map spatial reference when I move from big/small scales to small/big scales. Is there a way to change the spatial reference of a map? Regards.


title: Installing OpenGeo suite breaks tomcat on an instance of AWS Ubuntu Server 12.04

text: I am running an instance of Ubuntu Server 12.04 on AWS and after installing the OpenGeo suite have been unable to get access to tomcat6 via localhost:8080 and thus no access to the OpenGeo dashboard. What I have tried so far: allowed access to port 8080 in AWS, disabled the firewall locally, reinstalled OpenGeo numerous times, and used netstat to see that tomcat is not listening. I have installed Apache and it does listen to port 80. What is interesting is that I can access tomcat when installed without the OpenGeo suite but once I install the suite I can no longer access it. I am a Linux newbie and at a loss. If necessary, please let me know which logs would be helpful to post. Thanks. Update: Well no luck after almost two weeks of trying. I have come to the conclusion that OpenGeo/OpenPlans intentionally cripples the Community edition of OpenGeo Suite on Amazon-EC2 in order to sell their packaged for a fee version. Fair enough but I can't afford to pay them and Amazon while I learn. Update 2: Solved (thank you Don Meltz). Because of the limited memory available in a micro-instance a swap file must be created for tomcat to work. My apologies to OpenGeo. I hope this helps someone else with this problem.


title: How to make Plugin-DataSource Layers Editable in ArcMap(Arcobjects)

text: The .Net samples of the developer kit for ArcGis contains an example, that shows how a custom data source(Plugin Data Source) can be added as a layer in ArcMap. It is done by implementing interfaces like `IPlugInCursorHelper`,`IPlugInWorkspaceFactoryHelper` etc...It displays the contains of a text file(Points in the example) as a layer in the map. This is not editable as of now. Would it be possible to make this layer editable using the ArcGis editing tools by implementing some interfaces? In that case, what would be the interfaces that i would need to look at implementing?


title: How to delete classes that cover only a small area?

text: I want to delete pixels that have a small area of classifying in raster and vector images in ArcGis software.


title: C# Where to create GP service output files

text: How to get path of default scratch workspace(folder) using c#? I'm making REST GP tool, where you pass some input parameters, tool collects data, create csv files, and archive them. Then tool return path to archive file. Tool logic is done, but i'm stuck on where to write files(and how to return path), and thought, that scratch folder would be good choice for that. In python I would do something like:               %scratchFolder%\....      or               arcpy.env.scratchFolder      But that doesn't work in C#. Any suggestions? EDIT: Thanks, it was really that simple in the end               IScratchWorkspaceFactory scratchWsF = new ScratchWorkspaceFactory();     IWorkspace sWS = scratchWsF.DefaultScratchWorkspace;     string scratchWS = System.IO.Path.GetDirectoryName(sWS.PathName)+"\\";      EDIT 2: The previous solution works fine for GP tool and returns smth like "C:\Users\Admin\AppData\Local\Temp\arc161B...", but for GP REST service that does not work:               IScratchWorkspaceFactory2 scratchWsF = new ScratchWorkspaceFactory()          as IScratchWorkspaceFactory2;     //and     IScratchWorkspaceFactory scratchWsF = new ScratchWorkspaceFactory();      stops the execute method, without any error if used in published GP service(but works in GP tool). Recently found out, that every instance of GP service have its own scrach, but i am unable to find a way to get to that.


title: How to find elevation of multiple points on a map on ArcGIS 9.3?

text: I am working on the sewerage system of a city. I have the x and y coordinates of the station locations stored in EXEL format. How can I use this data/file to extract the elevations of the stations ? please help on this regard. Thanks. Ps : there are almost 2000 of such station locations so its not possible to find location manually.


title: How to write point geometries with arcpy instead of gp syntax?

text: Can someone help me fix some code that simply writes points into a featureclass? It used to work in the older `gp.` syntax, but I'm having difficulties rewriting it in arcpy for ArcGIS 10.0. In this example it was meant to create a 100m grid of points.               desc = arcpy.Describe("Grid_Extent")     Ext1 = str(desc.Extent)     Ext2 = Ext1.split(' ')     SXMin = int (float(Ext2[0]))     SXStart = int (float(Ext2[0]))     SYMin = int (float(Ext2[1]))      SXMax = int (float(Ext2[2]))     SYMax = int (float(Ext2[3]))          XMin = SXMin     XMax = SXMax     YMin = SYMin     YMax = SYMax     print str(YMin) + "    " + str(YMax)     print str(XMin) + "    " + str(XMax)     while YMin < YMax:       while XMin < XMax:          cur = arcpy.InsertCursor("Grid_100")          pnt = arcpy.Point()          pnt.x = XMin          pnt.y = YMin          feat = cur.newRow()          cur.insertRow(feat)          XMin = XMin + 100       XMin = SXStart       YMin = YMin + 100     del cur


title: How do I know what direction a road is drawn in OSM?

text: I'm trying to add a cycleway bike track to one side of a road, but I can't tell which side is left or right. The docs say "relative to the direction in which the way was drawn in the editor" , but using the iD editor I can't tell how an existing road is drawn. It also doesn't give me any visual clues as to which direction the road is pointed at.


title: Using arcpy.StackProfile_3d within arcpy addin

text: I want to get elevation profile in ArcScene using arcpy. Specifically, I want to create tool used as follows: click tool button, draw line interactively and output a graph presenting elevation profile. My idea is to use arcpy addin tool and arcpy.StackProfile_3d() like this:               class DrawTool(object):         def __init__(self):             self.enabled = True             self.shape = "Line"         def onLine(self, line_geometry):             rasters = arcpy.ListRasters()             table = arcpy.CreateUniqueName('profile_table', 'in_memory')             graphName = 'Sample graph'             arcpy.StackProfile_3d(line_geometry, rasters, table, graphName)      Unfortunately, line_geometry seem to be the problem here (a result of above code is just empty graph). I tried supplying a line shape in place of line_geometry and it works fine:               def onLine(self, line_geometry):         ...         line = r"line.shp"         arcpy.StackProfile_3d(line, rasters, table, graphName)      Is it possible to convert line_geometry somehow so that it fits into StackProfile_3d()?


title: What are FLOOR and CEILIING in PostGIS designated for?

text: Just a short question to lighten up my understanding of some PostGIS-code: Regarding the creation of user-defined grids I often find the expressions CEILING and FLOOR. Like in this non-representative example: > SELECT floor(st_xmax(the_polygon)/1500) FROM ... What are they exactly designated for? Thanks in advance for lightening me up! knutella


title: How to center map in PageLayoutControl?

text: In my print preview dialog I have a `PageLayoutControl` loading the same map as the main view's `MapControl`. I want the map in the `PageLayoutControl` to center at the same position as the `MapControl`. Using `Extent` is not a solution because the `PageLayoutControl` has a fixed ratio (square). (I tried using the same extent, but it didn't work at all.) I tried the following, but `CenterAt()` didn't do the trick.                 IEnvelope extent = _mapControl.Extent;       double lXMin, lXMax, lYMin, lYMax;       lXMin = extent.XMin;       lXMax = extent.XMax;       lYMin = extent.YMin;       lYMax = extent.YMax;            IPoint centerPoint = new PointClass();       centerPoint.SpatialReference = _mapControl.SpatialReference;       centerPoint.X = lXMin + ((lXMax - lXMin) / 2);       centerPoint.Y = lYMin + ((lYMax - lYMin) / 2);       _pageLayoutControl.CenterAt(centerPoint);      Neither did `Extent.CenterAt()` help:                _pageLayoutControl.Extent.CenterAt(centerPoint);      I don't have MapServer, so I can't use `ICenterAndScale`. I didn't find a `MapDescription` in the `PageLayoutControl` at all. Any hints? Thanks in advance.