How can I refer to a model variable in a Field Calculator or Pyculator formula?

I am new to QGIS 2.0.1 Modeler (Sextante) and not very able in Python programming. My question regard the use of field calculator (or advanced python field calculator) inside the modeler. Is it possible to refer in the field calculator formula to an input variable of the sextante model? Example for Buffer: In the graphical modeler I define 2 model inputs: 1) _layer_ = the point layer to be buffered (type: vector layer) 2) *buff_dist* = the buffer radius (type: number) I use the "Fixed distance buffer" algorithm, setting "Imput Layer" = _layer_ and "Distance" = *buff_dist*. It creates a temporary output shapefile. I want to add a new numeric field in the output of the "buffer" algorithm, with value equal to the buffer distance previously defined (*buff_dist*). How can I refer to the variable *buff_dist* in the Formula (or Global Expression) of the "Field Calculator" (or "Advanced Pyculator") algorithm?? Thanks.


How can I programmatically add a new feature template to the "Create Feature dockable window"?

This is a new question but a continuation of this post: How can I programmatically display the "Create Features" dockable window in ArcMap 10? I like the new template system in ArcGIS 10 but for quick editing it is a somewhat cumbersome several-click process. I have a tool that starts editing a layer that is currently selected in the TOC. It also pops the "Create Feature" dockable window. I would like to add the currently selected layer as a template to the dockable window using it's default symbology. (VB.Net)


Symbol levels for graduated colours not working in ArcMap 10?

In ArcMap I have set a draw order on my data, however ArcMap is not displaying it as instructed. The red values should be drawn ontop of the green/yellow. ![enter image description here](http://i.stack.imgur.com/7x4PA.png)


Enabling/Installing Portal for ArcGIS 10.1?

How can I install Portal for ArcGIS? I have installed ArcGIS for server 10.1 on linux. I read in ArcNews that **Portal for ArcGIS is available with the ArcGIS 10.1 release**. How can I enable it?


Error in cliping raster with multifeature polygon shape with arcgis9.3 using python

I have raster and I have a multifeatured polygonshape file. I Need to Clip my raster Image. Python code was developed for arcgis 9.3. It was working before and suddenly it stoped working. my codes is:               import arcgisscripting     gp = arcgisscripting.create(9.3)     gp.OverWriteOutput = 1          import sys     import os          #--------------------------------------------------------------------------     # INPUTS          ##i= "F:/Projekte/A1101003/Grundlagen/DSM/griend_dtm0_GK3.tif"     ##shp_mask = "F:/Projekte/A1101003/ArcGis/Themen/Polderung_Var02/Block45_Polderung_Var02_PrjDHDN.shp"     ##fieldName = "FID"     ##rasterpath = "E:/test/t_clip"          i = gp.GetParameterAsText(0)     shp_mask = gp.GetParameterAsText(1)     fieldName = gp.GetParameterAsText(2)     rasterpath = gp.GetParameterAsText(3)          if not gp.Describe(i).SpatialReference.Name==gp.Describe(shp_mask).SpatialReference.Name:              gp.AddError("Shapefile coordinate system is different from raster coordinate system!!!\                     Please reproject the shapefile to raster coordinate system '%s'." %gp.Describe(i).SpatialReference.Name)              print gp.GetMessages()         raise Exception()               #--------------------------------------------------------------------------     # DEFINITIONS of FUNCTIONS           def clipping (raster, shape, path, field_name):              rows=gp.SearchCursor(shape)         row =rows.Next()         gp.workspace= path              while row:             # setting name (UPDATE 2013 07)             row_name = str(row.GetValue(field_name))             if " " in row_name:                 row_name = row_name.replace(" ",  "-")             output = "c_"+row_name[:11]  #esri output             gp.AddMessage("...creating raster: %s" %output)             # setting clipping parameters             clipgeo=row.Shape             clipextent=str(row.Shape.Extent)                  gp.clip_management(raster, clipextent, output, clipgeo ,"0","ClippingGeometry")             gp.CalculateStatistics_management(output,"1","1","0")             row=rows.Next()              del row         del rows         return gp.GetMessages()              #--------------------------------------------------------------------------         #  MAIN               if os.path.exists(shp_mask):             clipping (i, shp_mask, rasterpath, fieldName) #goes to rasterpath (defined by user)         else:             print "Shapefile inputs are invalid"      **Now the current execution showing error message as follows:** > F:\Projekte\A1001025\ArcGis\Themen-Planung Start Time: Fri Mar 28 14:40:38 > 2014 Running script RasterClipwithMultifeatures... ...creating raster: c_0 : > ERROR 999998: Unexpected Error. Failed to execute (Clip). Failed to execute > (RasterClipwithMultifeatures). End Time: Fri Mar 28 14:40:40 2014 (Elapsed > Time: 2,00 seconds) **I am happy to share that I have a solution for this problem. I thought I will not be able to solve it. At last I have compared the data set used in old try(that work) with new data set. I found a little difference in the definition of shape file. New shp file includes z and m value enable that stops script from working **


Global height data as polygons — Natural Earth doesn't have it?

I love the bathymetry data from Natural Earth. I've been looking for the last few days for the same basic data but for land. I'm trying to find _general_ elevation shapefiles, as polygons. I don't need it to be 100% accurate since it's just for appearance of a stylised map. Unable to find it, I've been trying to make it in QGIS. I've managed to convert global heightmap data to a shapefile, but it came out as squares matching pixels. That's no good. Trying to convert contours to polygons doesn't work, obviously, Is there a place to download elevation shapefiles equivalent to the Natural Earth equivalent bathymetry? Why is it so hard to find lower resolution elevation data that's global?


What is wrong with this Proj4 transformation?

I'm implementing support for WMS maps in my company's software. Servers return a list of projections their maps are available in, but our software only displays data in WGS84 (lat/lon or UTM), and not all servers return the "CRS:84" or "EPSG:4326" CRSes. As a result I need to transform / reproject the data. Some servers return quite unusual ones, and I'm having trouble with one of these: EPSG:3112 (GDA94 / Geoscience Australia Lambert) used by Geoscience Australia's WMS server. In order to display a map onscreen, I need to convert the WGS84 lat/lon coordinates of the required screen or tile bounding box to the server's CRS, request the map image, and then to draw convert the map's bounding box (in the server's CRS) back to WGS-84 lat/lon. This does not seem to be working quite right: ![Overlaid maps from two servers](http://i.stack.imgur.com/uQXNN.png) This image is a portion of the Australian island of Tasmania. The grey coastline is from Demis, in WGS:84 projection. The blue outline and grey graticule is from Geoscience Australia, in EPSG:3112, but (theoretically) reprojected through Proj4 to match the grey coastline. As you can see it's quite inaccurate, to the tune of 50-100 kilometres. If this display were drawing WGS-84 graticules, they would be perfectly vertical and horizontal. Note also that the island is stretched, i.e. it's more than a rotation. This looks to me as though the reprojection is not working at all. The two Proj4 initialisation strings I'm using are:   * WGS-84 (WMS's CRS:84): `+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs`   * EPSG:3112: `+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs` Round-tripping an individual point from WGS-84 through EPSG:3112 and back yields the original point:   * WGS:84: (145.0, -42.0)   * to EPSG:3112: (931684.430679232, -4764432.89032608)   * and back to WGS-84: (145, -41.9999999999999) All conversions are done using `pj_transform`. **I don't know enough about map projections or Proj4 to know where to go next, although I have been learning a lot over the past few days, and I'd really appreciate advice from someone who knows a lot more about this library.** Some ideas I've had are:   * The blue island appears to be still in Lambert projection. Is this likely? It would explain the visual distortion.   * We use a version of the Proj4 DLL that was built years ago, and while it appears you can build various data about datums etc into the DLL, I don't know whether this was done. Proj4 does not flag an error doing the coordinate conversion, though, so at the moment I'm working on the assumption that if the library is happy, it's an external error (i.e. on my part.) I also don't know the reasoning for having our own, years-old build of the DLL anyway, instead of using a prebuilt binary from the Proj4 website. However, even the Proj4 binaries are one version old and don't seem to be built to include everything as binary data.   * Some versions of Proj4 seem to load datum and other information _externally_. I have tried replacing our DLL and configuring it to use some of these files using the `PROJ_LIB` environment variable, but with no apparent change.   * The `+towgs84=0,0,0,0,0,0,0` part of the EPSG:3112 string seems odd. This is from the 'epsg' file in the latest Proj4 download, but could it be wrong? Perhaps a better formulation of this question is:   * What do I need to have or do to convert between these two CRSes? Thanks for any help! > _I originally posted this questionon Stack Overflow, but I've re-posted it > here. I think it's more a GIS question than a programming question._


How do you convert a .lasd (Lidar) coordinate system?

How do you change a coordinate system for a .lasd (Lidar) dataset? The file is currently in UTM_Zone _15N and I am trying to convert it to IL_East.


Why provider.nextFeature(feat) does not iterate over all layer features?

I have a point layer with over 1700 features, but iterating this way:                   i = 0              while provider.nextFeature(feat):             i =i + 1             print '{0} de {1}: {2}'.format(i, provider.featureCount(), feat.id())      ...I get only a few of them and no error arises. Could it be possible to make a list of feature ids and then iterating over each QgsFeature by their id()?


Using multiversion view trigger to maintain unique ID in ArcSDE for Oracle?

I'm trying to identify the best way to automatically maintain a unique id column in Oracle ArcSDE. I don't want to use a class extension, since I've multiple third party users of the data and it's too much of a headache. I thought I was being clever by editing the insert trigger created by the creation of a multiversion view for the feature class. I created a sequence in Oracle, and then tried to use sequenceName.NEXTVAL to insert that into the appropriate column. The trigger compiles fine, and I can edit the feature class and insert new features just fine, but my sequence value is not getting inserted into the row. For example, I wrote               addNextVal := address_seq.nextval;     INSERT INTO SDE.A746 VALUES (next_rowid, addNextVal,:new.SUITE, ...      but it didn't work. Any thoughts on the approach, and what I might do to solve this problem?


How to perform image classification with SemiAutomaticClassificationPlugin and BIP files?

I have multiband satellite images BIP format, Landsat TM/ETM containing 7/8 bands respectively along with a separate header file, some of them corrected by nearest neighbour classifier. I'm working in QGIS and need to segment specific regions of these images. I saw good examples with TIFF images format, but when proceeding with BIP format the SemiAutomaticClassificationPlugin" gives me different kind of errors like not attribute is found in images, can't perform the instruction, or it's just not loaded. Could someone guide me on this? Thanks a lot in advance.


Search Geodatabase

I'm looking for a way to search Geodatabase's for files? Is there any function like this available? Obviously windows search only returns the random ID's for the tables within a Geodatabase. I'd like to actually search for data sets within them. I know this question would probably help a lot of people, because I know I'm not the only one out there who stores spatial data in Geodatabases, only to archive it with a thousand other datasets and not want to sift through it. I'd like to search these Geodatabases within ArcCatalog.


Setting up ArcMap to debug scripts in PyCharm

I'm wondering whether anyone succeeded at setting up ArcMap to debug python scripts in PyCharm. I've tried several times to configure both, but failed.


How do I generate SLD programmatically?

Is there any api,pulgin for generating SLD? **Note: I want to generate SLD programatically. I have property stored in database from which i would like to generate sld. I also want to generate various different tag according to geometry type like polygon, line or point.** _Currently I am going xml way._ _Edit:_ I am looking for all the ways that I could generate SLD. So I have tagged the question with java and openlayers. It may be client side by openlayers or server side by java. I don't want to concatenate string or genrate xml. Is there any other way then this? _I have layers with multiple columns or I have multiple tables with multiple columns. Now I want to set predefined parameters like point size point color or polygon size and color in database and create SLD._ I want to use SLD with openlayers. Generating xml is fine but I wanted to know if there are other good ways.               var sld = '<StyledLayerDescriptor version ="1.0.0" ...> more xml here </StyledLayerDescriptor>';            wms = new OpenLayers.Layer.WMS.Post(        "name",        "http://localhost:8080/geoserver/wms",        {           'layers': 'myNs:layername',           format: 'image/jpeg',           sld_body: sld        },        {           unsupportedBrowsers: []        }     );


Export Postgis Geometry POINT as Label text to DXF or DGN

I really need to **export** , by the **ogr2ogr** command or similar, **text** information related to a geometry position from my **PostgreSQL** (with PostGIS) database to an **AutoCAD DXF** layer file or to a **Microstation DGN** layer file, so I can later show that information in the AutoCAD/Microstation GIS. I have been looking through internet for so many days but all I can get is a layer with geometry points, I always lose the text label information. I know there is the **"Text" element type in DGN** and the **"MTEXT/TEXT" element type in DXF** , so I need to generate that kind of features. In Shapefiles I know that I can export new attribute fields with that information but it have to be obtained in DXF/DGN format. I need to made it automatic with some kind of server command like GDAL ogr2ogr, but I have tried with the "-select" (getting the text SQL SELECT attribute) or "-lco" or "-dsco" options without any result... Those are my commands:               ogr2ogr -select "Text" -f DXF text_layer.dxf "PG:host=192.168.1.* user=**** password=**** dbname=****" -sql "SELECT position AS the_geom, name as Text FROM the_geometry_table"          ogr2ogr -select "Text" -f DGN text_layer.dgn "PG:host=192.168.1.* user=**** password=**** dbname=****" -sql "SELECT position AS the_geom, name as Text FROM the_geometry_table"      Any help? Thank you very much:)


How can I add a delete button to feature forms?

I have created some formulars in QTDesigner for capturing and manipulating data in QGIS. The data is stored in a postgis-database. It would be helpful to have a delete-button in this formulars to delete the open feature. At the moment my formulars only contain the 'OK' and 'Cancel' Button. How can I add a 'Delete'-Button? * * * Here my code. It's based on the example in the refered post. The delete() function is the missing part. Can I use something like currentItem,..?               from PyQt4.QtCore import *       from PyQt4.QtGui import *            id_flaecheField = None       id_fotoField = None       myDialog = None            def formOpen(dialog,layerid,featureid):          global myDialog          myDialog = dialog          id_fotoField = dialog.findChild(QComboBox,"id_foto")          id_flaecheField = dialog.findChild(QComboBox,"id_flaeche")        buttonDelete= dialog.findChild(QPushButton,"pushButton")        buttonDelete.clicked.connect(delete)          def delete():     # missing part of the delete function


QGIS 2.2.0 GRASS not worked

I use QGIS 2.2.0 on Windows 8 64 bit. I try to install use _Standalone installer_ and _OSGeo4W_ and still get the error ![enter image description here](http://i.stack.imgur.com/0ubLL.png) And then i start GRASS               C:\Program Files (x86)\GRASS 6.4.2>grass64     ╬╪╚┴╩└: G_getenv(): ╧хЁхьхээр  LOCATION_NAME эх єёЄрэютыхэр     Traceback (most recent call last):       File "C:/Program Files (x86)/GRASS 6.4.2/etc/wxpython/gis_set.py", line 894, i     n <module>         GRASSStartUp = StartUp(0)       File "C:\Program Files (x86)\GRASS 6.4.2\Python27\lib\site-packages\wx-2.8-msw     -unicode\wx\_core.py", line 7981, in __init__         self._BootstrapApp()       File "C:\Program Files (x86)\GRASS 6.4.2\Python27\lib\site-packages\wx-2.8-msw     -unicode\wx\_core.py", line 7555, in _BootstrapApp         return _core_.PyApp__BootstrapApp(*args, **kwargs)       File "C:/Program Files (x86)/GRASS 6.4.2/etc/wxpython/gis_set.py", line 865, i     n OnInit         StartUp = GRASSStartup()       File "C:/Program Files (x86)/GRASS 6.4.2/etc/wxpython/gis_set.py", line 166, i     n __init__         self._set_properties()       File "C:/Program Files (x86)/GRASS 6.4.2/etc/wxpython/gis_set.py", line 216, i     n _set_properties         not os.path.isdir(os.path.join(self.gisdbase, location)):       File "C:\Program Files (x86)\GRASS 6.4.2\Python27\lib\ntpath.py", line 73, in     join         elif isabs(b):       File "C:\Program Files (x86)\GRASS 6.4.2\Python27\lib\ntpath.py", line 57, in     isabs         s = splitdrive(s)[1]       File "C:\Program Files (x86)\GRASS 6.4.2\Python27\lib\ntpath.py", line 125, in      splitdrive         if p[1:2] == ':':     TypeError: 'NoneType' object has no attribute '__getitem__'     ╬╪╚┴╩└: G_getenv(): ╧хЁхьхээр  LOCATION_NAME эх єёЄрэютыхэр     ╬╪╚┴╩└: G_getenv(): ╧хЁхьхээр  LOCATION_NAME эх єёЄрэютыхэр     ╬╪╚┴╩└: G_getenv(): ╧хЁхьхээр  LOCATION_NAME эх єёЄрэютыхэр      On my PC also have ArcGIS 10.2.2 maybe it's conflict with Python. How fix this?


pgrouting pgr_drivingdistance() query gives inconsistent results

So I have been working on a query(with the help of other stackexchangers :)) to get the edges in an isochrone from a particular point and then update the `count_events` field of those edges by some increment. But for some reason, whenever I run this query I get variable results. In the query below, I start from node 7 and look for an isochrone that is 1.5 hours away from that node. After running the query two times, I did a `SELECT count(count_events), count_events from routing_table group by count_events;`. What I get is that some edges have `count_events = 2` (as it should be), but there are also edges that have `count_events = 1`. So that is odd because it suggests that the query is not updating some edges on the second run of the query. Any suggestion on why this is happening or how to fix it?               with      foo as (select id2 from pgr_drivingdistance(             'SELECT id, source, target, cost FROM routing_table',             7, 1.5, false, false))     update     routing_table rt     set     count_events = count_events + 1     where     exists (select 1 from foo where foo.id2 = rt.id)


How to drag a layer from ArcMap Add-in into its MXD?

I have a simple ArcMap Add-in that displays all featureclass names in a database inside of a ListBox. If I select a name or multiple names in the listbox, how can I drag and drop it in ArcMap? Just to give a quick summary, the purpose of this add-in is because the database has encrypted names and I have to show the "friendly names" in the ListBox control so I will use a special refrence table in SQL to populate the listbox with the friendly names.


What purpose do intersection points serve when mapping?

![enter image description here](http://i.stack.imgur.com/DIi2p.jpg) In **this old map of California** you will notice a ring of intersection points, all circling the focal land mass of the map. What are these intersections used for? I assume they are meant to guide the cartographer, but how do they work? What determines how the intersections of lines are placed?


rubber sheet a polygon collection into another - postGIS

My question is this: How do I create a 4 x 4 grid over the orange grid like the pink(ish) one? The pink grid are geometries that have already been provided and are wonderful. I'm attempting to create something similar over the other orange grids. I could do this manually, but it would take a long time. My first attempt was a fishnet function using How to create a regular polygon grid in PostGIS?. The result is the purple in the bottom right of the picture. I could fiddle with the function for a while to get the grid to be rectangular instead of square but the orange grid varies slightly in places and is completely not perfect in others. I do not want an overlapping smaller grid. So my next idea is to take the 'perfect' geometries and a align it with the bottom left of the orange grid and 'squish' it into the orange grid area. ![enter image description here](http://i.stack.imgur.com/hjPky.png) I don't know if this is A) possible or B) the best way to go about solving my problem. Sorry if this is a duplicate question, I may not have been using the right terminology. Any suggestions? Much appreciated!


ArcGIS API for JavaScript - Create simple buffer or circle graphic against one point

I am stuck, trying to figure out how to create a simple graphic for adding a circle based on one point in my web map. I need the circle to be centered on my single point, with a radius of 5 miles. I saw examples for the geodesic circle and that didn't work for me, as well a creating a buffer, which I don't think I need. I just need a simple circle graphic. Is there a simple way to do this? I have a map with one point and need this graphic for a boundary. I apologize as I am new to this and trying to learn this API quickly. thanks


Cloud Removal from Landsat Data

I'm trying to remove clouds from Landsat 5,7 and 8 data. I'm also trying to do this using only open source options, avoiding ArcGIS. I'm familiar with python and have some QGIS experience. Originally, I was trying to use the Semi- Automatic Classification model in QGIS, but it is giving me a lot of problems, and doesn't always output actual classifications (it often just returns a uniformly valued square...). Can anyone point me in the direction of a better option?


OpenLayers dynamic zoom levels

In my application i add layers dynamically. The first added layer is a baseLayer. When i add layer i extend bounds so the new layer could fit map (it works). The problems is that i don't know how to recalculate zoom levels. In my map config i have maxResolution set to auto and the zoomLevel is set to 0. When i add map with bigger extent the zooms are not recalculated, so i cannot see whole layer. I use GeoExt framework with OL. Code:               addLayer:function(record) {                  var layer = _factoryManager.getFactory('layer').getLayer(record, this.getServiceType());                  var map = this.getActiveMap().map;                  map.addLayer(layer);             console.log('adding layer');             //console.log(map.getZoomForExtent(map.maxExtent));             //console.log(map.getZoom());             map.maxExtent.extend(this.calculateBounds(layer));             //console.log(map.getZoomForExtent(map.maxExtent));             //console.log(map.getZoom());             this.zoomToLayer(layer);         },      And map creation:               map = Ext.create('OGC.core.panel.MapPanel',{                 map: {                     controls: controls,                     //allOverlays: true, if nothing specified all overlays is set to true                     scope:this,                     projection:this.getCRS(),                     maxExtent:bounds,                      maxResolution:"auto",                     //allOverlays: false,                     eventListeners:{                         zoomend:function(evt){                             console.log(this);                             console.log('zoomend');                             console.log(this.getZoom())                             console.log(this.getScale());                             Ext.getCmp('map-bottom').update('Scale: ' + this.getScale());                         }                     }                 },                 layers: [layer]             });


Arcpy Calculate Field Formatting Syntax

I am trying to field calculate a double field (PID) to a new string field (PIN). Using:               qry = '"139-{}".format(!PID!)'     arcpy.CalculateField_management(out, "PIN", qry, "PYTHON")      Given a PID = 260360160 The output generated in string PIN field is: PIN = 139-260360160.0 How can I get rid of the .0? I assume this is carry over from the original field being a double. I am running ArcGIS 10.2 and Python 2.7.3


What FOSS GIS has the option to link attribute tables to rasters

In ArcGIS rasters can have attribute tables. What FOSS GIS offers a similar option?


How to FeatureEditorGrid configure and use in FeatureEditor

I am new User of opengeosuit. I want to configure FeatureEditorGrid plugin to change the column header to display name. My basic requirement is to customize column label like my table column is "pop" and want to display "Population" in FeatureEditor popup. I have refer this qusetion modify the getfeatureinfo popup . So is it possible to modify FeatureEditor popup. I have tried like this :- Include plugin :-                * @require plugins/FeatureEditor.js      * @require plugins/FeatureEditorGrid.js      And add reference in Tools section :-               {         ptype: "gxp_editorgrid"         ,propertyNames: {"project_id_fk": "Project ID",  "output_code": "Output Code"}     }      but it gives error, I don't know what I am missing????...               Error: Could not create tool plugin with ptype: gxp_editorgrid     attributes = feature.attributes;      Is it possible to modify Featureedit popup?? Any suggestion will always welcome. Thanks in advance....


GDAL not accepting *.tif to list through files in directory

I am using gdal_merge.py to mosaic tif. If I explicitly write the file names it works, but if I use *.tif it fails with the following error.               Traceback (most recent call last):       File "C:\Program Files\GDAL\gdal_merge.py", line 509, in <module>         sys.exit(main())       File "C:\Program Files\GDAL\gdal_merge.py", line 392, in main         ulx = file_infos[0].ulx     IndexError: list index out of range      Can anyone tell me why?


null values using Extract values to table with ArcGIS

here's my problem, i have a shapefile with rectangular cells that i created with the function "create fishnet" and clipped it with a contour layer. what i want to do is to add field to the attribute table that takes average values from a raster based on the cells of my shapefiles. so i created a table with the function "extract values to table" and join it to the attribute table of my shapefile. the problem is that i have some null values in some cells. i don"t know the reason, please help.


Save label edited shapefile and convert to Microstation DGN

![enter image description here](http://i.stack.imgur.com/j9ohG.png) Usually i use FME converter to convert any file but now with the above, how to: SAVE / EXPORT the .shp file including the changes made to LABELS ( to best of my understanding, the edited lines are as feature and the label as attribute. Convert using QGIS 2.0.1 -Dufour without loosing any information from .SHP --> .DGN. I have tried doing both (1. label edited .shp file to new.shp file & 2. label edited .shp to new.dgn file) it by going into main menu LAYER >> Save As / Save Selection as Vector File... and it comes out with Save ERROR while converting to Microstation DGN . I believe am missing out the OGR creation option but ma not sure what to put there?


How to calculate the percentage of distribution in each polygon?

I have binary map for disease suitable area and I want to calculate the percentage using pixel count in each polygon how can I do that? I use zonal histogram and do have frequency for each polygon is there is way to use this values to calculate the percentage in each polygon?


GeoExt2 Missing scroll bar on Android chrome in tree panel

I have a panel which extends GeoExt.tree.Panel. While browsing the site with my LG G2 I've noticed I don't see any scroll bar on the panel. My Desktop : ![enter image description here](http://i.stack.imgur.com/yBg4I.png) My Phone : ![enter image description here](http://i.stack.imgur.com/QBvct.jpg) I'm using GeoExt 2 with ExtJS 4.2.1 Does anyone have any idea why it acts like that ?


Unwanted features returned with gs:Clip

I am working on a tool for my map but I’m running into some problems using gs:Clip. The user draws a line. All the polygons from a certain layer that intersects the drawn feature have an attribute that is supposed to be calculated (the total sum is wanted). So, for instance, the user might draw a line that crosses two polygons with attribute values of 2 and 4, thus the code should return 6. It works by saving the user drawn line in an OpenLayers vector layer. The feature drawn is then used (in WKT format) in a chained WPS request. A gs:Clip request (WKT used for clipping) is used as the input for a gs:Aggregate request. Complete code for the WPS request can be found here. The problem is that polygons that do not intersect the drawn line but are close to it are also part of the calculation. See the picture below, it might illustrate the problem somewhat better. ![Picture illustrating the problem](http://oi58.tinypic.com/rif8dd.jpg) Below is part of the code from the response of gs:Clip (an unwanted feature). No boundedBy coordinates nor any coordinates after the feature:the_geom tag. All the features that should be clipped (corresponding to the drawn lines in the picture above) contains coordinates, but for some reason features that are not within the clipping area gets added to the wfs-FeatureCollection and are consequently part of the gs:Aggregate calculation, causing the end result to be incorrect.               //This is a feature that is unwanted in the response     <gml:featureMember>     <feature:IR_Y fid="IR_Y.1295">          <gml:boundedBy>             <gml:null>unknown</gml:null>          </gml:boundedBy>          <feature:the_geom>             <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#3010">                <gml:polygonMember />             </gml:MultiPolygon>          </feature:the_geom>          <feature:BT>5</feature:BT>       </feature:IR_Y>     </gml:featureMember>


Is there a way to retrieve the shape of a styled object from a database?

I am working with geoserver on an oracle database. I am trying to generalize my SLDs and make them more dynamic. The idea is to store all styling information in the database and let the SLD retrieve it dynamically. I found out that this works well for fill, stroke and some other atrributes like opacity, size and rotation. As can be seen below where SLD_FILL and SLD_SIZE are the columns where the actual fill and size styling data is stored.               <PointSymbolizer>     <Graphic>          <Mark>          <WellKnownName>circle</WellKnownName>              <Fill>              <CssParameter name="fill">              <ogc:PropertyName>SLD_FILL</ogc:PropertyName>              </CssParameter>              </Fill>          </Mark>          <Size>          <ogc:PropertyName>SLD_SIZE</ogc:PropertyName>          </Size>     </Graphic>     </PointSymbolizer>      I have tried this also with the shape of a marker where the column SLD-SHAPE stores the text circle:               <PointSymbolizer>       <Graphic>          <Mark>          <WellKnownName>          <ogc:PropertyName>SLD_SHAPE</ogc:PropertyName>          </WellKnownName>              <Fill>              <CssParameter name="fill">              <ogc:PropertyName>SLD_FILL</ogc:PropertyName>              </CssParameter>              </Fill>          </Mark>          <Size>          <ogc:PropertyName>SLD_SIZE</ogc:PropertyName>          </Size>       </Graphic>     </PointSymbolizer>      This does not work. Does anyone know if this is possible?


OGR-Driver GML axis order handling (GDAL, QGIS)

By default the OGR-Driver will swap the axis order to longitude, latitude for geographic coordinate systems. > "Since OGR 1.8.0, the GML driver has coordinate system support. This is only > reported when all the geometries of a layer have a srsName attribute, whose > value is the same for all geometries. For srsName such as > "urn:ogc:def:crs:EPSG:", for geographic coordinate systems (as returned by > WFS 1.1.0 for example), the axis order should be (latitude, longitude) as > required by the standards, but this is unusual and can cause issues with > applications unaware of axis order. So by default, the driver will swap the > coordinates so that they are in the (longitude, latitude) order and report a > SRS without axis order specified." Example (1): urn:ogc:def:crs:EPSG::4326 - GML 3.2 (WGS 84)   Lat / Lon is swapped to Lon / Lat by the driver (result: correct import into QGIS).   http://www.weichand.de/tmp/wfs20gml32_epsg4326.gml Example (2): urn:ogc:def:crs:EPSG::31468 - GML 3.2 (Gauß Krüger 12°)   North / East is NOT swapped to East / North (result: incorrect import into QGIS).   http://www.weichand.de/tmp/wfs20gml32_epsg31468.gml Example (3): urn:ogc:def:crs:EPSG::25832 - GML 3.2 (ETRS89 UTM 32N)   Default: East / North (result: correct import into QGIS).   http://www.weichand.de/tmp/wfs20gml32_epsg25832.gml Is there any reason why OGR 1.9.2 don’t swap the coordinates of projected systems (to East / North)? Thanks in advance   Juergen


How to update a field in one geodatabase table via a join to another geodatabase table?

I have 2 tables in a file geodatabase and I need to update a field (via ArcObjects) in the first table with a field in the first. Basically, the equivalent to SQL Server's update statement:               UPDATE t1      SET t1.DacCode = t2.NewDacCode      FROM Table1 as t1      INNER JOIN Table2 t2 ON t1.PID = t2.PID ;      I would also be curious as to accomplish this sort of update (if different from a direct set of another field value):               UPDATE t1      SET t1.DacCodeDesc = Concat(t2.NewDacCode,'_1201')      FROM Table1 as t1      INNER JOIN Table2 t2 ON t1.PID = t2.PID ;      I currently have a IQueryDef that returns a cursor of what I want to update but that's read-only. So I'm hoping there's a way to do it that is faster than `IRow.Store`.


Get the keyPress-Event in QGis-Plugin

I have a QTreeWidget in a QWidget which is the gui of my plugin(cpp). Now i want to get the keyPress-Event of a Node in the TreeView. I try to reimplement the signal of the QWidget.               protected:         virtual void keyPressEvent(QKeyEvent *);      But this don't work. I think the problem is: My gui class derives from QWidget(the signal will be reimplemented), but it has also added the QTreeWidget as member, and the signal from it should be reimplemented? But how to do this? Any suggestions?


Generating XML to create a file geodatabase table from an existing shapefile DBF

I am writing a C# .NET application to convert a folder of shapefiles into a file geodatabase. **Basic Info** Windows 7 64 bit VS 2010 - Application is being run as 64 bit. Version 1.3 of the File Geodatabase API * * * In order to use the File Geodatabase API, I need an XML document with details about the table. The table in each shapefile is very different. So a single XML file will not work with all the shapes. **What do I have coded?** I generate a Datatable from the shapefiles successfully. No problems there, however creating an .XML file, and then reading it again to create a table definition is way too tedious, and just way too many things can go wrong. **What do I need?** Surely there exists a license free way to generate an XML document based on a DBF file? I have a DataTable in memory that can be manipulated, but that has some serious potential to get complicated.


Why do I get an OGR error when attempting to save an edited Shapefile?

I often get an ogr error when I try to save a shapefile after working on it in Qgis ( adding features, removing, modifying attributes.. ) The error says :   `"OGR ERROR : Attempt to delete shape with feature id (-28 ) which does not exist"` Does anyone have an idea about the reason why I'm getting this error and/or how to avoid it ?


Iterated field create to continue after failure

I am not a very good programmer and do not claim to be an expert in arc. I am going to try to explain this problem as clearly as possible and any solutions that you guys may have would be helpful. I am pulling multiple data sources from varying schemas and need to run a field calculation on two of the fields. Here is my problem, the two fields dont always exist. So some features have a "Field 1" and "Field 2", some only have a "Field 1" and some only have a "Field 2". When I try to run an iterated create field to create "Field 1" it will flat line as soon as it hits the first feature class with "Field 1" already existing. Is there a way to tell the model to continue running even if it hits a failure on a single iteration pass? Or is there another workaround that has alluded me? I have also tried to do an iterated select on these features as well but like above as soon as it hits a feature that does not have the field i am searching for, it fails. Any help would be greatly appreciated. I am working in arc10. Thanks!


How big areas/.osm data files can Maperitive handle?

How do the file-size limitations of Maperitive work out? Background: I'm interested in making a map of the whole of Germany. Any pre- generated maps I find online only cover a region at a time, so maybe most mapping software has a limit. Would it help if I make a .osm file with some features removed? Basically I only need streets and street numbers of civilized areas - so Schwarzwald might be ok to skip :-)


QGIS Slope Classification Issues

I am very new to QGIS for the primary purpose of creating a slopes layer so we know where slopes are above 15% or 20% or whatever we finally decide. I have used our DEM to create a slope geotif and have used that to try and create a classified layer, but that is where my problems seem to begin. I used this formula to create my classified layer `((slope@1 < 15) OR (slope@1 > 60)) = 0` and while I get a new layer I am not able to view it, no matter how I manipulate the properites. I also tried to follow the instructions for the display that says to do this: > 9.4.16. Setting the style for the reclassified layers > >   * Open the Style tab in the layer’s Properties dialog as usual. >   * Under the heading Load min / max values from band, select the Actual > (slower) radio button. >   * Click the Load button. > > > The Custom min / max values fields should now populate with 0 and 1, > respectively. (If they do not, then there was a mistake with your > reclassification of the data, and you will need to go over that part again.) > >   * Under the heading Contrast enhancement, set the Current dropdown list to > Stretch To MinMax. >   * Click OK. > I do not come up with the 0 and 1 that the instructions speak of (I am not using their tutorial data) but it seems that I should be able to see the layer.


split polyline with point and add vertex on that point as well as reflect in attribute table?

I am new to ArcGIS. I am using the ArcObjects SDK and I couldn't understand how to:   * Add vertex to that clicked location as well    * Add attributes in that attribute table. Can someone suggest some books so that I can get better knowledge of ArcGIS.


i'm extracting features using Production and Defense Mapping in ArcGIS 10.1. When I run the data reviewer checks I got several errors "Identifier (GFID or ObjectID) is not unique" among different feature classes of my MGCP feature dataset... What can I do to fix these errors?


OSM zoom levels correspond to what level of text labels?

I'm using Maperitive to render OSM map data of Mexico City as SVG files, destination Illustrator and then print (on paper, in a book). At different zoom levels, the resulting maps have different levels of text. At zoom=16 it looks like I get everything down to the last little street name, at 13, far fewer labels. Since we want to print city maps with just the major categories - like names of suburbs - does anyone know what labels are included with the different zoom levels? If I knew that, I could do the maps without the thousands of street names that would be too tiny to read in print. OSM has something on it: http://wiki.openstreetmap.org/wiki/Zoom_levels ...but not much. Once I've worked it out, I want to do other maps of other cities, hoping that the same rules apply in all of them.


How to Unit test MapBasic Programs?

Is there unit test frameworks available for MapBasic? I've been searching, but have not found anything.


How can I define coordinate system of feature class when overlaying with coordinate zone shapes in python?

I have generated bounding boxes for CAD drawings that do not have defined coordinate system files. I know that each drawing could be in one of 6 different systems that do not overlap. My idea was to use select by location to compare the bounding boxes to each coordinate system shape, and if a selection is made, then to define the coordinate system for the box to be the same as the coordinate system shape it intersects. When I run my script it defines them all to be the in the same system which I know is not the case. What am I doing wrong?               import os, shutil,arcpy,arcgisscripting     CS_shapes_path = r'D:\test\CoordinateSystemShapes.gdb'     arcpy.env.overwriteOutput = 'TRUE'     CS_shapes_lst = []          for dirpath, dirnames, filenames in arcpy.da.Walk(CS_shapes_path,'','','','FeatureClass','Polygon'):       for filename in filenames:           CS_shapes_lst.append(dirpath+'\\'+filename)     for dirpath, dirnames, filenames in arcpy.da.Walk(BB_gdb_path,'','','','FeatureClass','Polygon'):           for filename in filenames:               for CS in CS_shapes_lst:                   desc_cs = arcpy.Describe(CS)                   coord_sys = desc_cs.SpatialReference                   feat_lyr_nm = filename+'_lyr'                   arcpy.MakeFeatureLayer_management(dirpath+'\\'+filename,feat_lyr_nm)                   if arcpy.SelectLayerByLocation_management(feat_lyr_nm,'HAVE_THEIR_CENTER_IN',CS):                     feat_count = int(arcpy.GetCount_management(dirpath+'\\'+filename).getOutput(0))                       if feat_count > 0:                         arcpy.DefineProjection_management(dirpath+'\\'+filename,coord_sys)


featureclass legend

Is there any way to specify a legend before I attribute a featureclass in ARCMAP 10? I have a featureclass layer that has many thousands of polygons, I have to go through and individually attribute them, but it would be great if I could pre-define the symbology such that as I attribute polygons they will be filled in. More importantly, there will be approximately 150 different fill colors, I would like to be able to import the rgb values from a table, rather than manually input the values.


gdaldem slope attribute passing

# How to pass slope attribute to the command                  "gdaldem slope manj.tif outpiu.tif -p use percent 45 -s 111120/370400"      > It's giving error like FAILURE: Too many command options. > >> give any working example for my understanding perpose.


WMTS not numbered from 0/0 with OL3js

I am requesting a WMTS which does not number tiles from 0/0, but from some arbitrary given number. Is it possible to deal with this with openlayers 3? I thought WMTS should have defined first tile of every tile matrix as 0/0, should not it?


Is it possible to create animated markers in ArcMap?

I remember reading somewhere last year that arcgis 10 would allow the creation of animated markers (alike animated .gifs) that could be either exported to pdfs or seen inside arcmap. Does such feature actually exist?


How to select fields returned by GeoServer WMS GetFeatureInfo request?

I'm running simple local mapping service based on PostGIS/GeoServer/OpenLayers stack. Following opengeo tutorial I've tied click events in OpenLayers to WMS GetFeatureInfo call using:                   map.events.register('click', map, function (e) {             var url = "http://localhost:1979/geoserver/wms"                + "?REQUEST=GetFeatureInfo"               + "&EXCEPTIONS=application/vnd.ogc.se_xml"               + "&BBOX=" + map.getExtent().toBBOX()               + "&X=" + e.xy.x               + "&Y=" + e.xy.y               + "&INFO_FORMAT=text/html"               + "&QUERY_LAYERS=MYDATA:MYLAYER"               + "&LAYERS=MYDATA:MYLAYER"               + "&FEATURE_COUNT=5"               + "&SRS=EPSG:3857"               + "&STYLES="               + "&WIDTH=" + map.size.w               + "&HEIGHT=" + map.size.h;             window.open(url,               "getfeatureinfo",               "location=0,status=0,scrollbars=1,width=800,height=125"             );           });      I've used GeoServer's FreeMarker templates to format the response correctly. The problem I have is that the response I get returns all of the fields from the layer. Is there a way to select the ones that are relevant to the user?


Reading lines within Bounding box failed

I am developing an application to display OSM data. In my scenario I need to display the data for one entire country. So my approach is that I will load curresponding countries osm data to postGreSQL and fetch it back on demand. I am providing the zoom facility here (from 0 - 19) and for each zoom level I will query different data based on what need to be displayed at that zoom level and using a bounding box. I am new to this approach. As there exist experts here, **I would like to know how feasilible would be this approach in terms of performance?** (Ealrlier I try to use osm.pbf files and trying to read it dynamically and display; but it hit the performance badly. My second question is: I tried to query all the lines within a given bounding box but it displays empty row as result. May I know what I am doing here now? **SELECT * FROM public.planet_osm_line where ST_INTERSECTS(way ,ST_MakeEnvelope(1.4411000, 41, 1.4411530, 45));** Neither the below query worked (I assume that I can give the lattitudes and longitudes here to define the bounding box here reference: Select bounding box using postgis) **SELECT * FROM public.planet_osm_line where ST_INTERSECTS(way ,ST_MakeEnvelope(-180, -180, 180, 180));** I tried the below query also to fetch some data in France area. But failed again **SELECT * FROM public.planet_osm_line where ST_INTERSECTS(ST_Transform(way,4326) ,ST_MakeEnvelope(-73.3968207647942, 49.296681801433,-73.823777534737, 49.5751193739016));** Please advise.


Blank map when working with OpenLayers and Geoserver

I'm trying to develop a map with 4 layers: two shapefiles (layers: "roads" and "hospitals") and two World Image Files (layers: "hypsometric","shadows"). I installed OpenLayers and tried to write correct code, but something is wrong, because I get only blank map when I enter adress: http://localhost:8080/geoserver/www/wms.html. ![screenshot](http://i.stack.imgur.com/cry2N.jpg) This is my code:               <script src="http://localhost:8080/geoserver/openlayers/OpenLayers.js"></script>     <script type="text/javascript">         var map;     var layer1,options;          function setHTML(response) {              document.getElementById('nodelist').innerHTML = response.responseText;         };              OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;         OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;                   function init(){             var bounds = new OpenLayers.Bounds(                 564840.1, 5075229.7,                 588160.6, 5093252.2             );             var options = {                 controls: [],                 maxExtent: bounds,                 maxResolution: 0.025439315679878505,                 projection: "EPSG:4326",                 units: 'degrees'             };             map = new OpenLayers.Map('map', options);                  layer1 = new OpenLayers.Layer.WMS(                 "Roads",                 "http://localhost:8080/geoserver/wms",                 {                     width: '800',                     srs: 'EPSG:4326',                     layers: 'roads',                     height: '450',                     styles: '',                     transparent: true,                     format: 'image/png'                 },                 {isBaseLayer: false,singleTile: true, ratio: 1}              );             layer2 = new OpenLayers.Layer.WMS(                 "hospitals",                  "http://localhost:8080/geoserver/wms",                 {                     width: '800',                     srs: 'EPSG:4326',                     layers: 'hospitals',                     height: '450',                     styles: '',                     transparent: true,                     format: 'image/png'                 },                 {isBaseLayer:false,singleTile: true, ratio: 1}              );             layer3 = new OpenLayers.Layer.WMS(                 "hypsometric", "http://localhost:8080/geoserver/wms",                 {                     width: '800',                     srs: 'EPSG:4326',                     layers: 'hypsometric',                     height: '450',                     styles: '',                     format: 'image/png'                 },                 {singleTile: true, ratio: 1}              );             layer4 = new OpenLayers.Layer.WMS(                 "shadows", "http://localhost:8080/geoserver/wms",                 {                     width: '800',                     srs: 'EPSG:4326',                     layers: 'shadows',                     height: '450',                     styles: '',                     transparent: true,                     format: 'image/png'                 },                 {isBaseLayer:false,singleTile: true, ratio: 1}              );                       map.addLayers([layer1,layer2,layer3,layer4]);                 // setup controls and initial zooms             map.addControl(new OpenLayers.Control.PanZoomBar());             map.addControl(new OpenLayers.Control.Navigation());             map.addControl(new OpenLayers.Control.Scale($('scale')));             map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));             map.addControl(new OpenLayers.Control.LayerSwitcher());             //map.addControl(new OpenLayers.Control.OverviewMap());             map.zoomToExtent(bounds);                  // support GetFeatureInfo                   }     </script>`      I'm working with OpenLayers for the first time. Thank you.


Field Calculator in ArcGIS - keep equation

I'm using Arc 9.3.1 (Arc Editor). In edit mode I've created a simple field calculation. For example's sake let's make it [Field3] = [Field1] + [Field2] How do I 'keep' the calculation so Field3 will update as I change the values or add values in Field1 and Field2. I have to keep running the calculation everytime I add data. Cannot it not update automatically?


How to control the rendering priority/order of feature layers?

I am displaying polygon, line and point feature layers on a button click event and adding layers in order based on their geometry type, e.g.: polygon -> line -> point. In certain cases layers are rendered fine as we add them, but in some cases as the amount of data (and response time) increases in one of the layers, the polygon layer is rendered on top of the point and line layers and these layers get hidden. We have already used reordering code but its not much of use. Are there any methods to control the rendering of layers or move layers one above the other? I am using ArcGIS Server 10.1, feature service and the ArcGIS JavaScript API 3.1.


List layer names from Map service using python

I am trying to get a list of layer names within our rest services for all services and folders. I have two codes that I am trying to put together and for some reason the layer code doesn't seen to work within the Map service code. Any suggestions would be great. I am running on a 10.2 server.               import urllib2, json          server = "hcs084mcgida901"     port = "6080"     baseUrl = "http://gisdev.mcgi.state.mi.us/arcgis/rest/services".format(server, port)          def serviceLayers(URL):          fURL = URL + "/" + "?f=json"         openURL = urllib2.urlopen(fURL, '').read()            outJson = json.loads(openURL)            return outJson["services"]             if __name__ == "__main__":         URL = "http://gisdev.mcgi.state.mi.us/arcgis/rest/services".format(folder)          def getCatalog():         catalog = json.load(urllib2.urlopen(baseUrl + "/" + "?f=json"))         print 'ROOT'          if "error" in catalog: return         services = catalog['services']         for service in services:         response = json.load(urllib2.urlopen(baseUrl + '/' + service['name'] + '/' + service['type'] + "?f=json"))         print '  %s %s (%s)' % (service['name'], service['type'], 'ERROR' if "error" in response else 'SUCCESS')         folders = catalog['folders']               for folderName in folders:             catalog = json.load(urllib2.urlopen(baseUrl + "/" + folderName + "?f=json"))             print folderName             if "error" in catalog: return             services = catalog['services']         for service in services:              response = json.load(urllib2.urlopen(baseUrl + '/' + service['name'] + '/' + service['type'] + "?f=json"))             services = serviceLayers(URL)         for f in services:               print '  %s %s (%s)' % (service['name'], service['type'], 'ERROR' if "error" in response else 'SUCCESS'), "Layer : {}".format(f["name"])             getCatalog()


Difference between name and toponym name?

When I query geoNames for its data, it typically returns the place name in two ways: 1) name and 2) toponymName What is the difference between them? Thanks!


Creating Polys and Displaying geo points within. ( Where to start? )

Hey all, I'm somewhat of a newb when it comes to creating mapping solutions. I've stayed on a pretty high level playing with openlayers and pulling data from various webservices. The first part of my question is the realm of how do I compute polys? I understand poly basics, such that it's a 2 dimensional shape that you can create a boundary with. For example, when you enter your zip code in the following example. The red line illustrates the boundaries, which is understood as a poly, correct? Could you link me information on this concept, and how to create polygons and how to work with them. I'm very fluent in python, and I think there is a GIS-python module/postgre-gis? The second part is, how do I go about matching coordinates in said polys? What is the algorithm I need to make this happen? Is there an open-source project that I can use to calculate this? Preferably in c++ or python. Third, where can I obtain datasets of Country, State/Territory, County/Providence, City/Town, Neighborhood. Thanks in advance!


WindowsForm in AddIn-Toolbar?

Is there any possibilty to add a little WindowsForms with a textbox to an AddIn-Toolbar? In ArcGIS 9.3 I could easily add it to the Toolbar.cs like all the buttons ect with AddItem. But how can I do this in ArcGIS10? To say it in more details: What I want to do is looping throught features. Of course I have a NextFeature- and a PreviousFeature-Button. But I also want to give the possibility to go to a certain feature by entering the OID in a textbox. I'm thankful for any suggestion.


Online service to transform coordinates from WGS84 to NZTM and NZMG

Has anyone come across a free web service / REST API to transform coordinates? I'm particularly interested in transforming from WGS84 to: New Zealand Geodetic Datum 2000 (NZGD2000 / NZTM) and New Zealand Geodetic Datum 1949 (NZGD1949 / NZMG). Would be a bonus if I could also get the grid version of coordinates as well. Perhaps there's a JavaScript / C# library out there that I can use and host my own service? Apologies if I'm slightly out with my terminology - I'm still a little green to GIS. Thanks in advance for any advice, Gavin


MapServer Symbol with Two Colours

I'd like to symbolise a point dataset with a square (or circle) using two colours. This is useful for displaying values collected on both sides of a road (for example). ![split symbols](http://i.stack.imgur.com/NG1LU.png) I created two symbols, a left side and right side of the square as shown below:               SYMBOL         NAME 'SQUARE_L'         TYPE vector         FILLED true         POINTS             0 0             0 1             0.5 1             0.5 0             0 0         END     END      SYMBOL         NAME 'SQUARE_R'         TYPE vector         FILLED true         POINTS             0.5 0             1 0             1 1             0.5 1             0.5 0         END     END       Then in my LAYER I can create a CLASS using the two different STYLES:               CLASS         STYLE             SYMBOL "SQUARE_L"             COLOR [LEFT_CLR]             SIZE 10         END         STYLE             SYMBOL "SQUARE_R"             COLOR [RIGHT_CLR]             SIZE 10         END      END      However the features do not display correctly - they are not aligned correctly and are not of equal size (due to an overlap?). I thought I had resolved it by setting a "bounding box" in the symbol to make sure they were equal size:               SYMBOL         NAME 'SQUARE_L'         TYPE vector         FILLED true         POINTS             0 0             0 1             0.5 1             0.5 0             0 0             -99 -99 # increase bounding box so shape is correct size             0 0             1 0             1 1             0 1             0 0         END     END       However I then noticed that the sides of the square were displayed with the wrong values. The MapServer symbol collection at http://github.com/mapserver/mapserver/wiki/SymbologyExchangeVector has some nice examples but none of which describe how to do this. Any ideas on how to achieve this in MapServer?


How to add hillshades to a raster map?

I have a raster map **without** hillshades and want to **add Hillshades** derived from the SRTM90 dataset. I am looking for a tool, that can handle that **as automatic as possible**? I don't want to bother with too much with Data- Download, -Conversion and -Processing. I am looking for a tool, that can be handled by an end-user!


OpenLayers request a WFS feature

I am trying to request features of a wfs layer and then zoom to them. The wfs layer is defined as follows:               wfsLayer = new OpenLayers.Layer.Vector("University", {           strategies : [new OpenLayers.Strategy.Fixed(), cluster_strategy],                  styleMap : new OpenLayers.StyleMap({                      "default" : gebaeudeNrStyle,                      "select" : gebaeudeNrStyle                  }),           protocol : new OpenLayers.Protocol.WFS({                      url : "/geoserver/wfs?",                      featureType : "Gebaeude",                      featureNS : "namespace",                      geometryName : "the_geom",                      srsName : "EPSG:4326",                      version : "1.1.0"           })     });      Here the selectFeature function, which requests features of the above wfs layer by an id and zooms to it.               function selectFeature(id) {              var feature = wfsLayer.getFeaturesByAttribute("Gebaeude_Nr", 03);              if (feature) {              map.zoomToExtent(feature.geometry.getBounds());         }     }      In this example, i'd like to zoom on the third id (Gebaeude_Nr), which inexplicably does not work. getFeaturesByAttribute() delivers an empty array. The feature.length is zero and firebug returns an error "TypeError: feature.geometry is undefined". However, the underlying database table for the featureType "Gebaeude" contains a column "Gebaeude_Nr" and an entry "03". ![enter image description here](http://i.stack.imgur.com/Q5ziq.png) How can i search for a WFS feature and zoom to it in OpenLayers? Thanks in advance Side note:               for (var i = 0; i < wfsLayer.features.length; i++){         alert(wfsLayer.features[i].geometry);     }      works, which gives me outputs like POINT(895866.7304909064 6849316.098470407) for every feature. However, i haven't found out yet how to get all column names of the layer in order to compare the results with the database. This would allow to check if the above column "Gebaeude_Nr" exists for `getFeaturesByAttribute("Gebaeude_Nr",03);`


How to Split Roads at intersection for Network Analysis?

I have a file geodatabase Feature Class representing the roads of a city. The Roads are not split at Intersections. ArcGIS needs roads to be split at the intersections, otherwise it assumes that the roads are not connected. This Image shows the Connectivity model for ArcGIS Network Analyst, when the roads are not split. ![Connectivity](http://i.stack.imgur.com/0j5Zl.gif) How do I correct this problem and split the roads wherever they intersect?


Create a Menu Containing a List of Layers That Can be Added to an MXD Using arcpy.mapping

Is it possible to create a list of layers (residing in something like a menu) that can be selected and added to an mxd using arcpy.mapping. I've been using the bit of code below (there's someone I need to thank for this as I nabbed it from this site) to add a single layer. The code is within a Scripting Tool and is added to a toolbar as a Geoprocessing Tool.               import arcpy     import arcpy.mapping          #Data Location     parcels = r'P:\Mapping\Data\Land.gdb\Parcels\Parcels'          #Get the map document     mxd = arcpy.mapping.MapDocument("CURRENT")          #Get the data frame     df = arcpy.mapping.ListDataFrames(mxd, "*")[0]          #Create new layer     parcelLayer = arcpy.mapping.Layer(parcels)          #Add the layer to the map at the bottom of the TOD in data frame 0     arcpy.mapping.AddLayer(df, parcelLayer, "TOP")          #Refresh things     arcpy.RefreshActiveView()     arcpy.RefreshTOC()     del mxd, df, parcelLayer      I want to avoid creating a script for each dataset that I want to add programatically to an mxd, but I also want to stay within Python/arcpy as I have no business trying to do this within ArcObjects. Any help is appreciated.


how do I get rid of that blue circle that is on the cursor when drawing a point in OpenLayers?

In openlayers, before placing a point, there is a small blue circle the moves with the cursor. I want to get rid of that and can't figure out how. If possible, it must be in the following section of the code: var drawFeature = new OpenLayers.Control.DrawFeature(vectorLayer, OpenLayers.Handler.Point); map.addControl(drawFeature); I just can't seem to find anything on it! Thanks so much in advance!


OpenLayers: ALL image layers are out of place on google maps v3 and OSM base layers

**Summary** : I have 2 different image layers that looked fine with my old mapstraction/google maps based system. Using the same coordinates as bounds in openlayers results in a shift to the north by like 100 miles.   * _potentially most important_ is that this seems to be limited to the image layers only. For all of the vector-based layers I've looked at (vector based markers and vector based polylines), they all seem to be in the right spot when compared to the old system.   * one image layer is an image of text where the original coordinates were chosen somewhat arbitrarily so the fact that it's shifted north is not a big deal (screenshot example: https://img.skitch.com/20110427-jj62ac75y8eihms3gxxfr15371.jpg)   * the other image layer is weather radar and it's absolutely essential that the image overlay be in the correct place (screenshot example: http://img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg)   * this happens with Google Maps v3 base layers and OpenStreetMap base layers. I have not tested other base layers   * the original question below was centered around the weather radar problem because that's where I originally noticed the image overlay problem, but it would appear that whatever I'm doing wrong for the weather radar image layer is also being done wrong for the text/image overlay. * * * I'm new to OpenLayers, so I'm hoping I'm missing something obvious. I'm trying to transition my maps to OpenLayers from Mapstraction (and before that it was just the plain Google Maps v3 API). I'm having issues with one of the images not aligning properly (though all other types of layers seem to work just fine). Specifically, I'm trying to overlay a weather radar image (http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif) but it's not putting it in the correct place. I've tried using both OSM and Google Maps v3 base layers, and it always appears to be too far north. Screenshot explanation: img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg I originally got the coordinates through the KMZ file that you can download here: www.srh.noaa.gov/ridge/kmzgenerator.php. Click on "Lower 48 States" under the "National & regional mosaics" section to get the KMZ file. Alternatively, the KML contents are viewable here: gist.github.com/942730 I'm assuming I'm not specifying the bounds for the image layer properly:               # full code in the example links below this          proj4326 = new OpenLayers.Projection("EPSG:4326");          bounds = new OpenLayers.Bounds();     bounds.extend(new OpenLayers.LonLat(-127.620375523875420, 21.652538062803));     bounds.extend(new OpenLayers.LonLat(-66.517937876818, 50.406626367301044));     bounds.transform(proj4326, mapObject.getProjectionObject());     radar_overlay = new OpenLayers.Layer.Image('radar', 'http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif', bounds, new OpenLayers.Size(3400, 1600), {       'isBaseLayer': false,       'alwaysInRange': true     });      **Full Examples:** http://jsfiddle.net/hayley/C4rue/ - (out of place) - simplified example with OL and google maps v3 beta.wickedwx.com/ - (out of place) more complete example - on this map, there's also an orange dot for the radar location at Wichita, Kansas where there's usually a blue blob (ground clutter on the radar), but the blue blob ends up being placed near Salina, Kansas (screenshot example: img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg) http://wickedwx.com/ - working example that uses mapstraction and google maps v3


Label one to many relationship class

Good day all, I’ve created a feature class with a one to many relationships to a table. One point many classes. However I want to label the point with the classes attributes. ESRI wrote VB solution but it's not supported at version 10.1. Thanx Alot Geog


Display multiple attributes for one point

I am using ArcGIS 10. How can I display multiple attributes for a single point. For example, I would like to display (graphically if possible) the amenities provided at various recreational areas... such as my point location "Graham's Landing" and have a symbol for camping, fishing, boat ramp, bathrooms and etc that reference the data in the attribute table. I would like to do this for each point (rec facility) that I have. Thanks and I am open to other ideas as well!


Arcgis javscript calculating lines in a place

I have two mapservice. Fist service includes parcels and second includes water pipe lines. I want to calculate total pipelines length in a parcel. How can I calculate this via arcgis javascript API. For example 2201 number parcel includes 284 meters.


PostgreSQL function does not exist

I have PostgreSQL 9.2 with Pgrouting extension, but when I want to call a function(pgrouting) does not work. Id like to compute the shortest path between two point.               SELECT gid, AsText(the_geom) AS the_geom             FROM shootingstar_sp('geom_way', 281346, 280088, 0.1, 'length', true, true);      result:               ERROR: function shootingstar_sp(unknown, integer, integer, numeric, unknown, boolean, boolean) does not exist     SQL state: 42883      I did it same way with astar_sp_delta(); I got same result... Thanks


QGIS: Albers projection in lat lng?

I'm trying to make a map of Russia in the Albers projection. My projection string is:               +proj=aea +lat_1=45 +lat_2=70 +lat_0=40 +lon_0=100 +x_0=20 +y_0=20       +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs      Which produces a very nice-looking map, except that the projection is in meters, and I need it in lat/lng. However, whenever I try to remove `+units=m` from the projection string, QGIS adds it right back in. How do I get this projection in a coordinate format? Is there a similar but different projection I could use that QGIS will allow to be in lat/lng (preferably that's also supported by d3 or d3.geo.projections, which is how I expect to show these coordinates)?


Broken image from mapserver, png not rendering

I'm trying to render WMS MapServer data on top of Google Maps using the OpenLayers JS library. My problem arises when I try to render the data as a series of points throughout the New York City area. On my local machine I get a broken image, but on my live server I get no broken PNG data or anything at all. Any help would be very much appreciated. You can also check out the live site at: `http://134.74.146.40/~Oviedo12/final/subway%20crowding/view.html`. OpenLayer JavaScript code below:               var map;     var mapBounds      = new OpenLayers.Bounds(-8266100.0, 4938263.9, -8204223.4, 4999860.8);     var movementBounds = new OpenLayers.Bounds(-8266100.0, 4938263.9, -8204223.4, 5030000.0);     var aliasproj = new OpenLayers.Projection("EPSG:4326");     var options = {             projection: "EPSG:4326",             units: "ft",             maxResolution: 'auto',             restrictedExtent: movementBounds,             maxExtent: mapBounds         };          function init(){                   map = new OpenLayers.Map('map', options);              var base_layer = new OpenLayers.Layer.Google(                         'Google Streets', // the default                         {   numZoomLevels: 20,                              projection: aliasproj,                              isBaseLayer: true                         });              //change 'Oviedo12' to your login name         var wms_layer = new OpenLayers.Layer.WMS("WMS Overlay",             "mapscripts/dynamicwms.php",              {layers: 'L_line', transparent: true, format: 'image/png', reqType:'wms'},             {isBaseLayer: false, visibility: true}         );         //*/              map.addLayers([base_layer, wms_layer])         //map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);         map.zoomToExtent(map.maxExtent);         map.addControl(new OpenLayers.Control.MousePosition({position: new OpenLayers.Pixel(0,0)}));     }      Map file code:               MAP       IMAGETYPE      PNG       STATUS         ON       IMAGECOLOR     255 255 255              PROJECTION         "init=epsg:4326"       END            SYMBOL           NAME 'circle'           TYPE ELLIPSE           POINTS 1 1 END           FILLED TRUE       END            OUTPUTFORMAT         NAME png         DRIVER "GD/PNG"         MIMETYPE "image/png"         IMAGEMODE RGB         EXTENSION "png"       END            OUTPUTFORMAT         NAME jpeg         DRIVER "GD/JPEG"         MIMETYPE "image/jpeg"         IMAGEMODE RGB         EXTENSION "jpg"         FORMATOPTION QUALITY=80       END          END # All map files must come to an end just as all other things must come to...      PHP code for dynamic render:               <?php          if (!extension_loaded("MapScript")) dl("php_mapscript.so");          $request = ms_newowsrequestobj();          foreach ($_GET as $k=>$v) {          $request->setParameter($k, $v);     }          $request->setParameter("VeRsIoN","1.0.0");     ms_ioinstallstdouttobuffer();     $oMap = ms_newMapobj("../maps/dynamic.map");               $new_layer =ms_newlayerobj($oMap);     $new_layer->set("type", MS_LAYER_POINT);     $new_layer->set("dump", 1);     $new_layer->set("status", 1);     $new_layer->set("name","L_line");     $new_class = ms_newClassObj($new_layer);     $new_style = ms_newStyleObj($new_class);     $new_style-> color->setRGB(0, 0,255);     $new_style->set("symbolname", "circle");     $new_style->set("size", 5);          $new_layer->setConnectionType(MS_POSTGIS);     $new_layer->set("connection","stuff to connect to db");     $data="the_geom from (select the_geom from station2 where lines = 'Canarsie') as foo using unique the_geom using SRID=4326";     echo ;     $new_layer->set("data",$data) ;               $oMap->owsdispatch($request);     $contenttype = ms_iostripstdoutbuffercontenttype();     if ($contenttype == 'image/png')     {        header('Content-type: image/png');        ms_iogetStdoutBufferBytes();     }     else     {         $buffer = ms_iogetstdoutbufferstring();         echo $buffer;     }     ms_ioresethandlers();     ?>


What projection does the global climate region map from Wikipedia use?

I would like to use this global climate region map from Wikipedia as a "basemap" (by plotting over the image in R). ![enter image description here](http://i.stack.imgur.com/30xsP.png) Is it possible to determine the projection of this map?


ArcGIS Server 10.0, Rest Service not showing relashionship class

It's the first time that I am using Relationship Classes for a web mapping project. Everything seems to be set-up properly, meaning I can get the related info out of ArcMap and ArcCatalog when viewing the map service. But the REST service won't show me the related information. Update/// I published a service with only my parcel layer in it and still having the same issue. My Feature Class, Table and Relationship Class are stored in SDE. I'm using ArcGIS 10.0 SP4 (Server, Desktop and SDE). Thank you, Dominic


How to Batch Change X, Y Coordinate Number in ArcGIS?

I have a huge number of points (100000 points). Some of these have the same x,y coordinates. For example, 50 points are same in x,y then 100 points are same in another x,y coordinates and so on. Then the points are overlaid with each other and the user can’t see all of them. What I want to do is calculate the x and y of each point automatically and add a number at the end of each x and y. For example: Point a: x=65.23, y=26.76 Point b: x=65.23, y=26.76 What I want to do is: Point a: x= 65.231, y=26.761 Point b: x=65.232, y=26.762


GeoTools, add column in query with CQL

I'm trying to query the database (DataStore) and want to let the datastore calculate a value for me. In SQL I would do it like this:               SELECT name, ST_Area(ST_Intersection(the_geom, ....) AS myValue FROM ...      Is there any way, how I can do this with CQL. My current approach is this, but I do not know how to add this calculated field. I need this, as I want to sortBy this field.               DataStore ds = ...     Filter filter = CQL.toFilter("INCLUDE");     SimpleFeatureCollection features = source.getFeatures(filter);      Any idea, how to add my area function to the resultset?


Why does a track point layer attribute table have no positional information?

I imported a track log in GPX format to QGIS. The track had two layers, the track points and the track, a smooth line joining the track points. Why does the attribute table for the track points have no positional information in it? It has info I can understand in the hdop and vdop columns and also the one for ele(vation) but there is no column in the attribute table to hold positional data.


How to extract most probable flow line from multiple lines?

I have to apply uncertainty principle to computing flow accumulation using Monte Carlo method. I generate raster with random numbers which represents mistakes in creating DEM. Then I apply those rasters on DEM in iterations. For each DEM with added random numbers raster I compute flow accumulation. In each iteration it generates slightly different lines of flow accumulation. At the end of process I merge these lines into one raster. It looks like this: multiple flow lines What I have to do is extract most probable flow line from this data. I use ArcGIS10 but it does not matter which software should be used. In ArcGIS I tried to use thin function or extract by attributes which gives me pretty good results. I also converted every line into polyline, merged them and applied buffer. Then I used thin function on buffer. This gives me also very good result. I want to ask if you can help me with finding another solutions for extracting most probable line. It is for my diploma thesis. Thank you for your answers.


What are the alternatives to Manifold GIS?

Question from my father who is looking to explore alternatives to Manifold: "I am an independent environment consultant who is a heavy user of GIS for spatial data crunching, geo-referencing self-digitised maps, terrain modelling using LIDAR and analysing GPS field data. I have a workstation 8 core Intel i7 3.4 GHz, 16 Gb of RAM, NVIDIA GeForce GTX 570 running 64 bit Windows 7 ultimate and dedicated HDs for system and cache files. For many years Manifold GIS has been my software of choice due to intuitive GUI, wide range of functions, programmability, natively 64 bit and low price. However, the current version (Manifold 8) is now 4 years old and is now very slow for many tasks. See here for a recent vector processing comparison where Manifold comes out 40x slower than ArcGIS. While Manifold has an impressive suite of surface rendering and analysis functions it is so slow in processing LIDAR data that is almost unusable for anything other than very small data sets. Manifold is CUDA enabled for a limited set of terrain processing functions (see the manual > “index” > “N” > “NVIDIA”) but not the actual rendering. One reason why the next version Manifold 9 is taking so much time may be because the big chunks of software are being coded for CUDA which everyone acknowledges is difficult. Manifold’s loyal user base has been promised the massively faster and improved Manifold 9, but there has been no sign of this new release in 2 years. I, like many Manifold users, are beginning to despair of any development of the software. To protect my business and keep ahead of the game I am being forced to look for other GIS solutions. An alternative to Manifold would have to have the following:   * Run natively in 64 bit and so address large amounts of RAM (ie < 4Gb and typically 16Gb and above).    * Able to use the GPU for image/surface intensive processing eg CUDA on Nvidia graphics cards.   * Terrain modelling and LIDAR processing capabilities, be able to ‘drape’ vector and raster map components and do 'fly throughs’ for video presentations.    * Be a stable release. Manifold 8 professional with ‘surface extensions’ costs $590 (£370). None of the options that I have seen so far seem up to the job. These include:   * ArcGIS – I have just been quoted £1495 + £425 per annum to access upgrades and another £2,495 for the 3D Analyst extension.   * QGIS – Seems only to support 32 bit in the stable 1.8.0 Windows version, buggy, and lacking in-house digital terrain mapping features.   * R's spatial packages – this option seems to be too fiddly and static for what I want to do. Looking forward to responses from people who have faced similar dilemmas – what's the best solution out of these options or should I go for something else completely?"


Mapnik render Error : Could not create datasource for type 'postgis'

I try to use mapnik render for a tile server. During the initialization 'renderd -f -c /usr/local/etc/renderd.conf', the following error message is displayed :               An error occurred while loading the map layer 'xxx': Could not create      datasource for type: 'postgis'  encountered during parsing of layer     'line features' in Layer at line 19 of 'XXX/test.xml'      There is no "No plugin found for type ' postgis '" displayed. The file XXX/test.xml is the following :               <?xml version="1.0" encoding="utf-8"?>     <!DOCTYPE Map [     <!ENTITY % entities SYSTEM "inc/entities.xml.inc">      %entities;      ]>          <Map bgcolor="#B5D2CE" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">     <Style name="all_roads">      <Rule>       <LineSymbolizer>        <CssParameter name="stroke">#800080</CssParameter>        <CssParameter name="stroke-width">1.4</CssParameter>       </LineSymbolizer>      </Rule>     </Style>          <Layer name="line features" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">      <StyleName>all_roads</StyleName>       <Datasource>        <Parameter name="type">postgis</Parameter>        <Parameter name="password">XXX</Parameter>        <Parameter name="host">localhost</Parameter>        <Parameter name="port">5432</Parameter>        <Parameter name="user">XXX</Parameter>        <Parameter name="dbname">XXX</Parameter>        <Parameter name="table">(select way from planet_osm_line where highway is not null) as roads</Parameter>        <Parameter name="estimate_extent">false</Parameter>        <Parameter name="extent">-20037508,-19929239,20037508,19929239</Parameter>      </Datasource>     </Layer>     </Map>      Can you help me? Thanks


How to create halo for a text in the composer

I would like to add texts with halo, in the composer (not in the map). Do you know a way to do it? I'm using QGIS 2.0.1 Thank you


Which true type editor do you use to create/modify point symbols for GIS?

Which true type editor do you use to create/modify point symbols for GIS and what are the advantages and disadvantages of the tool? I am looking for a true type editor to create/modify custom point symbols used in GIS. Here are some examples of symbols I want to create: ![enter image description here](http://i.stack.imgur.com/OoB9q.jpg) I am not familiar with the structure of a true type. But I guess that a true type contains many features which are not interesting for GIS (e.g. kerning). So the true type editor should be easy to use by a GIS analyst. I tried to get informations about true type editors by reading some descriptions in WWW (e.g. FontCreator). Before I test (or buy) a program I first want to get informations which editor is good for “GIS symbols”. Both commercial and free solutions are welcome.


Show the changed CRS in the Qgis attribute table

I am a GIS newbie, so bare with me if this is a duplicated question. I could not find the answer anyway. I am using QGis to read a polygon shapefile with a Dutch CRS (EPSG 28992 to be precise). Now I would like to change the CRS and export the changed CRS to Tableau, so I can build polygon graphs. I know how to export the data to Tableau by copy pasting the attributes table, processing the data further in R and exporting it to Tableau. I also found how to change the CRSin QGis into EPSG 4326 by `Project > Project Settings`. After changing the CRS the map changes, showing the correct coordinates. However the attributes table is still showing the original coordinates. Can anyone tell me if there is a way such that the attributes tables shows the changed CRS as well, such that I can export it? Many thanks in advance!


Connecting to folders in ArcGIS 10.0?

In ArcGIS 9.3.1 (and prior) whenever the user wants to add data to Arcmap from a specific folder (and not from the general drives, C:\ for example), He has to press "connect to folder" and map the specific folder. Other than being a nuisance, it doesn't allow the user to be flexible - if he suddenly needs data from a different folder he can't simply navigate to it, he has to map it first. Does anybody know if it the same or was it fixed in ArcGIS 10?


How to save Custom labelling (template) so it can applied to other feature classes

Hi all I sometimes work with large NTDB datasets, and was just wondering the best way to go about saving all of my custom labeling. Is there a way I can save all of my custom label classes so I can apply them to all of my NTDB datasets so all maps made with this dataset are standardized? I can do it the long way by changing the classes every time, but just wanted to know if I could save it so I can just apply it. ie/ like a layer file? Thanks for all your help


When do I need to use a proxy with OpenLayers?

When exactly do I need to use a proxy with openlayers? I've done a lot of reading on this but can't seem to find a difinitive answer. Wondering if this is the route of my problems. For instance, if I have one server running Geoserver (WFS) on port 8080 and Apache (serving OpenLayers) on port 80 would I need to use a proxy? If the servers are phyically seperate would I need to use proxy? Many thanks, Steve


No 'Access-Control-Allow-Origin' header is present on the requested resource. Using Geoserver + Openlayers

This is my code to open a WFS layer from geoserver:                   <!DOCTYPE html>     <html lang='en'>     <head>      <meta charset='utf-8' />      <title>My OpenLayers Map</title>      <script type='text/javascript' src='OpenLayers.js'></script>      <script type='text/javascript'>           //Variável map      var map;           //Função a ser chamada para criar o mapa na leitura da página      function init() {           // A classe Map espera dois argumentos "map_element" que o ID do elemento HTLML geralmente uma DIV e opções de mapa {key:value}      map = new OpenLayers.Map('map_element', {});            //Camada WFS      var wfs_layer = new OpenLayers.Layer.Vector(         "Routes",         {             strategies: [new OpenLayers.Strategy.Fixed()]             ,projection: new OpenLayers.Projection ("EPSG:900913")             ,protocol: new OpenLayers.Protocol.WFS({                      version:"1.1.0",                 url:"http://localhost:8080/geoserver/wfs",                 featurePrefix: 'spatial',                 featureType: "spatial:onibus",                 featureNS:"http://spatial/application/webGIS",                 geometryName: "geom"             })         }              );           //Adicionar as camadas ao mapa      map.addLayers([         wfs_layer]);           //Camada de controle que vai mostrar as camadas no mapa      map.addControl(new OpenLayers.Control.LayerSwitcher({}));           //Verifica se o mapa tem um ponto central e o extende a sua extensão máxima      if(!map.getCenter()){      map.zoomToMaxExtent();           }      }           </script>     </head>          <body onload='init();'> <!-- Chama a função js init() -->           <!--Elemento HTML onde o mapa é exibido -->      <div id='map_element' style='width: 1000px; height: 900px;'>      </div>          </body>     </html>      The page is in www folder of geoserver, when I run it gives the error:               XMLHttpRequest cannot load http://localhost:8080/geoserver/wfs. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.      I searched but did not quite understand because I am excutando locally. Can someone explain to me more clearly why this error? How should I solve it? This error only occurs in Chrome. Firefox will not appear on the map, but the console is:                   file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/OpenLayers.js     file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/theme/default/style.css     file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/img/layer-switcher-maximize.png     file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/img/layer-switcher-minimize.png     OPTIONS http://localhost:8080/geoserver/wfs


Ordnance Survey No Turn

I have a project that involves porting a lot of information from ordnance survey to a spatial database. From that database I'm going to extract the information I need for a routing application. However, I have a problem as I'm not sure how no turn works. I have trawled through the ordnance survey documentation but haven't been able to work out how no turn in the environment qualifiers apply. My question is, from the data in ordnance survey, how do you find out which links you can't turn onto (from link x)? Any help would be appreciated.


How can my client catch mapservice timeouts?

I've got a gp service that exports pdfs using connections to mapservices. I'd like to write to a log file when a request to a service times out. For WMS mapservices I see I can use IWmsClientEvents outbound interface on the WmsConnection, but for the AGSServerConnection I don't see any outbound events. Is there a way to find out when a draw request to an arcgis server mapservice times out?


In Oracle Spatial, what is the fastest way to determine the percentage of intersection between two shapes?

I have to query polygons that intersect with one another. Our polygons occasionally contain intersections that aren't intended (meaning just a few vertices cross boundaries). I want to filter out these anomalies. My current algorithm is to take the intersection of the two shapes and compare the area of the intersection with the area of the original polygon. If the intersection area is 1/16th the original, I'm considering it valid for our business rules. I have found sdo_intersection to be very slow (~30 seconds for 50 records). I'm performing this operation against a national landgrid so the process runs for several days. I've already fine-tuned my algorithm to exclude polygons with the 'inside' relationship and just work on the ones that I know have overlapbdyintersect. Any ideas on how to make this faster. At the end of the day, I want to know if there is any significant overlap between two polygons (not just a few vertices crossing over).


ArcGIS median value from a layer

I've been hunting around ArcGIS 9.3 and having no success at finding a tool/function that can give me the median (not the mean/avg) tabular value of a spatial database. For example, if I have a data layer of mountain peaks, I would like to be able to determine the elevation of #35 of 70 mountain peaks that exist within a county. Conceptually it should be pretty easy. Count the total records, sort by elevation ascending, get the value from the elevation field for record # (count/2). Would I need to script this out in Python, or am I missing something obvious that would allow me get this more quickly? I find it hard to believe no one else has had a need for this function and created a solution. To add some complexity to the matter, what if I wanted the median elev value for peaks in every county within the state in a single table? Basically the same output format as Frequency or Summary Statistics tools when using the Case Field option. **UPDATE:** Thank you for your suggestions! I was able to adapt the script linked by @VietThanh Le to meet my needs. I have posted the updated script and ArcToolbox at: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A0CD1751-1422-2418-882E-001EE0DC0D35


How do I automatically print individual regions from a MapInfo table to a PDF without interactively selecting and printing each one?

I need to automatically print individual polygons that make up a table. I need them to be a close-up view of the polygon and print to a PDF file. It is very time consuming to print each one manually. I am thinking I will have to write a program to accomplish this, unless there is a tool that currently exists. Any ideas? The currrent process is to zoom in on the desired region until it fills the layout window. I then print the layout to a PDF, select the next region, and repeat.


How to perform GRASS v.rast.stats via QGIS

I have been using qgis for the last few months. I got interested in using GRASS tools through QGIS. I wanted to compute zonal statistics for a raster surface for a given polygon layer. I loaded the raster and the vector successfully into QGIS and GRASS. Then I used v.rast.stats Tool to compute zonal statistics and the program runs without any error. Here is a screenshot of the analysis: ![enter image description here](http://i.stack.imgur.com/VExlo.png) But I can't see the results in my vector map. When I open the attribute table, no new column has been added. Can anyone advice me on how to get a new column with the computed value? Thanks Zaman


How can I find a GIS shape file for GP surgery locations in the UK

I am doing some research on accessibility to GP surgeries in South Norfolk and want to find a GIS data file with all the GP surgeries' locations on it that could be used in ArcMap. Is there anywhere online I can find this? I have been looking for quite a while but cannot find anything.


enabling feature access without installing ArcSDE 10.1?

Is there any way to enable "feature access" when publishing a map using ArcGIS 10.1 server, without installing ArcSDE?


How many geodatabases per ArcGIS Server license?

I need to create and authorize a new ESRI ArcGIS enterprise geodatabase. Our organization has an existing ArcGIS Server license that has already authorized one ESRI ArcGIS enterprise geodatabase. Will I be able to specify the existing ArcGIS Server authorization file to create another enterprise geodatabase within the same organization and network? I would just try except that someone else administers the ArcGIS Server and we are still in the planning stage. I understand that we will need ArcGIS for Desktop Standard or Advanced (not Basic) to Create an Enterprise geodatabase. ArcGIS for Server is version 10.0. Our ArcGIS for Desktop Standard is version 10.1.


Arc node topology in ArcMap

I would like to implement an arc node topology in arcmap. Do you know how can i build node topology from line layer in ArcMap 9.3.1?


How to access row from dbf table?

I have got the following problem: I would like to access a row from a dbf table. I have tried to access it through SearchCursor, but I am not able to do it without knowing the field name. This is my code:               # Create SearchCursor     rows = arcpy.SearchCursor("tabulka.gdb\zrazkove_uhrny")          # Get names of all fields     field_names = []     sFields=arcpy.ListFields("tabulka.gdb\zrazkove_uhrny")     for field in sFields:         field_names.append(field.name)          # Print all values of second row     for row in rows:         print row.field_names[1]      This code works only if I know the name of a row which I dont. I dont even know the number of columns in the table. This code work only if I substitute `row.field_names[1]` with `row.F2` (F2 is the name of the column). **My questions are:**   1. Is there a simpler way how to access values in dbf table?   2. Is there a way how to access values in dbf table using SearchCursor and without knowing field (column) names? Thanks


Performance - using multiple file geodatabases as opposed to one

I'm trying to decide the best way to organize my data for an ArcEngine application. I am particularly interested in map display and query speed. Currently I have all of my data separated into separate file geodatabases based on theme. So I have Transportation.gdb, Utilities.gdb, etc. The data doesn't necessarily need to be organized based on themes, and I'm considering putting it all in one file geodatabase. I will be doing my own testing, but I wanted to throw the question out to the community. **In general, is using a single file geodatabase faster than using multiple (roughly 7) smaller ones?** I'm interested in any other pros/cons as well. NOTE: the software and all data will be on the customer's local machine. No data served on the web or over a network, and the amount of data is fairly small (roughly 100,000 features).


Calling arcpy/python from .NET?

Are there any available examples that show how python can be integrated into a .NET ArcGIS Addin or Extension? I have a series of python scripts that I would like to call from form events (e.g. button clicks) in .NET. I would also like to be able to set variables in the script from a .NET form. Should I bite the bullet and re-write these scripts in .NET, or is there a simple way to wrap the python code?