title: KML file seems to load in Openlayers without error but doesn't show vectors

text: I'm trying to load a KML file into an Openlayers map. It seems to successfully run but I am not seeing anything show up on the map. Vectors should show up in an area of New Mexico if it's working correctly. Here is my code (here is a link to the KML file )               var map;          var baseMaps = [];     var sensors = [];          //create map and center over location     var init = function () {         // create map              map = new OpenLayers.Map({             div: "map",             theme: null,             projection:new OpenLayers.Projection("EPSG: 4326"),             controls: [                 new OpenLayers.Control.Attribution(),                 new OpenLayers.Control.TouchNavigation({                     dragPanOptions: {                         enableKinetic: true                     }                 }),                 new OpenLayers.Control.Zoom()             ],             layers: [                 new OpenLayers.Layer.OSM()             ]         });              map.setCenter(new OpenLayers.LonLat(-106.7653, 32.3197).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()),9);     };          //show kmlFile     var showSensor = function(sensorVO)     {         if(sensorVO.selected == true)         {             var kmllayer = new OpenLayers.Layer.Vector("KML", {                 strategies: [new OpenLayers.Strategy.Fixed()],                 protocol: new OpenLayers.Protocol.HTTP({                     url: sensorVO.url,                     format: new OpenLayers.Format.KML({                         extractStyles: true,                          extractAttributes: true,                         maxDepth: 2                     })                 })             });                  map.addLayer(kmllayer);             var select = new OpenLayers.Control.SelectFeature(kmllayer);             map.addControl(select);             select.activate();                    map.setCenter(new OpenLayers.LonLat(-106.639261,32.649908).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()),10);                  var obj = {"vo":sensorVO, "kmlLayer":kmllayer};             sensors.push(obj);         }              else         {                  for (var i = 0; i < sensors.length; i++)              {                 var vo = sensors[i].vo;                 if(vo.id == sensorVO.id)                 {                     map.removeLayer(vo.kmlLayer);                     sensors.splice(i, 1);                 }                  }              }          }          init();          setTimeout(function(){         var obj = {"id":1, "selected":true, "url":"kml-files/1858-Vegitation-Map.kml"};              showSensor(obj);     }, 1000);


title: How do I center Openlayers map over New Mexico

text: I'm trying to center open layers over NM and having a hard time to get it working. Here is my code. I'm trying to use decimal values and not the pixel values openlayers uses by default.               var init = function () {         // create map              map = new OpenLayers.Map({             div: "map",             theme: null,             projection:"EPSG:4326",             controls: [                 new OpenLayers.Control.Attribution(),                 new OpenLayers.Control.TouchNavigation({                     dragPanOptions: {                         enableKinetic: true                     }                 }),                 new OpenLayers.Control.Zoom()             ],             layers: [                 new OpenLayers.Layer.OSM()             ],             center: new OpenLayers.LonLat(105.9372, 35.6869),             zoom: 5         });          };


title: Legend labels for Vector layer symbols - how to name them (GeoEXT)

text: I'm coding with GeoExt and I have some problems trying to display the names of diferent features in a vector layer. This is my code:               mapPanel = new GeoExt.MapPanel({         map: map     });          legendPanel = new GeoExt.LegendPanel({         defaults: {                 labelCls: 'mylabel',                 style: 'padding:5px'                 },         bodyStyle: 'padding:5px; border:1px solid #8db2e3; border-top-width:0px;border-left-width:0px;border-right-width:0px',         width: 348,         autoScroll: true     });      In my legend I have 6 sublayers and all of them are titled with "Untitled" + 1,2,3,4,5, ... I would like to change the name of these different features, removing Untitled 1, 2, 3, ... Does anybody can help me to do that? I think it is easy but I don't know how. Thanks in advance! Rafael


title: How to modify two polygons which have common point and line at the one time

text: I would like to modify two polygon at the one time because these two data has same point and line. Is it possible?? In the present circumstance, I have to modify polygon one by one. First, I modify one polygon. After that,another polygon will be modified with snap function for overlapping to another polygon. Thank you so much in advance.


title: Postal areas for Germany? - Shape?

text: does anyone of you know how and where I can download postal area districts of Germany in shape files (download free of charge if possible). best regards desputin


title: Changing CRS crashes QGIS every time

text: When I open QGIS, and use the tools, setting -> project properties, QGIS will crash. When I also use the setting -> option -> CRS , Select new CRS also causes a crash. It looks like couldn't use the Coordinate Reference System Selector. Can I fix it by myself?


title: GDAL: Convert specific RGB (GeoTIFF) color to transparent

text: I have an RGB GeoTIFF file and I want to convert a specific RGB colour to transparent. I would like to use GDAL for doing this, but external Python scripts are also an option (though I haven't learned the art of Python scripting yet). My thoughts are:   1. Add a 4th band to my GeoTIFF file and fill with 255.    2. Insert 0 into the 4th band where RGB colour == _target colour_ The first part I think I can solve using               gdalwarp -dstalpha source.tif target.tif      The second though I don't know how to solve. **matt wilkie** suggest using a Python script he wrote, but I think that is done separately for _each band_ and not for a _specific colour_. **How can I assign a value to the 4th band of my TIFF when the RGB colour is equal to a specific RGB colour?**


title: ArcGIS problem accessing fields attribute table

text: I encounter a strange problem. I have a simple shape file to which I added some fields and then populated them. Now I wanna access those fields from a script to run some buffer operations. I wanna do this per line segment so I execute a `Select_analysis`. The tool runs without throwing an exception but not all fields are present in the newly generated shape file, namely only those from **before** I added the fields. For testing purposes I tried to access the fields also with a `SearchCursor`-method, which returns `none`. Strange enough when the shape is used within ArcGIS directly everything works fine (`Select_analysis`, calculating on the newly added fields,...). Any idea what is going on? Every hint is very much appreciated! EDIT: I'm using ArcGIS 9.3.1. on WindowsXP. I believe posting the script isn't of much help as the problem seems to be with the ESRI software. But I do it anyway, maybe someone does spot something strange.                # ---------------------------------------------------------------------------     # zonering_leggerV2.py     # docu still to come...     # ---------------------------------------------------------------------------          # Import system modules     import sys, string, os     from GeoSql import ArcSql     import GIS_tools as gt          # Create the Geoprocessor object     # Geoprocessor-object (ArcMap 9.1 and older)     try:         import win32com.client         gp = win32com.client.Dispatch('esriGeoprocessing.GpDispatch.1')          # Geoprocessor-object (ArcMap 9.2 and newer)     except:         import arcgisscripting         gp = arcgisscripting.create(9.3)               try:         # global gp stettings         gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")         gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")         gp.OverWriteOutput = 1         gp.CheckOutExtension("Spatial")         msg = gp.getMessage(2)         gp.addmessage(msg)          except:         msg = gp.getmessages()         print msg         gp.addmessage(msg)                    def buff(source, dest, field_name_zone, side, type_end):              # Process: Buffer (2)...         try:             gp.Buffer_analysis(source, dest, field_name_zone, side, type_end, "NONE", "")             msg = gp.getmessage(2)             print msg, '\n'         except:             msg = gp.getmessages()             print msg, '\n'                    def merge(zone_l, zone_r, out_data):         # Process: Merge...         merge_str = "%s;%s" % (zone_l, zone_r)         try:             gp.Merge_management(merge_str, out_data)             msg = gp.getmessage(s)             print msg, '\n'         except:             msg = gp.getmessages()             print msg, '\n'                    #------------------------------------------------------------------------------------------------------------     # --> programme parameters          type_end = 'FLAT'     field_name_zone = {'KR': 'KERN_R',                       'KL':'KERN_L',                       'BR':'BINNEN_R',                       'BL': 'BINNEN_L',                       'f_name_zone_new': 'code_zone',                       'KERN': "_KZ",                       'B_BINNENKANT': "_BBI",                       'B_BUITENKANT': "_BBU"}          #------------------------------------------------------------------------------------------------------------     #--> file declarations and data gathering          dir_base = "D:\\opdrachten\\legger\\dijkvakken\\"         dir_gp_tmp = dir_base + "gp_tmp\\"          vakken_shp = "%sbijlmerring_042012.shp" % dir_base          column = "PKM_NAME"     #vakken = gt.get_data_from_table(vakken_shp, fields = [column])     vakken = ["A2035-001"]     invalid =('-')          for vak_name in vakken:         if invalid in vak_name:             vak_name_mutat = vak_name.replace(invalid, '_')                   selected_vak = "%s%s.shp" % (dir_gp_tmp, vak_name_mutat)              # Local variables...         buffer_KL = "%s%s_%s.shp" % (dir_gp_tmp, vak_name_mutat, field_name_zone['KL'])         buffer_KR = "%s%s_%s.shp" % (dir_gp_tmp, vak_name_mutat, field_name_zone['KR'])         buffer_BR = "%s%s_%s.shp" % (dir_gp_tmp, vak_name_mutat, field_name_zone['BR'])         buffer_BL = "%s%s_%s.shp" % (dir_gp_tmp, vak_name_mutat, field_name_zone['BL'])         #buffer_shapes = [buffer_KL, buffer_KR, buffer_BR, buffer_KL]                   dat_zones ={'kern_l': (buffer_KL, field_name_zone['KL'], "LEFT"),                    'kern_r': (buffer_KR, field_name_zone['KR'], "RIGHT"),                    'binnen_l': (buffer_BL, field_name_zone['BL'], "LEFT"),                    'binnen_r': (buffer_BR, field_name_zone['BR'], "RIGHT")}              merge_kern = "%s%s_mergeKern.shp" % (dir_gp_tmp, vak_name_mutat)         merge_binnen = "%s%s_mergeBinnen.shp" % (dir_gp_tmp, vak_name_mutat)              dissolve_kern = "%s%s_dissolveKern.shp" % (dir_gp_tmp, vak_name_mutat)              erase_out = "%s%s_erase.shp" % (dir_gp_tmp, vak_name_mutat)              result_tmp = "%s%s_zones.shp" % (dir_gp_tmp, vak_name_mutat)              sql = ArcSql(column, [vak_name]).statement()         print sql              # Process: Select...         try:             gp.Select_analysis(vakken_shp, selected_vak, sql)             msg =gp.getmessage(2)             print msg, '\n'         except:             msg =gp.getmessages()             print msg                        for i in dat_zones.itervalues():             buff(selected_vak, i[0], i[1], i[2], type_end)              merge(dat_zones['kern_l'][0], dat_zones['kern_r'][0], merge_kern)              try:             gp.Dissolve_management (merge_kern, dissolve_kern, column)             msg =gp.getmessage(2)             print msg, '\n'         except:             msg = gp.getmessages()             print msg, '\n'              gt.add_field(dissolve_kern, field_name_zone['f_name_zone_new'], 'TEXT', length_txt='10')         gt.update_fields(dissolve_kern, sql, [field_name_zone['f_name_zone_new']], [field_name_zone['KERN']])              for f in [dat_zones['binnen_l'][0], dat_zones['binnen_r'][0]]:             gt.add_field(f, field_name_zone['f_name_zone_new'], 'TEXT', length_txt='10')             if '_L' in f:                  gt.update_fields(f, sql, [field_name_zone['f_name_zone_new']], [field_name_zone['B_BINNENKANT']])             elif '_R' in f:                 gt.update_fields(f, sql, [field_name_zone['f_name_zone_new']], [field_name_zone['B_BUITENKANT']])             else:                 'error at update field binnenzone...!\n'                 sys.exit()                   merge(dat_zones['binnen_l'][0], dat_zones['binnen_r'][0], merge_binnen)               try:             gp.erase(merge_binnen, dissolve_kern, erase_out)             msg = gp.getmessage(2)             print msg, '\n'         except:             msg = gp.getmessages()             print msg, '\n'              merge(erase_out, dissolve_kern, result_tmp)


title: How to find the two furthest points between a group of points?

text: I have a table with 20000 records and with those columns Shop, longitude, latitude, geom I would like to find a way to find the pair of ths farthest shops between a selection of shops For example we have outletnames : A,B,C,D,E,F,G,H,I,J,K,L,M,N,O... I would like to know what is the bigest distance between all those shops A B C D and E A-B = 4 km A-C- = 2 km A-D = 1 km A-E = 1,3 km B-C = 20 km C-D = 50 km .... I would like to have an optimised query that would give me as a result 50 km Thank you


title: Is it possible to make a routable graph from Polygons?

text: I would like to know if it is possible to make a graph with pgrouting 1.05 on polygons. What I mean is that I have to make a graph on a database without roads but with polygon geometry. I would like to make a graph on this geometry. Thanks for your help and I'm sorry for my english


title: QGIS raster clip error: Cutline not of polygon type

text: I have a raster file and want to clip it, but I'm getting this error: "ERROR: Cutline not of polygon type" what does this error mean and how can I resolve it?


title: How do I edit joined parcels to eliminate gaps in a parcel fabric?

text: I have a parcel fabric layer that has a gap in it: ![enter image description here](http://i.stack.imgur.com/KluAC.jpg) I want to edit the selected parcel on the bottom to fill the gap. I don't want to construct a new parcel to do so. How do I modify the parcel in such a way that it maintains its attributes and fills in the gap with the parcel above it? * * * **EDIT:** Based on answers and comments, I created a topology and placed the parcel fabric inside it. It appears that you cannot use topological tools to edit a parcel fabric. As such, any answers using topology will not work.


Is it possible to create Thiessen polygons around nodes in QGIS? e.g. http://en.wikipedia.org/wiki/Voronoi_diagram


title: change default font of labels in QGIS

text: I've just opened a feature request, but maybe someone knows a temporary solution. In QGIS 2.2 one can change the default font of the Print Composer (through the Menu Option -> Setttings). But I think it is not possible to do the same with labels. This is a little bit boring when one has to export a project from a Linux to a Windows machine. In Linux (debian in my case) the default font in Cantarell, font that is not recognized by Windows. This cause a boring error message. No big deal, just annoying. Thanks


title: Get a list of property elements using GeoServer

text: I'm using GeoServer with openlayers and I want to build a filter check-box dynamically, depending on the elements of this column: ![Column](http://i.stack.imgur.com/Isl8G.png) How can I query GeoServer so that I get a list of the different elements in this column? Or at least all the information of all the columns in XML so that I can parse it?


title: QGis export part of map (box with coordinates) as raster

text: I would like to export a map of Switzerland (as part of googlemaps) to use as a background for a graph, but I need to know exactly where each corner of the map corresponds to (wrt spatial coordinates). Is there a plugin to do this in QGIS? Ideally I would like to be able to manually select a bounding box (while using the OpenLayers underneath) and get a picture exported together with the bounding box coordinates. Thanks


title: GWR Model with Zero Intercept

text: In GWR of ArcGIS, if we get negative intercepts that give negative predicted values of dependent variable that are undesirable. Then , is there any possibility to make intercept zero?


title: style creation in QGIS

text: ![style model dash double dot dash](http://i.stack.imgur.com/jAZtS.jpg) I want to create a line style in QGIS (model is attached here with), Any body can help me?, please help me.


title: Are there more events in OpenLayers 3, besides "moveend"?

text: I am building an API on top of OpenLayers 3. I can't display here the whole code for professional reasons. This is a bit how my classes look like.               // external file xgis.js          xgis = {};               // xgis.map     xgis.map = function(options) {         // map definitions ...     };     // Inherits from ol.Map     goog.inherits(xgis.map, ol.Map);      The goal is to build an SDK, which I named here "xgis". We want to implement some callbacks. For example, when I perform a zoomIn, I have a callback named onZoomIn that executes some code. I know that it is done with the event "moveend", like in this fiddle. Now, I want to implement some callback functions:   * onZoomIn --> fires after a zoom in   * onZoomOut --> fires after a zoom out   * onMapReady --> fires when the map is ready (has loaded all the layers)   * onPanEnd --> fires when the drag/pan has ended Are there other events in OpenLayers 3, like "zoomend" or something? Thanks


title: ArcGIS Server Error: "Feature service requires a registered database"

text: I'm attempting to publish a **feature service** to ArcGIS server. I'm running SQL Server Express and ArcSDE. When I try to publish the service I get the error "00090: Feature service requires a registered database". ![enter image description here](http://i.stack.imgur.com/pJaOt.png) When I validate the database registration it appears to succeed, but I still can't publish the service. The features I am publishing are located inside of the geodatabase that I am registering. This geodatabase is located on the same server that ArcGIS Server resides, but I am attempting to publish from another machine. Am I missing some crucial step? Here is a bigger version of the screenshot.


title: Problem with QGIS 2.0 installation from OSGeo4W set up

text: I'm trying to install QGIS 2.0 on Windows XP but when the download begins, suddenly OSGeo4W show me this message:                Unable to extract/2       #define FT_SUBLYPH_FLAG_ROUND_XY_TO_GRID       #define FT_SUBGLYPH_FLAG_SCALE      -- the file is already in use.       Please stop all OSGeo4W processes and select "Retry", or select "Continue" to go on anyway       (You will need to reboot)      Nothing happens neither if I choose retry nor if I choose continue, and I must to shut down the installation Hint? :-)


title: Join attributes by date in Qgis

text: I learned (thanks!) to use the join feature built into the layer properties, but in my case it doesn't work because data do not match perfectly. Infact shape refers to geotagged photos, csv is a log file which contains orientation data (azimuth); I would like to join them by date field (day, hours, seconds): I would need to join the "nearest" data, non spatially but temporally!


title: Shape length distance wrong in Robinson projection

text: I have a world map in the WGS 1984 Geographical Coordinate System. I want to measure the lengths of borders between countries in kilometers. To get the units in meters, I have first used the Define Projection tool and then the Project tool to change to the Robinson Projected Coordinate System. After that, I am using the Intersection tool and setting the output type to "line" to get a Shape_length column where I will have all the borders and their lengths. But, the value in the Shape_length column appears to be wrong as it measures the borders to be only a few meters. The Measure tool does the same thing. I can't get my head around what I am doing wrong. I've attached a print screen of the data frame. What could the problem be? ![enter image description here](http://i.stack.imgur.com/8G6c8.jpg)


title: Merge/mosaic categorical rasters in QGIS/GDAL

text: I am attempting to make yearly bins of some monthly MODIS data for all of the US. The cells of the raster are defined with Julian dates indicating the date at which a burn event took place. After merging the data using the gdal script listed below, I have full coverage of the US but I suspect that some of the data was lost. Being new to QGIS and GDAL, I haven't been able to figure this one out yet, but in ArcGIS there was an option when mosaiking to keep the (max, min, mean, blend, etc) value of overlapping cells. With this data, a max (date) should be the appropriate answer as long as it falls within the julian range (1-366). After figuring out how to get raster cell counts in QGIS, it looks like just the last couple of months are represented in the data and the cells with low Julian dates have been washed out or lost. (scroll over on code)               for YR in $YEAR; do     gdal_merge.py -o MCD45yr_${YR}_burndate_2.img -of 'HFA' -a_nodata '-32768' -n '900' -n '9998' -n '9999' -n '10000'  MCD45monthly.A${YR}???.Win03.051.burndate.tif;      -32,768 is the NoData value, and the other values listed with `-n` are data anomalies. Any suggestions for this issue? I would expect the majority of the Julian dates to have at least a couple of cells with data in that range.


title: Why are Data Projections relevant?

text: Sorry for my ignorance - especially after being in this area for a long time. Why is it useful to store data in unusual projections and datums? I understand the value of projections as **output** constructs, because of distortion, etc: that much is justifiable. However, I don't understand why, for instance, states use state plane projections in data. We have decimal accuracy: why not just store precise values in EPSG:4326? Is this entirely a remnant of pre-auto-reprojection days, or is there a value proposition I'm missing? edit: I'll restrict the scope of this question to **vector data only** to make it more concrete. Thanks whuber for the tip.


title: Shapefile attributes to Autocad Annotation

text: How can I export the attribute information for the shapefile/feature class to Autocad Annotation/Text. I'm able to export the shapefile to autocad but unable to get the attributes in annotation. Need you help its really urgent. Also Let me know if there any any way we can append attributes in autocad without using blocks. Thanks and have a great day. regards, Ramakrishna Billakanti


title: Tilecache + Mapnik + Apache generates incomplete tiles (missing layers)

text: I have TileCache + Mapnik working with a custom osm.xml stylesheet. When I run tilecache_http_server.py the tiles are served OK. But when I run TileCache under Apache (with mod_wsgi) I see incomplete tiles (with missing layers). What can go wrong? Furthermore, generating tiles is very slow. Can this have something to do with the missing layers? Thanks.


title: ArcMap crashes on TabbedFeatureInspector sample

text: The TabbedFeatureInspector, (VB.NET), sample crashes ArcMap when I do the following:   1. Open ArcMap.   2. Open map document with feature class with class extension loaded.   3. Select a feature.   4. Start an edit session.   5. Click the Attributes button to open the Attribute editor.   6. Click the Create Features tab. At this point the Create Features tab displays as a blank tab and ArcMap locks up. The wierd thing is that this only happens with the initial selection of a feature and opening of the Attribute editor. If you open the attribute editor, and then select a different feature before selecting the Create Feature tab ArcMap doesn't crash. I initially found this by building a tabbed inspector into an application using the sample as the template. After discovering the problem I tried it in the TabbedFeatureInspector sample and found the same result. The offending code appears to the be SetParent line in Inspect event where the inspector parent window is set to the groupbox on the user control.               Public Sub Inspect(ByVal objects As ESRI.ArcGIS.Editor.IEnumRow, ByVal Editor As ESRI.ArcGIS.Editor.IEditor) Implements ESRI.ArcGIS.Editor.IObjectInspector.Inspect              SetParent(Me.m_inspector.HWND, Me.GroupBox1.Handle.ToInt32)         ShowWindow(Me.m_inspector.HWND, SW_SHOW)      Any suggestions on how I can correct this?


title: Is it possible to reveal the relief parameters “slope inclination” and “slope exposure” by dint of ASTER GDEM?

text: I’m trying to find information in technical and scientific articles – is it possible to reveal the relief parameters “slope inclination” and “slope exposure” by dint of ASTER GDEM? Or we can define from it the only parameter of relief – the height above sea level? I can’t find any articles that confirm this possibility, nor reject it. If it’s possible, could you tell me the way to do it or the direction from which I can start searching for this information?


title: How to express not within/inside predicate in spatial database with good performance

text: In our application we want to express some spatial predicates as objects not within some areas, but unfortunately it has very bad performance. The following SQL is generated by our application:               SELECT *     FROM geom_table     WHERE NOT (SDO_INSIDE(geom_column, SDO_GEOMETRY(...), srid) = 'True'     AND geom_column IS NOT NULL); I've been searching on internet for a while but surprisingly fail to find any information talking about it. I think it's not a non-reality use case, or is it? I wonder if there is a better way to express the SQL statement?


title: QGIS labels are different on canvas, composer and from PDF

text: I am running QGIS v2.2 off a 64 bit Windows server. I have created a map with a number of local government area polygons, road polygons (to which I have applied a Layer Source to limit the labelling to major roads), and some town point objects. The polygons and points labels are OK, however, the road labels appear differently on the Composer and different again when I export to PDF or as an image. Some labels are missing or repeated. Is there something wrong with my labelling? I am using Arial 4.25 with a 0.5mm buffer, curved and centred on the line, inside/outside angle for curved characters is 29, High priority, showing all labels, merging connected lines to avoid duplicates. Even if there is a problem with my labels, I don't understand why they would appear differently between the three views of the same map.


title: Using GeoBrain WCS4DEM in QGIS?

text: I added the GeoBrain WCS server to the server list:   http://geobrain.laits.gmu.edu/cgi-bin/gbwcs-dem?version=1.0.0& I connect to the server and get a list of layers. I select the first one listed - SRTM 30MUSA and select ADD. My map window is displaying a region in NM, the project CRS is EPSG:4326. The response is ![as here](http://i.stack.imgur.com/xXMGi.png) Note that the bbox is nonsense. Any idea what I'm doing wrong? Edit: This question is closely related, asking how to use a clip region to set the bbox in a WCS request, and the example is also GeoBrain.


title: Using ST_MakeEnvelope over the dateline

text: I'm using ST_MakeEnvelope in PostGIS to try and make geometries that cross the international dateline, but they are making a shape that wraps the other way around the globe. The geometry I want is one which covers the eastern half of Australia and the dateline. It looks something like:               ST_MakeEnvelope(133, -49, -170, 0, 4283)      But:               ST_Intersects(ST_SetSRID(ST_MakePoint(150, -25), 4283), ST_MakeEnvelope(133, -49, -170, 0, 4283));      returns false. The shape goes the wrong way around the world! If I just take:               ST_Intersects(ST_SetSRID(ST_MakePoint(150, -25), 4283), ST_MakeEnvelope(133, -49, 180,v0, 4283));      I get true, as expected. How can I set a direction to my envelope? Or should I create a polygon some other way? (If you're wondering: I'm trying to select geometries in a table for a map view, and when the view includes the dateline, nothing is shown on the map) [ETA] If it helps, the box actually arrives in Spherical Mercator, looking something like:               14855319.859171, -6294627.0589708, 21149946.918142, 0      But calling ST_Transform:               st_transform(st_makeenvelope(14855319.859171, -6294627.0589708, 21149946.918142, 0, 900913), 4283)      Results in geometries with the negative-valued longitudes:               SRID=4283;POLYGON((133.447608799776 -49.1163523261112,133.447608799776 0,-170.006794251165 0,-170.006794251165 -49.1163523261112,133.447608799776 -49.1163523261112))


title: How to convert x y coordinates to longitude latitude using QuantumGIS?

text: I'm working with this downloadable shapefile that has X Y coordinates. They are akin to `'3672187.92698000, 534175.72095400'`. I would like to convert them to longitude latitude so they are more like `'-90.097017, 29.963176'`. I've seen this question tackled using ArcMap however I don't have that software. I was able to download and install Quantum GIS but I am unfortunately perplexed by its complicated interface. Would like to do the conversion with it, if possible.


title: Mapserver dynamically line

text: I'm a beginner for GIS especially for Web GIS that's implementation to mapsever. I created a project that I've uploaded at dedyfuadi.web.id . For the map features, I made by QGIS 2.0 and for framework I choose pmapper for displaying map dynamically. But, I have some problem for create line between 2 points directly by syntax (I wont manually adding the lines from QGIS). What should I do?


Is there any instructions to download OSM in postgres database? I use geosuite (geoserver, postgres, postgis). I'd like to download USA and Russia (1-12 levels). I also want to download sld styles. (Is there any standard way). So, there is intranet. We use geosuite. And I'd like to download OSM with sld styles.


title: How do I add feature from WMS to a different layer in OpenLayers?

text: I have a WMS layer I serve from SQL View. When I GetFeatureInfo I receive JSON presentation of the feature.               {"type":"FeatureCollection","features":[{"type":"Feature","id":"Trips.fid--3a106d6c_13f7fcd4d00_-7dab","geometry":{"type":"MultiLineString","coordinates":[[[34.78731593803529,31.31823531417712],[34.78843141500525,31.336622682320776],[34.79414493381831,31.355201806839506],[34.794207563998924,31.371163684259038],[34.79296734448457,31.375581921229493],[34.78922614608776,31.390623411898762],[34.78827495215694,31.408575008023988],[34.78636890354401,31.42299930464733],[34.78632872060815,31.42193697540446],[34.78629782738711,31.422105913663092],[34.78628031267043,31.421992838029546],[34.786190597348,31.42158272671166],[34.78616186179376,31.421905927160644],[34.784898002487694,31.424062281290652],[34.773401914392345,31.434990008872095],[34.76559077292494,31.446642271859293],[34.77342394487551,31.466799593779264],[34.77975547041099,31.490976936335215],[34.78263023215561,31.506823501958817],[34.792679583505226,31.531054387260554],[34.80048435469499,31.55136414506193],[34.80654617304027,31.574946250797954],[34.813199698392914,31.59725795152748],[34.81470088275501,31.619577056013927],[34.809541545607935,31.657018778594132],[34.80638283046715,31.674769044083895],[34.81569739824674,31.69878758883678],[34.82117079659263,31.721351512377144],[34.822676820645704,31.74065914102294],[34.82640625397537,31.760366608188313],[34.83277797643619,31.795874550345438],[34.84013377052116,31.80349376296454],[34.85764369385628,31.809682398342275],[34.87655834935133,31.809001817509152],[34.89977578898199,31.81087415167135],[34.91555026001387,31.814641705371283],[34.92078885084598,31.819327945165384],[34.94872743329605,31.826006370096646],[34.96865364149424,31.831077555261356],[34.977436258261335,31.8348796713872],[34.988078880595516,31.834460104995458],[34.99298330536876,31.826840136006965],[35.00026754690508,31.826135241324245],[35.005568854286416,31.82592323790467],[35.01774054730234,31.8215162498958],[35.02155196628523,31.818288829834177],[35.02691352351924,31.813341112120234],[35.03143746024918,31.80979583988096],[35.03815953441021,31.80619724694477],[35.045420139243944,31.80474599411263],[35.05317138181679,31.804966181835955],[35.06486714082564,31.804141661709476],[35.07584180677903,31.800281337346696],[35.08838316507283,31.800341312456926],[35.10640165800501,31.801455597207628],[35.12610124373968,31.800681742893538],[35.14697634526269,31.79722164231699],[35.16219627795028,31.79329681701213],[35.171594439546396,31.797658570113885],[35.187671634314036,31.797928602082614],[35.188362774999014,31.79653341639412],[35.1887256549307,31.7961346714363],[35.19047234637513,31.794962708212374],[35.19256271051755,31.79461237466848],[35.19270785200568,31.79363734891888],[35.193583458825614,31.79312975679172],[35.194747974527196,31.793406487587923],[35.196095096006964,31.79164621288934],[35.196955729849186,31.790773244292048],[35.1978874456438,31.790160915552967],[35.198711620213004,31.78987941300083],[35.19929508848269,31.787229378909604],[35.19850752277577,31.785375424789216],[35.19941639636708,31.784687679081976],[35.199241688426945,31.78231397727036],[35.198391385845284,31.781402127099458],[35.201245278823734,31.77605635342819]]]},"geometry_name":"geom","properties":{"Id":1,"StartDateTime":"2013-06-23T01:49:57Z","EndDateTime":"2013-06-23T03:23:32Z","Length":94.57}},{"type":"Feature","id":"Trips.fid--3a106d6c_13f7fcd4d00_-7daa","geometry":{"type":"MultiLineString","coordinates":[[[35.20076873304309,31.77473722793188],[35.204546738625524,31.774719539653546],[35.208965075961345,31.77618510615382],[35.208640148891355,31.78202931583896],[35.20975512430616,31.78246578222451],[35.21137792550667,31.781691930524566],[35.213549710915274,31.780813498217512],[35.21476900302076,31.78168291327713],[35.21469230369844,31.780946053301573],[35.21257227234834,31.781205360240914],[35.20864390470302,31.783054725633296],[35.20829895121278,31.78302020473956],[35.203248270523765,31.78222448311647],[35.19854766107952,31.786334626536405],[35.19984531073088,31.78751601702663],[35.20014413481394,31.788041155898213],[35.19725069211512,31.790485693913038],[35.19110776321938,31.795067815242238],[35.18161040176461,31.801656830805612],[35.1687011405429,31.79567693197168],[35.159244819963,31.795794581845737],[35.11942475024883,31.798775201079778],[35.08039358590231,31.800856179659302],[35.063209196166355,31.805088407881986],[35.04805678839844,31.804031639631894],[35.032927570632985,31.80847877245744],[35.02092427914747,31.81877639146],[34.99012978758847,31.829259174717787],[34.98804795187599,31.839040689444193],[34.977978798901404,31.835101996624207],[34.9498888706375,31.82596783070529],[34.92736197558343,31.823111392882268],[34.91695636557349,31.815625240675068],[34.903688415937665,31.811906632219383],[34.88296941318597,31.810547012219338],[34.86002652341891,31.81005225691859],[34.8400240232646,31.803567891209664],[34.83015973660191,31.79428193887949],[34.832461959577664,31.781116935605244],[34.82711462326763,31.762582638502867],[34.82278272110514,31.743736272787874],[34.82054030348634,31.720919484741522],[34.81420911419586,31.695453086060326],[34.80627534157327,31.675224452093136],[34.81001464412418,31.653220249705704],[34.814807584458386,31.623882775804965],[34.81329122844819,31.60270186644005],[34.8080051217612,31.582810947810554],[34.80303812730152,31.560726326313713],[34.797198877391246,31.54151166321618],[34.786754234512,31.52322945275979],[34.78295267962934,31.504485052320216],[34.77614342612191,31.48399237576942],[34.77342018413583,31.467251749582854],[34.76645583238203,31.450437751509558],[34.76590528960303,31.442231443933725],[34.78525964273001,31.422175881020067],[34.78907352850801,31.401593669076053],[34.79129725926219,31.38162192285955],[34.795717357038875,31.365271563573277],[34.792079987685526,31.350441990935515],[34.786453724639145,31.329829087974357],[34.78839683025119,31.309436171497104],[34.79081076415792,31.289914211434404],[34.7976451665849,31.28794303366183],[34.80366544178834,31.286754464613146]]]},"geometry_name":"geom","properties":{"Id":2,"StartDateTime":"2013-06-23T04:46:14Z","EndDateTime":"2013-06-23T06:03:47Z","Length":102.14}}],"crs":{"type":"EPSG","properties":{"code":"4326"}}}      How can I add this item in OpenLayers to new vector layer (to simulate SELECTED style)?


title: Full extent of a map

text: Is there a way to get the full extent of a map? I am looking to use this extent to zoom out to whole world view on a button click.


title: How to write a custom map canvas item by subclassing QObject and QgsMapCanvasItem?

text: I'm writing a QGIS python plugin where I place some QgsVertexMarkers on the canvas like this:               marker = QgsVertexMarker(self.canvas)     marker.setCenter(QgsPoint(point[0],point[1]))      Now i would like being able to drag and drop them. I tried implementing a class that inherits QObject and QgsMapCanvasItem so I can use mouse events.               class myVertexMarker(QObject,QgsMapCanvasItem):         def __init__(self, canvas):             QObject.__init__(self)             QgsMapCanvasItem.__init__(self,canvas)             ...              def setCenter(self,point):             self.center = point             pt = QPointF(self.toCanvasCoordinates(self.center))             self.setPos(pt)              def some setters, mouse events, paint and so on...      Now when I create an object of that class and call setCenter I get this error message:               pt = QPointF(self.toCanvasCoordinates(self.center)) #TypeError: could not convert     'myVertexMarker' to 'QgsMapCanvasItem'      What am I doing wrong?


title: Join of two attribute tables with different amounts of rows

text: I have a hard time sorting the following out: I have two different Shapefiles. The attributetable of one, lets call it `shapefile A` looks the following:               SHAPEFILE A ATTRIBUTETABLE     Name    Type    area     A       BO      10     A       FE      15     A       FW      120     B       NM      2     B       BO      20      The attributetable of the other, lets call it `shapefile B` looks like this.               SHAPEFILE A ATTRIBUTETABLE     Name    Type    area     A       BO      12     A       FE      10     B       NM      2      Of course, both of them are longer but I hope you are getting the point here. The columns are the same, but each column has a different amount of rows. What needs to be done now is a calculation. I have to divide the `area` of `shapefile A` by the `area` of `shapefile B`. All of this needs to be done in the modelbuilder! For proper calculation and comparison the attributetables need to be joined. Furthermore it would be nice (if possible) that the joined table looks like this               JOINED TABLE     Name    Type    area shapefile A    area shapefile B     A       BO      10                  12     A       FE      15                  10     A       FW      120                 0     B       NM      2                   2     B       BO      20                  0      For clarification a screenshot of my two shapefiles. The green layer is `shapefile B`. The different sections are the `A, B, C`. They occur in `shapefile A` as well, but as you can see, they are bigger and more. What both shapefiles have in common is the `Name`, but depending on the amount of `Type` in the shapefiles, the "Number" of `Name` varies as well, while the `Name` stays the same. So in each shapefile I have `Name` `A` and `B`, but just different amounts of them. ![Screen](http://s28.postimg.org/chyn5ii94d/Untitled.png) How can I join the tables and calculate area A/Area B in ModelBuilder?


title: KML and Spot and Swipe widget in flexviewer 2.2

text: 1. I found the KML widget for Flex viewer but I was not able to make it work properly. Can anybody have any link for that.   2. I came across SPOT and SWIPE tool code, but the links to download the code redirected to something else. I thing the links are dead. So any body have that code or widget for SPOT and SWIPE tool. Thanks in advance


title: ArcMap 10 - Viewshed Analysis - Input Type

text: Hopefully someone can tell me if I am missing something here. I am hoping to built a TIN in ArcScene and run some view shed analysis on it, simple enough but I need to add building heights to the TIN, this was done through an ArcGIS Script. The problem is I can't seem to get the TIN as the input surface using ArcMap 10 viewshed anlysis in the 3D or Spatial Analyst. Has ESRI removed this parameter completely from version 10? Thanks Craig


title: In ArcGIS 10 WMS service, how can I apply a filter to features drawn?

text: All, I have an ArcGIS 10 Server with various map services running both the REST API and WMS servers. In the REST API I can call the layerDefs argument to filter features used by one of their properties (e.g. area > 50000). How do I do this with a WMS call?


title: Batch convert ArcGIS 9x files to 10

text: I would like to convert all mxd's in a directory and it's subdirectories to ArcGIS 10 mxd's. This is so that I can then run python to automate some updates within them. Is this possible? This is my second post and I was also wondering if I should post sample code? === UPDATE -- Here's the code (for more usefully) converting 10 files to 9.3               #Downgrades all ver 10 mxds in directory and subdirectories to version 9.3     #and saves them with _93 extension.               import arcpy, glob, os          path = os.getcwd()     for pathname, directories, filenames in os.walk(path):         for filename in filenames:             if filename.lower().endswith(".mxd"):                 mxd = arcpy.mapping.MapDocument(os.path.join(pathname, filename))                 filename, ext = os.path.splitext(os.path.join(pathname, filename))                 if mxd.dateSaved:                         print mxd.dateSaved                         mxd.saveACopy(filename + "_93" + ext, "9.3")                         currentMxd = filename + "_93" + ext                         mapDoc=arcpy.mapping.MapDocument(currentMxd)                         print "Updated: " + filename                 else:                         print filename + "is not version 10 therefore not altered"


title: How to rename PostgreSQL/PostGIS columns while importing Shapefiles?

text: I discovered `shp2psql` to successfully import geospatial data from ESRI Shapefiles into PostgreSQL/PostGIS.   Now I would like to automatically **rename the target column names**. Is there any mechanism where I can define the original column names and their corresponding target column names in something such as a look-up table? Or would you do the renaming within the database using triggers or rules? Or do you recommend another import tool?


title: how is the command of ogr2ogr for converting the adf to shp?

text: What is the correct format of ogr2ogr for converting the ADF grid to SHP file? I tried this, but it fails.               $ ogr2ogr -where "OGR_GEOMETRY='Point'" -f "ESRI Shapefile" SHP.shp ADF.adf


title: how to convert latitude, longitude projection from epsg:3857 to epsg:4326

text: I want to use geocode in our application. so that, I got Google geocoding API and could achieve with Google Maps. Problem is that I wanted to achieve the same with my own map which is having projection EPSG:4326 INSTEAD OF getting geocoded from Google Map which is having projection EPSG:3857. or I am getting a coordinates from Google geocoding projection EPSG:3857 and that coordinates I want to mark on my OpenLayers Map which is having projection EPSG:4326 please help me.


title: Add value in attribute field using arcpy

text: I need to add value in a field in attribute table, the value is to be determined on the basis of value in another field in same attribute table but i am unable to deifne value in another field in the script, can anyone help me with it?


title: How to match GPS collected data to routes on Google Maps?

text: I am using Google Maps to implement a GPS Monitoring system of data collected from vehicles. My problem occurs when the points and lines do not match with the route and cut through other streets and structures such as shown in the example below. **How can I solve this problem?** ![screenshot](http://www.gps.ro/problem.png)


title: Are there qgis equivalent to Cogo tools of ArcView 3.2

text: We are transistioning to Qgis, i have GIS users that currently use ArcView 3.2 (yes there are still people using this) they find the cogo tools very useful and I was wondering if there is an equivalent tool in QGIS 1.8?


title: Is there a way to show roads connected but keep them on separate layers (with separate markings, line styles etc.)?

text: In QGIS 2.0.1 Dufour, is there a way to connect different layer roads? Say i have 2 kinds of roads on 2 layers. One is main roads, the other is smaller ones. At the moment they go over each other depending on which of the layers is over another. Is there a way to somehow connect them but keep them on separate layers (with separate markings, line styles etc.)?


title: ArcGIS importing from file geodatabase A to B without stopping service

text: I have file geodatabase B which is use by arcgis server as a data store and on a schedule interval I need to import new data from file geodatabase A. geodatabase need to be wiped and accept the data from geodatabase A. May i know if there is a arcgis tool for this? This process must not stop the arcgis server/services


title: How do I convert shapefiles and display them on top of Google Maps?

text: I generated a set of maps of my region. Each municipality has some associated data. I would like to overlay that data on a google map and display them in a website. (I don't like the flash format) Do you know any online services for the conversion of *.shp files into a format suitable with Gmap services?


title: How to source the boundaries(latitude/longitude) information for US states, cities, Zip level

text: I am trying to color code the states, cities, zips differently based on certain parameters. As the user zooms in they should be able to see the different colors dynamically painted on the maps. Was able to get this at state level as the boundaries required are available. However, struck at a point to get the boundaries for each city and zips of states. (http://www.usnaviguide.com/) How to get these details? I have the enterprise licence of Google Maps as well. Do I need to procure any other license to get these boundaries so that I can paint them. I had also gone through geo-coding service but I do not see any methods supporting to output the boundaries of area. Thanks in Advance


title: What is the bounding box of filtered features?

text: I'm using geoserver to store a number of gps tracks that are recorded during test drives with a number of vehicles. I have a layer defined that contains the following columns in the database:   * date   * point <-- postgis geometry   * vehicleID   * sensorID That means that all tracks are recorded in the same layer. In geoserver, there is a feature to calculate the bounding box of the entire table. I'm looking for a way to calculate the bounding box for all tracks that fit a number of filters, say vehicleID and sensorID. I would like to use this information to center the map over the middle of the selected points and to zoom in as close as possible (with all points still being visible). The filtering is so far done using OpenLayers.Filter on a OpenLayers.Layer.WMS. I'm looking for any way to achieve this behavior using geoserver.


title: SAGA export table and/or diagram

text: SAGA GIS How can one export (and save) a table and its diagram in SAGA? Shape result of module 'grid statistics for polygons'


title: Order of displaying labels within a layer

text: How do I choose the order which labels are drawn, within a layer? I am using label classes but I don't want my points drawn in the order of the label class. My points are numbered and I want to ensure that the lowest numbered ones always sit above higher numbered ones.


title: How to show Two Labels of One feature In Geoserver....?

text: I have prepared a Web GIS Map using Geoserver-Openlayers_Postgis....For One Feature I need to show two labels such as "premise_no' & "bld_name'... The following is the xml I used for styling(in geoserver).... But it is showing either/or labels... xml for layer styling(in geoserver)....               <?xml version="1.0" encoding="UTF-8"?>     <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">         <sld:UserLayer>             <sld:LayerFeatureConstraints>                 <sld:FeatureTypeConstraint/>             </sld:LayerFeatureConstraints>             <sld:UserStyle>                 <sld:Name>v_building_ar</sld:Name>                 <sld:Title/>                 <sld:FeatureTypeStyle>                     <sld:Name>group 0</sld:Name>                     <sld:FeatureTypeName>Feature</sld:FeatureTypeName>                     <sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>                     <sld:SemanticTypeIdentifier>simple</sld:SemanticTypeIdentifier>                     <sld:Rule>                         <sld:Name>1</sld:Name>                         <sld:MinScaleDenominator>1.0</sld:MinScaleDenominator>                         <sld:MaxScaleDenominator>2000.0</sld:MaxScaleDenominator>                         <sld:PolygonSymbolizer>                             <sld:Stroke>                                 <sld:CssParameter name="stroke">#FF8000</sld:CssParameter>                                 <sld:CssParameter name="stroke-linecap">round</sld:CssParameter>                                 <sld:CssParameter name="stroke-width">0.05</sld:CssParameter>                             </sld:Stroke>                         </sld:PolygonSymbolizer>                         <sld:TextSymbolizer>                             <sld:Label>                                 <ogc:PropertyName>prem_no</ogc:PropertyName>                             </sld:Label>                             <sld:Font>                                 <sld:CssParameter name="font-family">Arial</sld:CssParameter>                                 <sld:CssParameter name="font-size">8.0</sld:CssParameter>                                 <sld:CssParameter name="font-style">normal</sld:CssParameter>                                 <sld:CssParameter name="font-weight">normal</sld:CssParameter>                             </sld:Font>                             <sld:LabelPlacement>                                 <sld:PointPlacement>                                     <sld:AnchorPoint>                                         <sld:AnchorPointX>0.0</sld:AnchorPointX>                                         <sld:AnchorPointY>0.0</sld:AnchorPointY>                                     </sld:AnchorPoint>                                     <sld:Displacement>                                         <sld:DisplacementX>0.0</sld:DisplacementX>                                         <sld:DisplacementY>0.0</sld:DisplacementY>                                     </sld:Displacement>                                 </sld:PointPlacement>                             </sld:LabelPlacement>                             <sld:Fill>                                 <sld:CssParameter name="fill">#000000</sld:CssParameter>                             </sld:Fill>                         </sld:TextSymbolizer>                       <sld:TextSymbolizer>                             <sld:Label>                                 <ogc:PropertyName>bldname</ogc:PropertyName>                             </sld:Label>                             <sld:Font>                                 <sld:CssParameter name="font-family">Arial</sld:CssParameter>                                 <sld:CssParameter name="font-size">8.0</sld:CssParameter>                                 <sld:CssParameter name="font-style">normal</sld:CssParameter>                                 <sld:CssParameter name="font-weight">normal</sld:CssParameter>                             </sld:Font>                             <sld:LabelPlacement>                                 <sld:PointPlacement>                                     <sld:AnchorPoint>                                         <sld:AnchorPointX>0.0</sld:AnchorPointX>                                         <sld:AnchorPointY>0.0</sld:AnchorPointY>                                     </sld:AnchorPoint>                                     <sld:Displacement>                                         <sld:DisplacementX>0.0</sld:DisplacementX>                                         <sld:DisplacementY>0.5</sld:DisplacementY>                                     </sld:Displacement>                                 </sld:PointPlacement>                             </sld:LabelPlacement>                             <sld:Fill>                                 <sld:CssParameter name="fill">#000000</sld:CssParameter>                             </sld:Fill>                         </sld:TextSymbolizer>                                       </sld:Rule>                 </sld:FeatureTypeStyle>             </sld:UserStyle>         </sld:UserLayer>     </sld:StyledLayerDescriptor>


title: How to perform SQL queries and get results from QGIS python console?

text: I'm writing a python script using QGIS API. I have to get results from postgres database table. The table has geometry field and other non-geometry fields. I want to perform SQL queries on non-geometry fields and get results in my code. How to do this? Is there any class to do so? I know about `QgsDataSourceURI` class but as far as I know it only gets results from geometry fields.


title: Sort geometry + data table in ArcGIS with Permanently Sort Records (PSR) v1.0

text: When i run the algorithm gives an error: Order_ ASCENDING # # # # Start Time: Fri Mar 01 17:06:33 2013 000576 ERROR: Script Associated with this tool does not exist. Failed to execute (sortrecords). End Time: Fri Mar 01 17:06:33 2013 (Elapsed Time: 0.00 seconds) Do you know why? Thanks in advance, Valter.


title: Why ignores Google Earth the gx:altitudeOffset in KML files?

text: I am currently writing software that creates 3D polylines and outputs these in KML format. According to the official documentation it is possible to define an altitude offset via gx:altitudeOffset to raise or lower the line. This is quite handy to avoid 3D polylines rendered in Google Earth to "disappear" below the ground in areas where Google's topographic data isn't as accurate as one would wish. However, it seems that gx:altitudeOffset has no effect in Google Earth - at least for me. Has anyone come across this issue before? Cheers!


title: Can feature layer in MXD with joined data from non-geodatabase be published as feature service?

text: I have a table stored in an SDE geodatabase for all point features with an additional GEOMETRY_ID. A few non-spatial data tables are stored in an ordinary MS SQL Server database. They can be joined by the common GEOMETRY_ID and the layer is stored in a MXD. The MXD file couldn't be published as feature service, so Add, Update and Delete operations cannot be applied to this layer. Therefore, I am planning to move the non-spatial database to SDE geodatabase and published as feature service. I have questions as below:   1. Is that true that a feature layer in MXD that has joined data from non-geo database cannot be published as feature service in ArcGIS Server?   2. In order to allow operations to those non-spatial tables, say Add, Update and Delete records, is it a good practise to store them into SDE geodatabase and published as feature service?


title: qgis printcomposer: can I select features whose attributes to show

text: I am using the atlas to generate a number of maps. Each map is of a particular zone represented by a multiline vector layer. I have another layer with point data and each map has an attribute table with the point data. It seems that I have just two choices:   1. I can have all the points in the table   2. or I can have just those points that are visible on the map I want a third possibility: just those points associated with the zone. i.e. an option to filter points relative to the 'current' feature -- something like "zone" = atlas.zone_name.


title: Determine which points fall within a 3D polygon and export this subset to a flat file

text: I am working in ArcMap 10 and will have a 3D representation of a zone of transmission. I would like to determine which GPS points fall within this polygon and then export this subset out to a flat file. I have visualized info using 3D analyst but have not queried 3 D as before in the 2D world. Thank you.


title: How to change Datasource of a Raster in sde using ArcObjects?

text: I'm building a C# application that lets the user change their DataSources of all the layers in their MXD. I have it working on FeatureLayers and LYR files but I'm stuck on how to change Raster layers from one sde database to another sde database. Below is all I have so far with Rasters. To change FeatureLayers I used IMapAdmin2 but theure is no option to change Rasters with that interface. Any ideas or additional code? Many thanks               UID uid_ras = new UIDClass();     uid_ras.Value = "{D02371C7-35F7-11D2-B1F2-00C04F8EDEFF}"; //IRasterLayer     IEnumLayer raslayers = pMap.get_Layers(uid_ras, true);     raslayers.Reset();           pRas = raslayers.Next() as IRasterLayer; //get the first layer     while(pRas != null)   //Now change each Raster's DataSource to the new Datasource     {         //I'm unsure what to do from here..     }


title: FME: Join attributes in text file with attributes in SHAPE file

text: I have a SHAPE file with points and different attributes - one attribute `MyID`. I also have a plain text file with several attributes - each in a separated column:               MyID MyValue      1    A      2    B      3    C      :    :      I would like to use FME to append my attributes in the text file using the attribute key/value `MyID`. **Is this possible, and in that case how?**


title: How can I disable ArcMap warning prompt?

text: Whenever I'm attempting to perform `Switch selection` in ArcMap table I'm always presented with this friendly prompt: ![enter image description here](http://i.stack.imgur.com/Sd0Yq.png) I'm fully aware of 'dangers' of this operation, and I think I could live without this warning. Is there a way to switch it off?


title: only positive number expression label in arc map

text: I was just wondering if anybody knows of a way to write an expression to make all my numeric values in my labels positive. I want to do 1234 cal BC 23 cal AD for example, as a label. My data is - 1234 (being BC) and 23 for AD. any ideas?


title: finding routes just for cyclists

text: I have created a PostGIS DB using osm2po and I am using pgrouting to calculate the routes. The application I am creating should find routes for cyclists so I want the route finder to prefer roads with cycle lanes present and to never plot a route containing motorways. Looking through the config files I see: `wrt.finalMask` = car along with other tags such `wtr.tag.highway.motorway = 1, 11, 120, car` I was wondering are these the parameters that I should tweak to accomplish this? Would I just remove tags such as motorway etc.? Thanks


title: Why does Mapserver throw "msQueryByPoint(): Search returned no results."?

text:
I have been trying to configure a QUERY using mapserver. Below is the mapfile:                MAP      NAME "Fourth"                               UNITS dd                                    EXTENT 58.206740 5.756104 104.793418 33.644106              SIZE 640 320                                IMAGECOLOR 200 225 255                      IMAGETYPE gif                                   FONTSET "C:\ms4w\Apache\htdocs\fontset.txt" # pointers to fonts               WEB     # A header/footer defined in a web object is displayed      # before/after any individual query response is made.      # It is displayed only once.      #     HEADER "C:/ms4w/Apache/htdocs/xxx/map/fourth_web_header.html"     FOOTER "C:/ms4w/Apache/htdocs/xxx/map/fourth_web_footer.html"          TEMPLATE "C:/ms4w/Apache/htdocs/xxx/map/fourth.html"               IMAGEPATH "C:/ms4w/Apache/htdocs/tmp/"     IMAGEURL "/tmp/"                               END               LEGEND     IMAGECOLOR 255 255 255     STATUS ON     KEYSIZE 14 12     LABEL       TYPE BITMAP       SIZE SMALL       COLOR 0 0 89       END      END          QUERYMAP                          STATUS on                # draw query map     STYLE hilite             # highlight selected feature     COLOR 255 255 0          # in yellow     SIZE 320 160     END          SYMBOL          NAME "circle"     TYPE ellipse # Type of symbol          POINTS     1 1     END # end of POINTS          FILLED true     END                LAYER     NAME 'growth_1'     TYPE POINT     DUMP true     TEMPLATE fooOnlyForWMSGetFeatureInfo     # A header or footer defined at the layer level is displayed     # if that layer is a query layer. It is displayed only once.     #     HEADER "C:/ms4w/Apache/htdocs/xxx/map/fourth_cities_header.html"     FOOTER "C:/ms4w/Apache/htdocs/xxx/map/fourth_cities_footer.html"          TOLERANCE 1             # must be within 1 tolerance unit     TOLERANCEUNITS miles    # units for tolerance values is miles          EXTENT 58.206740 5.756104 104.793418 33.644106     CONNECTIONTYPE postgis     CONNECTION "dbname='postgis' host=localhost port=5432 user='postgres' password='xxxxxxx' sslmode=disable"     DATA 'the_geom FROM "growth_1" USING srid=4326'     METADATA       'ows_title' 'growth_1'     END     STATUS ON     TRANSPARENCY 100     PROJECTION     'proj=longlat'     'datum=WGS84'     'no_defs'     END               CLASSITEM 'growth_scale'     CLASS       NAME "growth_scale = BAD"        EXPRESSION "BAD"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 242 115 240        END     END     CLASS       NAME "growth_scale = EXCELLENT"        EXPRESSION "EXCELLENT"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 53 116 77        END     END     CLASS       NAME "growth_scale = FAIR"        EXPRESSION "FAIR"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 92 200 4        END     END     CLASS       NAME "growth_scale = GOOD"        EXPRESSION "GOOD"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 94 8 202        END     END     CLASS       NAME "growth_scale = MARGINALLY BAD"        EXPRESSION "MARGINALLY BAD"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 252 63 172        END     END     CLASS       NAME "growth_scale = NO DATA"        EXPRESSION "NO DATA"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 22 79 25        END     END     CLASS       NAME "growth_scale = POOR"        EXPRESSION "POOR"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 86 98 176        END     END     CLASS       NAME "growth_scale = VERY GOOD"        EXPRESSION "VERY GOOD"         STYLE          SYMBOL "circle"           SIZE 7.0           OUTLINECOLOR 0 0 0          COLOR 189 72 76        END               CLASS         # A template defined at the class level is used to display         # the results for each reponse to a query. If a result set         # contains N, then the template will be used N times.         #         TEMPLATE "C:/ms4w/Apache/htdocs/xxx/map/fourth_cities_query.html"         STYLE             COLOR 0 0 0     # symbol color is black         END          END               END           END       But then when I go the query mode I get the following error: **msQueryByPoint(): Search returned no results. No matching record(s) found.** Any idea on why such an error message Now from today morning I get this window but the attribute is not populated. ![enter image description here](http://i.stack.imgur.com/YNLyy.png) The following is the query template                        Layer:growth_1
[lrn]	       [code]	       [address]	       [latitude]	       [longitude]	       bbbbb	       scale	       oid


title: How to fix the "The inserted Ring is not contained in a feature"?

text: I am trying to add a ring in a feature in a shapefile. This feature is a single part feature but has already a few rings. When I try to add the new ring, I have the error message : "The inserted Ring is not contained in a feature". I tried to modify my snapping options thinking that the problem came from this setting, but I didn't have any luck. Does anybody know how I can fix this problem? I use QGis 1.8.0-Lisboa and Windows 7. Thanks


title: How to remove thin lines and small points from qgis raster

text: I want to digitize the roads of a raster map to vector format using QGIS and GDAL preferably. By using the Raster Calculator I have been able to extract the roads and contour-lines from the raster to another raster by selecting pixels of the right color. The problem now is that I don't want the contour- lines, just the roads. The difference here is that the contour-lines are much thinner than the roads. I have been trying to use Sieve and Proximity without much luck. I think I want something similar to Shrink in ArcGIS or maybe use different settings. Here is my start image which has gone through Raster calculation and a Proximity filter.![Extracted roads and contours](http://i.stack.imgur.com/rcQXG.jpg)


title: Adding GeoTIFF image to GeoServer: failed to create reader from file

text: I'm trying to add a GeoTiff-file to GeoServer through adding a raster data source, but whenever I try to add my file, I get the error 'Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:///mnt/hgfs/VMSharedData/newmaps/download.tiff and hints null'. I suspect it's something with the information of the file, but I can't find out what. I've ran gdalinfo on it and this was the output: http://pastebin.com/DQqremJt To confirm that the problem is within the file, I've tried downloading another GeoTiff file from TrueMarble, and that file did indeed upload correctly. This is the gdalinfo output from the TrueMarble file: http://pastebin.com/23pajuri Does anyone know what the error might be? Does my file lack any data? I'm afraid I don't know much about GIS in general, so any help people here could provide me would be very valuable. UPDATE -- EXTRA INFORMATION: I couldn't open the incorrect file with GIMP, but it opened just fine with QGIS. The GeoServer log says "Projection not supported" when I try to upload the incorrect GeoTIFF-file.


title: nearest neighbor with postGIS and nodejs

text: I'm using postgreSQL 9.1 , postGIS 2.0, nodejs 0.10.12 and the latest version of node's pg module. I use websockets on the server side. I implemented a function that tries to find the 5 nearest neighbors of a given geometry (it can be a point or a line or a polygon). Does not work. I admit I am a rookie on node. And also that I am using a complicated method of my own. Here is the client side code. Working on a vector layer                   function feature_added(feature){            //a feature just added     //grab its geometry         var bat=map.layers[2].features[0].geometry;     //create sockets               var wdm = new WebSocket("ws://localhost:8000");     //error reporting for sockets                  wdm.onerror=function (evt)               {mapDou.textContent = evt;}     //open sockets                      wdm.onopen = function(){     //convert geometry to a string         var man=new String(bat);     //get the first five letters of the string to check if it is a point, line or polygon         var spi=man.substring(0,5);          //according to the 5 first letters, send info to server         if(spi=='POINT'){     //get just the geometry=numbers, spaces and commas to send to server             var hul=man.substring(6,man.length-1);                  wdm.send(JSON.stringify({command: 'mapDoubleIn', geomT: 'point',geomDoubleIn: hul}));                  document.getElementById('mapDou2').innerHTML=hul;}              if(spi=='LINES'){             alert('in3');             var hul=man.substring(11,man.length-1);                  wdm.send(JSON.stringify({command: 'mapDoubleIn', geomT: 'line', geomDoubleIn: hul}));                  document.getElementById('mapDou2').innerHTML=hul;}                         //same IF snippet for polygons....         //get the message from server              wdm.onmessage = function (evt) {               var received_msg = evt.data;              document.getElementById("mapDou").innerHTML+=received_msg;};         //unregister so this function work for the first feature added, not the others the user may add         pins.events.unregister('featureadded', this, feature_added);             }      And here is the server side snippet that deals with the nearest neighbor                   function checkMapIn(je,jj){          //je is the numbers, commas, spaces came from user     //jj is the type              if (jj=='point'){         var conString = "pg://username:password@localhost:5432/myDB";         var client = new pg.Client(conString);         client.connect();     //replace space with comma , so syntax is like 1,2 not 1 2         var je=je.replace(/ /gi, ',');         var query = client.query('SELECT pins.p_name  FROM pins ORDER BY pins.p_geom <-> st_setsrid(ST_MakePoint('+je+'),900913)LIMIT 5;')                 query.on("row", function (row, result) {             result.addRow(row);});         query.on("end", function (result) {         console.log(JSON.stringify(result.rows, null, "    "));          for (var i=0; i<result.rows.length; i++){            connection.send(result.rows[i].p_name)}             client.end();});}               if (jj=='line'){     var conString = "pg://username:password@localhost:5432/myDB";      var client = new pg.Client(conString);     client.connect();     var query = client.query('SELECT pins.p_name  FROM pins ORDER BY pins.p_geom <-> st_setsrid(ST_MakeLine('+je+'),900913)LIMIT 5;')             query.on("row", function (row, result) {         result.addRow(row);});     query.on("end", function (result) {     console.log(JSON.stringify(result.rows, null, "    "));      for (var i=0; i<result.rows.length; i++){        connection.send(result.rows[i].p_name+'  je  '+je)}         client.end();});}     //for the polygons is the same thing.....              }      Now, if I add a point on the map, I get ALL the points from the DB as a result. I have only 3 simple points in the db and I get all the names, no matter where I add the point. If I add a line or a polygon on the map, I get this error from node               events.js:72     throw er; //Unhandled 'error' event           ^     error: synatx error at or near "4740270.8015625"      This number is ALWAYS the second part of the first pair of the line or polygon.What I mean? Watch closely. This is the number `4740270.8015625` and this is what I get from openlayers when I add a feature `POLYGON((2318122.615 *4740270.8015625*,2355043.3 4731221.6140625,2320294.42 4716380.9465625,2318122.615 4740270.8015625))` I enclosed in ** where the number is placed. Again, I admit it is comlecated, but I cannot fix it. Any advise? Even better, any alternatives? Thank you very much slevin


title: How to get a "classical" globe projection

text: I have a shapefile of the world continents in EPSG 4326. To what reference system do I have to reproject my file to get a projecting like this globe below?![enter image description here](http://i.stack.imgur.com/tEwdy.png)


title: QGIS Value Map Edit Widget with properties dependent on another field

text: I'm having a problems with Edit Widgets in QGIS. I'm working on a GIS Database for archaeological data, where every site is represented by a polygon. In the attributes there is a field for the era which that site belongs to. I made this with Value Map, so as to make data processing easier and redundancy- free(er). My problem is that I'm trying to add a "sub-era" field as well to show if a site belongs to a certain period in a given era. Naturally I want to use the same type of edit widget, but instead of listing every period for the whole database I thought I would make the period-field's value range dependent on the era selected in the previous field. For example: I have a site that belongs to the Roman Age, and I choose this at the era, so then in the period field only the periods for the Roman Age are shown (1st century, 2nd century, etc.), and the periods relevant to other eras are not. Is this possible somehow in QGIS? Thanks for the answers in advance!


title: Dateline wrap issue in ArcObjects / ArcGIS Engine

text: I am having issues manually creating a polygon that crosses the dateline (long=180). My x coordinate goes from 178, 179, 180, -179, -178, etc. Anyway, can anyone give me some guidance? I am using ArcGIS Engine 10.0 to do so. I know how to create the polygon via code, but it is the dateline issue I am having problems with. Once it crosses to -179, there is a straight line across the screen. I am familiar with the geodesify option (for polylines) and I saw there is one for elipses, but the polygon I am creating is not an elipse. I am using the Geographic Coordinate System.


title: How to edit a table in GRASS?

text: How do I edit a table in GRASS? When importing a vector into GRASS from QGIS, all the attributes are lost and I need these to continue with my analysis.


title: converting from JSON to Shape files

text: I have a quick question about converting JSON to Shapefile. I'm trying to convert multiple polygon geometry JSON files into a single shape file and I'm not sure what kind of json this is ?[I'm thinking its a ESRI JSON] I've tried converting them to shapefiles using ogr2ogr. *Convert into GeoJSON . *GeoJSON to a shape file.  I'm stuck with first step. Please advise, if i'm on the right track. The text file is not being recognized by ogr2ogr. ogr2ogr -f GeoJSON test.json savedGraphics02.txt               [{"geomsr":102100,"symcolor3":0,"symtypename":"SimpleFillSymbol","symangle":0,"symtext":"","geomtype":"POLYGON","symtype":"solid","gname":"Graphic2977","symsize":1,"gid":"Graphic2978","symcolor":4173788,"attrib":{"wkid":102100,"labeled":false},"symhalo":false,"symltype":"solid","symfonte":"","symalpha2":0.8,"cmenu":{"builtInItems":{"print":false,"save":false,"zoom":false,"quality":false,"play":false,"loop":false,"rewind":false,"forwardAndBack":false},"clipboardItems":{"copy":false,"cut":false,"selectAll":true,"paste":false,"clear":false},"clipboardMenu":false,"link":null,"customItems":[{"enabled":true,"visible":true,"caption":"Clear","separatorBefore":false},{"enabled":true,"visible":true,"caption":"Area: 19.52 sq km","separatorBefore":false},{"enabled":true,"visible":true,"caption":"Perimeter: 17.71 km","separatorBefore":false}]},"symfontp":"middle","symwidth":1,"geomarray":[{"x":-10647364.467506621,"y":3449811.3796355305,"spatialReference":{"wkid":102100}},{"x":-10645761.200838342,"y":3451050.6149566025,"spatialReference":{"wkid":102100}},{"x":-10644710.191699423,"y":3452044.296324308,"spatialReference":{"wkid":102100}},{"x":-10643257.888162006,"y":3451468.1522236094,"spatialReference":{"wkid":102100}},{"x":-10641423.399483165,"y":3450703.7819407587,"spatialReference":{"wkid":102100}},{"x":-10640200.407030603,"y":3449748.3190871957,"spatialReference":{"wkid":102100}},{"x":-10640523.353475107,"y":3448875.0260390383,"spatialReference":{"wkid":102100}},{"x":-10640754.575485671,"y":3448639.982177062,"spatialReference":{"wkid":102100}},{"x":-10641194.08839831,"y":3448716.419205347,"spatialReference":{"wkid":102100}},{"x":-10641174.979141237,"y":3447665.410066427,"spatialReference":{"wkid":102100}},{"x":-10641270.525426595,"y":3447302.3341820734,"spatialReference":{"wkid":102100}},{"x":-10641882.021652875,"y":3446920.149040648,"spatialReference":{"wkid":102100}},{"x":-10642971.249305937,"y":3447111.2416113606,"spatialReference":{"wkid":102100}},{"x":-10643926.7121595,"y":3447015.695326004,"spatialReference":{"wkid":102100}},{"x":-10645226.141640346,"y":3446939.258297719,"spatialReference":{"wkid":102100}},{"x":-10646449.134092908,"y":3446939.258297719,"spatialReference":{"wkid":102100}},{"x":-10646544.680378264,"y":3446939.258297719,"spatialReference":{"wkid":102100}},{"x":-10646640.226663621,"y":3447703.6285805698,"spatialReference":{"wkid":102100}},{"x":-10647175.285861615,"y":3448296.015549779,"spatialReference":{"wkid":102100}},{"x":-10647498.23230612,"y":3449410.085237034,"spatialReference":{"wkid":102100}},{"x":-10647500.143231828,"y":3449404.3524599127,"spatialReference":{"wkid":102100}},{"x":-10647574.669334406,"y":3449601.177807747,"spatialReference":{"wkid":102100}},{"x":-10647574.669334406,"y":3449696.724093103,"spatialReference":{"wkid":102100}},{"x":-10647364.467506621,"y":3449811.3796355305,"spatialReference":{"wkid":102100}}],"symcolor2":0,"symalpha1":0.5}]


title: How to dynamically display mouse position (coordinates) while drawing polygon?

text: I would like to dynamically display coordinates of the point, using label for example, while drawing polygon. I did so far:               var fromProjection = new OpenLayers.Projection("EPSG:4326");     var toProjection = new OpenLayers.Projection("EPSG:900913");     ...     map.events.register("mousemove", map, function(evt){         if (polygon.active) {             var position = map.getLonLatFromPixel(this.events.getMousePosition(evt));             var g = position.transform(toProjection, fromProjection);             var f = formatLonlats(g);//my owny function which displays coordinates as: x1 deg y1 min z1 sec N, x2 deg y2 min z2 sec E (and here its decimal values)             console.log(">> coordinates = " + f);         }           });      It's working for console, but how can I display a label with "f" value while drawing polygon? Thanks in advance for your help.


title: Unable to stop ArcGIS Server automatic cache generation

text: I'm running ArcGIS Server 10.1 on a Windows box on Amazon, via remote desktop. I've set up some services on which I have enabled caching using the Bing/Google/Esri scheme. I explicitly set these to Update Cache Manually. ![enter image description here](http://i.stack.imgur.com/WIBo7.png) For some reason, ArcGIS Server is changing these services to Update Cache Automatically. If I change it back to Manual, then immediately re-open the dialog, it has reverted to Automatic. If I choose View Cache Status, it's shown as "Tile Generation is in progress". Cancelling the tile generation has no effect - it immediately restarts. I am creating these services by first creating *.sd files, in which I specify the cache levels and that I wish for Manual cache generation, then creating ArcGIS Server services from the *.sd files. Why are these services changing irrevocably to Automatic cache updating? Thanks


title: Best design for Open Source Python / PostGIS prototype

text: I am writing a data intensive web application that is delivered through apache. My question is about how to best arrange processing given that there are multiple options. I have at my disposal OpenLayers/JQuery/Javascript, PostGIS/Postgresql (with pgsql), python/psycopg2, php. The database contains about 3 million rows and the prototype currently runs as follows:   * User clicks on a point on the OpenLayers window   * The coordinate is sent as an AJAX request through to a python function on the server   * Currently my application is stateless   * Python's psycopg2 is used to call a pgsql stored procedure and a largish set of WKT values (and a data field) are returned back to the python module    * The data field is used to categorize the WKT records in python as follows: all WKT values are categorized into one of 5 groups. About 1% of the WKT values are actually modified.   * The five sets/groups of WKT are buffered to create five distinct polygons. I currently call a stored procedure in the database to do this. This in turn just uses ST_BUFFER. (I've considered using Shapely but am not sure there will be a performance advantage since the GEOS library is used in either case...)   * Finally the 5 WKT text values are wrapped up in a JSON string and sent back to OpenLayers for rendering as five layers. I am finding that the bottlenecks are the initial spatial search and the final buffering stage. I guess the Question is: Is there a better way to arrange things? For example, should ALL of the data processing be done in PostgreSQL (e.g. with cursors) and is would this be a good thing in terms of maintenance and performance? Would it be better to use a tile server to avoid passing long WKT strings over to the web client? How would you address it? Many thanks in advance for your help and sharing experience, John


title: Access Violation in ArcObject Multi-threaded Application

text: I think I have figured it out. The most probable cause of exception in Multithreaded application may be: When both threads trying to open same featureclass it breaks: coz one of the thread is already in the process of opening it and other tries to do the same, So it gives error like: "Memory could not be read or write from protected memory" This is my guess, but what wonders me is that why there is no separation of concern, even if I am opening a different workspace in each thread. May be Arcobjects internally, looks for same address space for any object in database. I have written few lines of code and tried to run it with different threads opening different object classes and this also breaks but   whenver, I deligate few thread to open same featureclass it breaks with the above errors. Also, not releasing memory is the other cause for such errors as well. Any suggestions? Adding some code for more clarification:               private void ReadFeatureClass(string featureclassname)       {             IWorkspaceFactory workspaceFactory = new SdeWorkspaceFactory();                IPropertySet connectionProperties = new PropertySet();           connectionProperties.SetProperty("SERVER",settings.Server);          connectionProperties.SetProperty("INSTANCE", Settings.Instance);           connectionProperties.SetProperty("USER", settings.User);           connectionProperties.SetProperty("PASSWORD", settings.Password);           connectionProperties.SetProperty("VERSION", settings.Version);                FeatureWorkspace featureWorkspace = workspaceFactory.Open(connectionProperties, 0) as IFeatureWorkspace;                ITable featureClass = featureWorkspace.OpenTable(featureClassName);       }        Above code breaks with the said exception most of the time. @AndOne, I am using oracle spatial direct connect. Also, I created a new feature class and ran the same code against it, this also fails when threads are increased. There are few differences which I could figure out between these two featureclasses: Any suggestions?


title: AutoCAD and WMS/WFS

text: I am setting up a mapping server and I wondered if there is anyway to get AutoCAD to access WMS/WFS layers. I am aware of the fact that AutoCAD Map can do this, but we just have AutoCAD and AutoCAD LT here and could not really justify buying lots of AutoCAD Map licenses. Is it possible for us to have one copy of AutoCAD Map to set up drawings with WMS layers in the background and then view these drawings in normal AutoCAD or AutoCAD LT? Are there any third party add ons that enable this functionality? Any help would be much appreciated, James


title: How to use Leaflet CircleMarker with Leaflet Draw

text: I want to use the Leaflet CircleMarker function together with Leaflet Draw when a marker is put on the map.               var drawControl = new L.Control.Draw({             draw: {                   marker: function (feature, latlng) {                             return L.circleMarker(latlng) // Here I want to use the CircleMarker function             }         });      Any recommendations on how to implement that or if it is even possible?


title: Transformation type - when to use which type?

text: I am using QGIS 2.0.1 on a Mac, and I am georeferencing a scanned map from 1822. The image is an excellent quality scan, and includes a grid of lat-long. I do not know much else about the map that would be useful in determining coordinate system, etc. I am using the Georeferencer plugin, and I would like to know a rule-of-thumb for selecting transformation type. For this particular map, I have added all the lat-long intersections, and also many manually entered points from the georeferenced shapefile I'm also using. In addition to offering a general rule-of-thumb, can someone offer some examples of what each transformation type would look like? Practical differences? When does one option visibly alter the raster image, etc?


title: ArcGIS 10.1 Python AddIn Using Multiprocessing crashes ArcMap?

text: I would like to run a multiprocessing task from a python add-in tool. My issue is that the process keeps failing. Basically crashes ArcMap. Here is my basic code:               def function(startOID, endOID, fc):              wrksp = r"c:\temp\mp_addintest\data\test_%s.txt" % (int(startOID) + int(endOID))         # real logic removed to dumb it down         with open(wrksp, 'w') as writer:             writer.write("%s to %s from %s \n" % (startOID, endOID, fc))         return wrksp     class btnMP(object):         """Implementation for src_addin.MPButton (Button)"""         def __init__(self):             self.enabled = True             self.checked = False         def onClick(self):             pool = None             try:                 pythonExe = os.path.join(sys.exec_prefix, 'python.exe')                 multiprocessing.set_executable(pythonExe)                 pool = multiprocessing.Pool(4)                 results = []                 for i in xrange(4):                     results.append(pool.apply_async(function, [str(1),                                           str(i),                                           str("test")]))                 pool.close()                 pool.join()                 for result in results:                     print result.get()             except:                 del pool                 print 'error'      If I run the code outside of ArcMap or from a toolbox, it works without a problem, but when I put the logic inside a button, it causes arcmap to crash. My guess is that ArcMap is running in process for all python add-ins. Is there a work around for this issue? I've tried adding in the freeze_support() to the code as well, but that did nothing as well.


title: How to query against time

text: I have a date-time field in a feature class which I want to query. The field has values like "2011-01-01 00:00:29". I want to query the data between the time 00:06:00 and 00:12:00. The date does not matter an shall be ignored. Any ideas how to do this? Thanks


title: Where can I find a list of (preferably free) valid USPS zipcodes?

text: I don't need any other infomation except for state and zipcodes. A lot of lists online (even those updated through 2013) contain invalid zipcodes when tested through USPS website. Any help is appreciated, thanks!


title: From where can i download WKT files for US zip codes?

text: From where can i download WKT files for US zip codes ?? i need to plot zip code boundary on a map using open layers


title: What is a "CFG" application in GIS terminology probably?

text: I come across a 2008 tech presentation PDF on "GIS-Enabled Modeling and Simulation (GEMS) presented by ESRI (i think for the US Army). On one of the page titled "Challenges to be overcomed", there is this point:               > 3D Visualisation:     >    GIS data is inherently 2D     >      Fine for CGF Applications     >    ArcGlobe     >    Procedural terrain visualization approaches.      I believe this point is saying that 2D visualisation is OK for CFG applications, but for their puporse 3D should be used. Anyone can tell what "CGF Applications" mean? [edit: deleted second question] Thanks for any help. PS: I know it's ESRI sales team job to answer these questions, but I am just a student doing research on terrain rendering. Don't think they will entertain me. EDIT: typo corrected from CFG to CGF.


title: ArcGIS Attribute table appears empty until features are selected

text: I have a multiple layers that show features in the data frame and the layers are editable and labeled, but when you open the attribute table for these layers, it's empty. The only way to get the features to appear in the attribute table is to select them. I have also noticed that these layers have no symbology in the table of contents. Once again, they have symbology in the data frame just not in the TOC, and I cannot change the symbology anywhere to make it appear in the TOC. What's going on here?


title: QGIS SLD in GeoServer

text: I rendert a beautiful with QGIS based on OSM data. Now I want to publish it via GeoServer. I am new to GeoServer but as far as I it does not accept SLD files created by QGIS. My GeoServer cannot validate my code. Does someone has a clue how to change the style so that GeoServer recognizes it? The SLD content is:               <?xml version="1.0" encoding="UTF-8"?>     <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">     <NamedLayer>     <se:Name>bahn</se:Name>     <UserStyle>       <se:Name>bahn</se:Name>       <se:FeatureTypeStyle>         <se:Rule>           <se:Name>Railway</se:Name>           <se:Description>             <se:Title>Railway</se:Title>           </se:Description>           <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">             <ogc:Not>               <ogc:PropertyIsNull>                 <ogc:PropertyName>type</ogc:PropertyName>               </ogc:PropertyIsNull>             </ogc:Not>           </ogc:Filter>           <se:MinScaleDenominator>1</se:MinScaleDenominator>           <se:MaxScaleDenominator>10000</se:MaxScaleDenominator>           <se:LineSymbolizer>             <se:Stroke>               <se:SvgParameter name="stroke">#e4e4e4</se:SvgParameter>               <se:SvgParameter name="stroke-width">0.26</se:SvgParameter>               <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>               <se:SvgParameter name="stroke-linecap">square</se:SvgParameter>             </se:Stroke>           </se:LineSymbolizer>           <se:LineSymbolizer>             <se:Stroke>               <se:GraphicStroke>                 <se:Graphic>                   <se:Mark>                     <se:WellKnownName>line</se:WellKnownName>                     <se:Fill>                       <se:SvgParameter name="fill">#e4e4e4</se:SvgParameter>                     </se:Fill>                     <se:Stroke>                       <se:SvgParameter name="stroke">#e4e4e4</se:SvgParameter>                     </se:Stroke>                   </se:Mark>                   <se:Size>1</se:Size>                 </se:Graphic>                 <se:Gap>                   <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">                     <ogc:Literal>5</ogc:Literal>                   </ogc:Filter>                 </se:Gap>               </se:GraphicStroke>             </se:Stroke>           </se:LineSymbolizer>         </se:Rule>       </se:FeatureTypeStyle>     </UserStyle>


title: Why is pooled geoprocessing service not available via the ArcGIS Rest API?

text: I'm using ArcGIS Server 10.0. I've published a pooled asynchronous python geoprocessing service. It works correctly using the Rest API. When I configure the service not to be pooled, I can't access it via the Rest API anymore. I get the following error: Service 'myService' of type 'GPServer' does not exist or is inaccessible. Error code: 404. Is this normal? Below the Pooling tab of my service configuration: ![enter image description here](http://i.stack.imgur.com/Df1fm.png)


title: Is automatic text wrapping in an ArcMap layout text element possible?

text: How can I word-wrap a text element on an ArcMap layout, when it contains a lot of text?   * go into Layout mode   * choose > Insert > Text   * paste in a long text block eg lorem ipsum The text block now stretches across the screen, and there's no apparent way to change the width of the text block. Is there a way to set the text block to the desired width, and have ArcMap automatically enter line breaks? (The way that, um, every other piece of software which handles text does...) The workaround is to enter line breaks manually, which is great until you decide to change the width, font size, etc. ![enter image description here](http://i.stack.imgur.com/ZoDBY.jpg)


title: openlayers can't show an image layer in the right place starting from a center point

text: I have to draw an image over the map as an overlay. The image is, for example, 400x400 pixels and represents an area of 400x400 kilometers. I'm using an Image Layer to do this. I have, as reference to place the image in the map, the lat/lon point of the center where the image should be positioned. To draw the image layer, I have to create a Bounds object, which needs the south-west lat/lon point and the north-east lat/lon point. The idea is this:   * starting from the center point I calculate the south-west point going 200km south from center, and then 200km west. This way I get the south-west lat/lon point.   * starting from the center point I calculate the north-east point going 200km north from center, and then 200km east. This way I get the north-east lat/lon point.   * now I have the two points to create the Bounds object needed to create the image layer. Everything is fine, but the problem is that the image is not rendered in the right position. The center of the image does not correspond to the center point I started the calculation but it's a little shifted like this: ![enter image description here](http://i.stack.imgur.com/2tDu0.png) To calculate the south-west and north-east lat/lon coordinates I use a library found on Internet called "Geodesy by Mike Gavaghan". Here the code:               //lat, lon are the coordinates of the center point     //initialize geodesy     GeodeticCalculator geoCalc = new GeodeticCalculator();     Ellipsoid reference = Ellipsoid.WGS84;     GlobalCoordinates coords = new GlobalCoordinates(lat, lon);          //get south-west corner     GlobalCoordinates south = geoCalc.calculateEndingGlobalCoordinates(reference, coords, 180, imgMetersHeight/2);     GlobalCoordinates southwest = geoCalc.calculateEndingGlobalCoordinates(reference, south, 270, imgMetersWidth/2);          //get north-east corner     GlobalCoordinates north = geoCalc.calculateEndingGlobalCoordinates(reference, coords, 0, imgMetersHeight/2);     GlobalCoordinates northeast = geoCalc.calculateEndingGlobalCoordinates(reference, north, 90, imgMetersWidth/2);          //create a bound using the calculated coordinates     Bounds bounds = new Bounds(southwest.getLongitude(), southwest.getLatitude(), northeast.getLongitude(), northeast.getLatitude());     bounds.transform(m_Proj4326, new Projection(m_Map.getProjection()));          //set options of the image     ImageOptions imgOptions = new ImageOptions();     imgOptions.setIsBaseLayer(false);     imgOptions.setTransitionEffect(TransitionEffect.RESIZE);     imgOptions.setAlwaysInRange(true);     imgOptions.setLayerOpacity(0.7);     imgOptions.setProjection("EPSG:900913");          //create the image layer and add to the map     imgLayer = new Image("my name", null, bounds, new Size(400, 400), imgOptions);     map.addLayer(imgLayer);      My questions:   * What am I doing wrong?   * Are my calculations of south-west and north-east points correct?   * What should I do to draw correctly on the map an image placed and centered correctly? Thanks.


I have one GeoTIFF file with 2 bands. The data type is Byte. I want to calculate (Band2-Band1)/(Band2+Band1). But the following command provided a dark image:               gdal_calc.py -A infile --A_band 1 -B infile, --B_band 0 --outfile outfile --calc "(A-B)/(A+B)"       Does gdal_calc.py not calculate arithmetic with in the same file? EDIT: I run the following code using python:               import subprocess     gcalc = 'C:\\Users\\cleo\\Documents\\gdalpys\\gdal_calc.py'          a = 'D:\\a.tif'     b = 'D:\\b.tif'     outfile = 'D:\\result.tif'     expr = '(A-B)/(A+B)'     subprocess.call([sys.executable,gcalc,'--type','Float32','-A',a,'--A_band','1','-B',b,'--B_band','0','--outfile',outfile,\         '--calc',expr],shell=True)       a,b,outfile = None, None,None      gdalinfo -stats is as follows:               Driver: GTiff/GeoTIFF          Files: D:\tt.tif          Size is 36001, 36001          Coordinate System is:          GEOGCS["WGS 84",              DATUM["WGS_1984",                  SPHEROID["WGS 84",6378137,298.257223563,                      AUTHORITY["EPSG","7030"]],                  AUTHORITY["EPSG","6326"]],              PRIMEM["Greenwich",0],              UNIT["degree",0.0174532925199433],              AUTHORITY["EPSG","4326"]]          Origin = (-0.000138888888898,0.000138888888884)          Pixel Size = (0.000277777777778,-0.000277777777778)          Metadata:            AREA_OR_POINT=Area          Image Structure Metadata:            INTERLEAVE=BAND          Corner Coordinates:          Upper Left  (  -0.0001389,   0.0001389) (  0d 0' 0.50"W,  0d 0' 0.50"N)          Lower Left  (  -0.0001389, -10.0001389) (  0d 0' 0.50"W, 10d 0' 0.50"S)          Upper Right (  10.0001389,   0.0001389) ( 10d 0' 0.50"E,  0d 0' 0.50"N)          Lower Right (  10.0001389, -10.0001389) ( 10d 0' 0.50"E, 10d 0' 0.50"S)          Center      (   5.0000000,  -5.0000000) (  5d 0' 0.00"E,  5d 0' 0.00"S)          Band 1 Block=36001x1 Type=Float32, ColorInterp=Gray            NoData Value=1.175494351e-038