title: Mapproxy plot with QGIS in 300 DPI

text: I have played around with mapproxy and have created a MBtiles file with tilemill. I then serve the mbtiles file as a wms with mapproxy and it works fine. My problem is that i want to be able to plot a map in a specific resolution like 300 DPI. In the documentations for MapProxy there is a note about this: "you need to understand that a scale will differ if you print a map (200, 300 or more dpi) or if you show it on a computer display (typical 90-120 dpi, but there are mobile devices with more than 300 dpi)." I have tried to define a "res" (resolution) in the yaml file in diffrent ways. Like: res: [1000, 500, 200] and also like: `res: [ # res level scale 26.4583333333, # 0 100000.00000000 13.2291666667, # 1 50000.00000000 6.6145833333, # 2 25000.00000000 2.6458333333, # 3 10000.00000000 ]` Every time i just get a blank map. I want to be able to use qgis to plot my map with overlayers. Only problem is that when i select resolution in qgis like 300 DPI I get a map in another scale so my road-names gets very small. Does anyone know how to set this up properly?


title: How to animate .olControlLayerSwitcher with Jquery?

text: Not know much about css but some how got strucked in setting css property. I am using Openlayers .olControlLayerSwitcher class. Here without using !important keyword, LayerSwitcher will not get move. Here is my code: Its working.But very fast. I want to move it with some speed intervals like jquery animate. Please suggest it.               $(".olControlLayerSwitcher").css("cssText", "top: 30px !important;");           $('.olControlLayerSwitcher').css("cssText", "top: 55px !important;");


title: Programmatically set layer properties Python Init function

text: Is it possible to set the layer properties Python Init function field programmatically? I've been looking through the qgis 2.2 api but can't seem to find anything on it. Hint, suggestions and examples are appreciated :)


title: How to create ''before''raster and ''after''raster layers for Cut Fill tool /in ArcMap 10.1?

text: I have an area which I want to calculate the volume surface. one of the goals is to measure fractures of the area. I want to hypothesized that erosion has been occurred in this area for example in year 1900 and 2000. Minimum elevation is 25 meter and Maximum is 140 meter. for instance i want to fill area below 35 meter and then calculate all fractures which have been filled. how is this possible?


title: Problem with projection in layer

text: I'm having problems with visualizing a layer which is in EPSG:4326 Apparently the geometry looks perfect, but I don't know why, it's not in real coordinates. I have projected it to 4326 with QGIS, re-projected with ogr2ogr, and the result is always the same, the coordinates shown in the box while I pass the mouse are not real. SRC of the project is in 4326, and 'on the fly' is set to on. Any idea what could be happening? I attatch the europe roads layer, if anybody wants to open it and check for some issues. Thanks a lot! Shapefile: https://dl.dropboxusercontent.com/u/64621273/roads.rar


title: My GeoJson will not display on a Vector Layer in Openlayers

text: I have geoJson from the the USGS that I am downloading to my server. It validates just fine with geojsonlint. When I past the JSON into this Openlayers example it says it is bad input json. My Code to display it on a vector layer is as follows where variable mapProjection is EPSG:900913. I have spent 3 days on this now, and cannot get it do display. What am I doing wrong? Added Information, I have tried this method:               vectorLayer = new OpenLayers.Layer.Vector("MyLayer");     map.addLayer(vectorLayer);          function handler(request) {          var geojson_format = new OpenLayers.Format.GeoJSON({         'internalProjection': map.baseLayer.projection,         'externalProjection': new OpenLayers.Projection("EPSG:4326")     });          vectorLayer.addFeatures(geojson_format.read(request.responseText));     }          var request = OpenLayers.Request.GET({         url: "geojson.json",         callback: handler     });      and have been able to see the json in variable request in the handler function. It has to be something to do with the format of the data. I am on a windows system and writing the data to a txt file, then serving it to my openlayers app via IIS. I have the correct mime types set up for json already. Thanks in advance Mark                                   var geojson_format = new OpenLayers.Format.GeoJSON({                                     'internalProjection': mapProjection,                                     'externalProjection': wgs84                                     });                          var newlayer = new OpenLayers.Layer.Vector(                                 layername,                                  {                                 style: style_mark,                                 projection: wgs84,                                                           strategies: [new OpenLayers.Strategy.Fixed()],                                 protocol: new OpenLayers.Protocol.HTTP                                         ({                                                 url: '/data/earthquake_day.json?' + forcedownload,                                                 format: geojson_format                                         })                                 }                         );                     map.addLayers([newlayer]);      This is the Geojson ..               {"type":"FeatureCollection","metadata":{"generated":1382079580000,"url":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson?%2053324","title":"USGS Magnitude 2.5+ Earthquakes, Past Day","status":200,"api":"1.0.11","count":21},"features":[{"type":"Feature","properties":{"mag":4.9,"place":"69km WSW of Panguna, Papua New Guinea","time":1382072700910,"updated":1382074535000,"tz":600,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kg7b","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kg7b.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":369,"net":"us","code":"b000kg7b","ids":",usb000kg7b,","sources":",us,","types":",cap,general-link,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":8.182,"rms":0.95,"gap":86,"magType":"mb","type":"earthquake","title":"M 4.9 - 69km WSW of Panguna, Papua New Guinea"},"geometry":{"type":"Point","coordinates":[154.9386,-6.6267,38.4]},"id":"usb000kg7b"},     {"type":"Feature","properties":{"mag":4.3,"place":"30km ESE of Jarm, Afghanistan","time":1382069641720,"updated":1382071013039,"tz":270,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kg6q","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kg6q.geojson","felt":0,"cdi":1,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":284,"net":"us","code":"b000kg6q","ids":",usb000kg6q,","sources":",us,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":2.372,"rms":0.49,"gap":112,"magType":"mb","type":"earthquake","title":"M 4.3 - 30km ESE of Jarm, Afghanistan"},"geometry":{"type":"Point","coordinates":[71.1215,36.7111,215.63]},"id":"usb000kg6q"},     {"type":"Feature","properties":{"mag":4.4,"place":"37km ESE of Grande Anse, Guadeloupe","time":1382068917150,"updated":1382075936219,"tz":-240,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kg6l","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kg6l.geojson","felt":1,"cdi":2,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":298,"net":"us","code":"b000kg6l","ids":",usb000kg6l,","sources":",us,","types":",cap,dyfi,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":0.927,"rms":1.03,"gap":187,"magType":"mb","type":"earthquake","title":"M 4.4 - 37km ESE of Grande Anse, Guadeloupe"},"geometry":{"type":"Point","coordinates":[-60.7685,16.1425,44.69]},"id":"usb000kg6l"},     {"type":"Feature","properties":{"mag":4.8,"place":"59km ENE of Raoul Island, New Zealand","time":1382060352340,"updated":1382062761000,"tz":-720,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kg5r","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kg5r.geojson","felt":0,"cdi":1,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":354,"net":"us","code":"b000kg5r","ids":",usb000kg5r,","sources":",us,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":0.547,"rms":1.24,"gap":109,"magType":"mb","type":"earthquake","title":"M 4.8 - 59km ENE of Raoul Island, New Zealand"},"geometry":{"type":"Point","coordinates":[-177.3712,-28.9952,68.09]},"id":"usb000kg5r"},     {"type":"Feature","properties":{"mag":4.6,"place":"65km WSW of Manta, Ecuador","time":1382059956670,"updated":1382063766330,"tz":-300,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kg5p","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kg5p.geojson","felt":3,"cdi":3.4,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":327,"net":"us","code":"b000kg5p","ids":",usb000kg5p,","sources":",us,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":3.14,"rms":0.76,"gap":105,"magType":"mb","type":"earthquake","title":"M 4.6 - 65km WSW of Manta, Ecuador"},"geometry":{"type":"Point","coordinates":[-81.3056,-1.0801,25.2]},"id":"usb000kg5p"},     {"type":"Feature","properties":{"mag":4.9,"place":"Central Mid-Atlantic Ridge","time":1382059845140,"updated":1382060754000,"tz":-180,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kg5q","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kg5q.geojson","felt":0,"cdi":1,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":369,"net":"us","code":"b000kg5q","ids":",usb000kg5q,","sources":",us,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,phase-data,","nst":null,"dmin":13.904,"rms":1.17,"gap":79,"magType":"mb","type":"earthquake","title":"M 4.9 - Central Mid-Atlantic Ridge"},"geometry":{"type":"Point","coordinates":[-38.5333,7.9178,10]},"id":"usb000kg5q"},     {"type":"Feature","properties":{"mag":3.1,"place":"114km N of San Juan, Puerto Rico","time":1382057000700,"updated":1382075958596,"tz":-240,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/pr13291001","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/pr13291001.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"REVIEWED","tsunami":null,"sig":148,"net":"pr","code":"13291001","ids":",pr13291001,","sources":",pr,","types":",cap,geoserve,nearby-cities,origin,tectonic-summary,","nst":4,"dmin":1.23159025,"rms":0.21,"gap":306,"magType":"Md","type":"earthquake","title":"M 3.1 - 114km N of San Juan, Puerto Rico"},"geometry":{"type":"Point","coordinates":[-66.0585,19.4955,15]},"id":"pr13291001"},     {"type":"Feature","properties":{"mag":3.2,"place":"153km NNE of Vieques, Puerto Rico","time":1382056681300,"updated":1382074489829,"tz":-240,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/pr13291000","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/pr13291000.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"REVIEWED","tsunami":null,"sig":158,"net":"pr","code":"13291000","ids":",pr13291000,","sources":",pr,","types":",cap,geoserve,nearby-cities,origin,tectonic-summary,","nst":6,"dmin":1.39957521,"rms":0.28,"gap":309.6,"magType":"Md","type":"earthquake","title":"M 3.2 - 153km NNE of Vieques, Puerto Rico"},"geometry":{"type":"Point","coordinates":[-65.3018,19.7154,18]},"id":"pr13291000"},     {"type":"Feature","properties":{"mag":2.9,"place":"61km NE of Camalu, Mexico","time":1382048867000,"updated":1382051103563,"tz":-420,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/ci11379962","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/ci11379962.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"REVIEWED","tsunami":null,"sig":129,"net":"ci","code":"11379962","ids":",ci11379962,","sources":",ci,","types":",cap,general-link,geoserve,nearby-cities,origin,scitech-link,tectonic-summary,","nst":3,"dmin":0.24254513,"rms":0.14,"gap":194.4,"magType":"Ml","type":"earthquake","title":"M 2.9 - 61km NE of Camalu, Mexico"},"geometry":{"type":"Point","coordinates":[-115.6183,31.2453,6]},"id":"ci11379962"},     {"type":"Feature","properties":{"mag":2.9,"place":"26km NE of Soledad, California","time":1382048604900,"updated":1382061371165,"tz":-420,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/nc72089726","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/nc72089726.geojson","felt":1,"cdi":1,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":129,"net":"nc","code":"72089726","ids":",nc72089726,","sources":",nc,","types":",dyfi,focal-mechanism,general-link,geoserve,nearby-cities,origin,phase-data,scitech-link,tectonic-summary,","nst":null,"dmin":0.04491576,"rms":0.14,"gap":43.2,"magType":"Md","type":"earthquake","title":"M 2.9 - 26km NE of Soledad, California"},"geometry":{"type":"Point","coordinates":[-121.1617,36.6223,7.9]},"id":"nc72089726"},     {"type":"Feature","properties":{"mag":4.9,"place":"Mid-Indian Ridge","time":1382040756270,"updated":1382069714445,"tz":300,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kfvj","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kfvj.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":369,"net":"us","code":"b000kfvj","ids":",usb000kfvj,","sources":",us,","types":",cap,dyfi,geoserve,nearby-cities,origin,phase-data,","nst":null,"dmin":20.785,"rms":0.71,"gap":74,"magType":"mb","type":"earthquake","title":"M 4.9 - Mid-Indian Ridge"},"geometry":{"type":"Point","coordinates":[69.0736,-23.117,10]},"id":"usb000kfvj"},     {"type":"Feature","properties":{"mag":3.2,"place":"26km ESE of Cohoe, Alaska","time":1382037828000,"updated":1382066784427,"tz":-480,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/ak10825881","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/ak10825881.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":158,"net":"ak","code":"10825881","ids":",ak10825881,","sources":",ak,","types":",dyfi,general-link,geoserve,nearby-cities,origin,tectonic-summary,","nst":67,"dmin":0.40963177,"rms":0.68,"gap":72,"magType":"Ml","type":"earthquake","title":"M 3.2 - 26km ESE of Cohoe, Alaska"},"geometry":{"type":"Point","coordinates":[-150.8756,60.258,64.3]},"id":"ak10825881"},     {"type":"Feature","properties":{"mag":4.9,"place":"176km ENE of Hachinohe, Japan","time":1382028863680,"updated":1382057818725,"tz":600,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kfnh","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kfnh.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":369,"net":"us","code":"b000kfnh","ids":",usb000kfnh,","sources":",us,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":1.191,"rms":1.37,"gap":175,"magType":"mb","type":"earthquake","title":"M 4.9 - 176km ENE of Hachinohe, Japan"},"geometry":{"type":"Point","coordinates":[143.529,40.8559,31.69]},"id":"usb000kfnh"},     {"type":"Feature","properties":{"mag":3.1,"place":"33km N of Fritz Creek, Alaska","time":1382027563000,"updated":1382056509941,"tz":-480,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/ak10825772","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/ak10825772.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":148,"net":"ak","code":"10825772","ids":",ak10825772,","sources":",ak,","types":",dyfi,general-link,geoserve,nearby-cities,origin,tectonic-summary,","nst":69,"dmin":0.31351203,"rms":0.87,"gap":86.4,"magType":"Ml","type":"earthquake","title":"M 3.1 - 33km N of Fritz Creek, Alaska"},"geometry":{"type":"Point","coordinates":[-151.1942,60.0298,87.9]},"id":"ak10825772"},     {"type":"Feature","properties":{"mag":3.6,"place":"14km ESE of Hyrum, Utah","time":1382026759900,"updated":1382079018263,"tz":-360,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/uu60041537","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/uu60041537.geojson","felt":190,"cdi":3.2,"mmi":3.25,"alert":null,"status":"REVIEWED","tsunami":null,"sig":260,"net":"uu","code":"60041537","ids":",uu60041537,","sources":",uu,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,shakemap,tectonic-summary,","nst":null,"dmin":0.07186522,"rms":0.14,"gap":57.6,"magType":"Ml","type":"earthquake","title":"M 3.6 - 14km ESE of Hyrum, Utah"},"geometry":{"type":"Point","coordinates":[-111.6838,41.6033,11.4]},"id":"uu60041537"},     {"type":"Feature","properties":{"mag":2.7,"place":"10km WNW of Shasta Lake, California","time":1382024460700,"updated":1382058287850,"tz":-420,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/nc72089531","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/nc72089531.geojson","felt":1,"cdi":2,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":112,"net":"nc","code":"72089531","ids":",nc72089531,","sources":",nc,","types":",dyfi,general-link,geoserve,nearby-cities,origin,phase-data,scitech-link,","nst":null,"dmin":0.06288207,"rms":0.13,"gap":90,"magType":"Ml","type":"earthquake","title":"M 2.7 - 10km WNW of Shasta Lake, California"},"geometry":{"type":"Point","coordinates":[-122.4883,40.7127,22.4]},"id":"nc72089531"},     {"type":"Feature","properties":{"mag":2.6,"place":"13km SSE of Volcano, Hawaii","time":1382022033300,"updated":1382022379514,"tz":-600,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/hv60578296","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/hv60578296.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":104,"net":"hv","code":"60578296","ids":",hv60578296,","sources":",hv,","types":",general-link,geoserve,nearby-cities,origin,","nst":null,"dmin":0.05389892,"rms":0.35,"gap":100.8,"magType":"Ml","type":"earthquake","title":"M 2.6 - 13km SSE of Volcano, Hawaii"},"geometry":{"type":"Point","coordinates":[-155.1912,19.3207,1.8]},"id":"hv60578296"},     {"type":"Feature","properties":{"mag":2.5,"place":"8km SSW of Volcano, Hawaii","time":1382019528300,"updated":1382055396752,"tz":-600,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/hv60578286","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/hv60578286.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"REVIEWED","tsunami":null,"sig":96,"net":"hv","code":"60578286","ids":",hv60578286,","sources":",hv,","types":",cap,general-link,geoserve,nearby-cities,origin,","nst":null,"dmin":0.00898315,"rms":0.1,"gap":54,"magType":"Ml","type":"earthquake","title":"M 2.5 - 8km SSW of Volcano, Hawaii"},"geometry":{"type":"Point","coordinates":[-155.2747,19.3675,31.6]},"id":"hv60578286"},     {"type":"Feature","properties":{"mag":3.1,"place":"19km W of West Bishop, California","time":1382017510600,"updated":1382072572313,"tz":-420,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/nc72089491","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/nc72089491.geojson","felt":2,"cdi":2.7,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":148,"net":"nc","code":"72089491","ids":",nc72089491,","sources":",nc,","types":",dyfi,focal-mechanism,general-link,geoserve,nearby-cities,origin,phase-data,scitech-link,","nst":null,"dmin":0.06288207,"rms":0.05,"gap":108,"magType":"Md","type":"earthquake","title":"M 3.1 - 19km W of West Bishop, California"},"geometry":{"type":"Point","coordinates":[-118.6773,37.3892,13.2]},"id":"nc72089491"},     {"type":"Feature","properties":{"mag":5.4,"place":"22km SSE of Lata, Solomon Islands","time":1382008392050,"updated":1382037346800,"tz":660,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kfhi","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kfhi.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":449,"net":"us","code":"b000kfhi","ids":",usb000kfhi,","sources":",us,","types":",cap,dyfi,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":6.06,"rms":0.99,"gap":59,"magType":"mb","type":"earthquake","title":"M 5.4 - 22km SSE of Lata, Solomon Islands"},"geometry":{"type":"Point","coordinates":[165.9252,-10.8982,62.8]},"id":"usb000kfhi"},     {"type":"Feature","properties":{"mag":4.2,"place":"131km S of Puerto El Triunfo, El Salvador","time":1381997360900,"updated":1382026310261,"tz":-360,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/usb000kfgf","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/usb000kfgf.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"reviewed","tsunami":null,"sig":271,"net":"us","code":"b000kfgf","ids":",usb000kfgf,","sources":",us,","types":",cap,dyfi,general-link,geoserve,nearby-cities,origin,phase-data,tectonic-summary,","nst":null,"dmin":1.708,"rms":1.35,"gap":184,"magType":"mb","type":"earthquake","title":"M 4.2 - 131km S of Puerto El Triunfo, El Salvador"},"geometry":{"type":"Point","coordinates":[-88.5719,12.0947,40.04]},"id":"usb000kfgf"}],"bbox":[-177.3712,-28.9952,1.8,165.9252,60.258,215.63]}


title: Projecting OpenStreetMap raster base in other projections

text: I know that OSM WMS service works with EPSG:4326 and EPSG:900913   I need to have an OSM base layer projected in another Projection, for example **EPSG:32632**   Do you know some way to do this?   Even Reproject WMS service, or download new tiles for Geoserver.


title: How to determine Plane Height for given Volume?

text: I have delineated a watershed for a dam in ArcGIS. I am doing some analysis and for that I have a preset volume value that have to be stored behind the dam. Can I determine the plane height that would match the given volume?


title: Auto generate map from natural earth data with QGIS or other utility

text: I'm looking at natural earth data to generate each country and save it as a png. What I'm using is: `10m_populated_places`, `10m_admin_0_countries` and `10m_land`. The populates places is the first layer, then the countries and then the land. For each of the countries I want to: 1) Filter populated places to `FEATURECLA = 'capital'` & `ADM0NAME` = country 2) Filter countries to `ADMIN` = country 3) Set the said country in the middle of the screen and save it as an image. For this I need to zoom in but leave some space around the country. I'm a complete beginner, what is the easiest way to accomplish this with QGIS or some other GIS software?


title: CRS centered on the 180 meridian?

text: The problem I'm dealing with is the old 180 meridian problem, except I'm not trying to plot or render shapes that cross it, I need to do intersections of lines that cross it. The only spherical function available in geotools appears to be orthodromic distance, so I need to do the intersections in 2d. Can I take the naive approach and simply copy the WGS83 WKT and change the PM to 180? I can't use the UTM zones because my lines are long (airport to airport, i.e. Hong Kong to Vancouver).


title: Unwanted lines when cutting & merging polygons

text: I am using QGIS version 1.8.0. Sometimes when I cut or merge polygons I get unwanted lines left in them. On zooming in to them they do not appear to be slivers. Is there a way of getting rid of these line, some kind or tidy feature or plugin? Thanks


title: How to add a raster to ArcMap if file name is unknown?

text: I have a raster file for which I know the the workspace, but not the filename (it is a temporary file generated by operations from my program that randomizes its name on creation, i.e. "ras457"). I cannot store the raster at time of generation for various reasons, so is there a way to programatically grab the raster from the folder without knowing its exact name and store it in an IGeoDataset? The raster is stored in a temporary folder created when I run the program, so it will be the only item in the folder. One route I have considered exploring is using .NET's directory info class to get the names of the contents of the folder and extracting it from there, but there may be a simpler way to accomplish this that I have not considered.


title: How to improve the color matching between a scanned image of a map and the original?

text: When I scan a section of paper map using a Canon Lide 200 A4 scanner, the resulting image has colours which are not true to the original.   The most annoying is where the predominantly white paper background of a map is rendered as a greyish blue colour instead of pure white. Processing in ESRI ArcEditor 9.2 such as clipping the image so that it can be butt joined and geo-referenced, results in even darker shades, even less true to the original. I need a very simple solution to this problem as I'm too old to start learning how to use Photoshop or similar image processing software. In finding a solution cost isn't the issue - The learning curve is.   Can anyone offer advice?


I have a raster in Quantum GIS and I am just exploring it. How can I see average of raster value over certain area, marked by mouse? In other words:   1. How can I select particular area in QGIS?   2. How can I compute average of raster value over that area?


title: How can I put the name of file in add field with python?

text: In my script, I have to create field in 15 layers. The name that I wold like to set in this new field is the same of the file's name. But all attempts that I did were worng. My script:               proj=arcpy.mapping.MapDocument("C:\\analise_mestrado\\analise_215_070.mxd")     fclist= arcpy.mapping.ListLayers(proj)     [<map layer u'20060902_215_070'>, <map layer u'20080721_215_070'>, <map layer u'20090622_215_070'>, <map layer u'20100609_215_070'>, <map layer u'20110527_215_070'>, <map layer u'20010616_215_070'>, <map layer u'20000731_215_070'>, <map layer u'19860911_215_070'>, <map layer u'19870509_215_070'>, <map layer u'19870525_215_070'>, <map layer u'19880628_215_070'>, <map layer u'19930525_215_070'>, <map layer u'19940816_215_070'>, <map layer u'19941104_215_070'>, <map layer u'19850722_215_070'>, <map layer u'19970605_215_070'>, <map layer u'19730726_231_070'>, <map layer u'19960618_215_070'>, <map layer u'20110714_215_070'>]      # Error for first attempt               for fc in fclist:         arcpy.AddField_management(fc,fc,"DOUBLE",12,2)     Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000840: The value is not a String.      # Other error, for second attempt               for fc in fclist:         arcpy.AddField_management(fc,str(fc),"DOUBLE",12,2)     Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000313: The length of Field Name must not be larger than 10        # Other error               for fc in fclist:         arcpy.AddField_management(fc,str(fc[:6]),"DOUBLE",12,2)     Runtime error <type 'exceptions.TypeError'>: 'Layer' object is unsubscriptable      Is there anyone who can help me?


title: Can you create a layer containing years of daily data, then extracting a specific area and time frame

text: So I have a tone of .nc files containing gridded rainfall and precipitation data in daily time steps. The data spans from 1980 to 2005 for all of Ireland. Now what I am hoping to be able to do is to combine these into Gridded_Temp and Gridded_Percip, then layer then on top of a map of Ireland with a catchment area file i've already created and extract the data that falls under the catchment area (and if I can also be able to choose a time frame for the data to be extracted). What i've done so far is: Make the catchment file using Grass Combined my temp and precipitation files and attempted to layer these on to my current map (I have kept the files in .nc format so that they include coordinate data). I tried adding the Gridded_temp layer but it came out as a black outline of Ireland, indicating to me that all the daily values combined together. Next I was going to see if I can use the clipper to try and extract the catchment area but I'm not sure if what im doing is at all correct as i've only just started using any sort of GIS programs about 3 weeks ago. So I was hoping to get some input from people who actually understand what they're doing if my plan is sound or just a waste of time. If what im doing just wont work, does anyone have any suggestions on how else I could do this?


title: Python Script: Automatically georeference photographs (To be used in ArcMap)

text: I have 563 photographs that have been taken as part of a site survey. The only location information that I have is a single GPS location (lat,long) at which the photograph was taken. I'm looking for a Python Script (ArcGIS) that will use the GPS location of each Photograph (Point Feature Class) and then based on a given width and height georeference each photograph. It's important to read the raster properties to determine if the image is portrait or landscape. Any sample python code (ArcPy) will be appreciated and any other alternative methods are welcome. Regards


title: Calculating compass bearing between two GPS coordinates... with a twist

text: I'm building a virtual tour application that uses Google's streetview code to render the panoramas into a non-distorted view. Each panorama has 1 to _n_ links where the user can select to move on. I use the GPS coordinates of each location to calculate the compass bearing from the current location to the next. The issue has to do with StreetView's rendering of the link bearings. When a panorama loads, one of the data fields required is `centerHeading`. This determines the part of the image that is rendered smack dab in the middle of whatever element you're using as a map container. In addition, whatever value `centerHeading` has is what StreetView sees as due north. The link rendering locations are displayed relative to north, which causes quite a bit of inaccuracy with the link bearings. Check out `[http://130.111.148.131/JMCTour/testIndex.php][1]` for an example. The bearing from the start location to the next is 247 degrees, as calculated from the GPS coordinates of each location. Due to the way the image was taken, the `centerHeading` value is 175 degrees, and this throws off the actual links quite a bit. In order to have a correct link bearing, I have to manually replace the calculated bearing of 247 degrees with 0. Multiply this trial and error bearing testing by over 100 seemingly arbitrary heading definitions, and you just might get a headache. So my question is, is there a way to factor in the location's heading setting in the link bearing calculations?


title: ArcGIS javascript API Update Records of a Feature Layer

text: I'm new to ArcGIS javascript API, now I want to create a feature layer and then add an array of attributes or simply update the array of attributes of a specific field. I only need to replace the original values array as my own array. Is that possible? There's a method: attr(name,value), Can I use this? Can any one give me some hints or code? Thanks in advance!


title: How to resize a polygon (rectangle or circle) in Qgis?

text: Yes I used the Rectangles Ovals plugin to create a rectangle then rotate it and move it nto position. But if you want to resize it that is where the fun starts because it is just a polygon with four corners, you can move them all independently so it is very hard to keep proportion or angles correct. A rectangle is four lines at right angles. To make it longer or wider you just need to be able to increase the length of two of the sides. A circle has many more "sides" so this would be harder to implement using measurements alone, but it could be done this way. I don't know if anyone has implemented a plugin that can do this resizing. I just know dragging the nodes to new positions is very tedious especially trying to keep a circle circular. Something that let me lengthen the individual sides is a quick-and-dirty way of increasing a polygon but there may be some better option. But the Rectangles and Ovals plugin only lets me draw new ones and if the new one is the wrong size I have to start again.


title: Why are font and line sizes different in QGIS's Print Composer and how do I normalize them?

text: Why does my map look so different when I look at it in the QGIS print composer? The widths of lines change, the size of markers change, the size of fonts change. Is there any way to have the two always in sync? My goal is generated a printed map so it's frustrating to have to load the Print Composer and then go back and tweak everything in the regular view. Everything is always smaller in the editor view and bigger in the print composer view. I feel like there's something obvious I'm missing or not getting. ![QGIS View](http://i.stack.imgur.com/lifLZ.jpg) ![Print Composer View](http://i.stack.imgur.com/TKcqR.png)


title: What are some advantages to using ArcSDE in your organization?

text: This is somewhat a general topic, but I need some advantages to using ArcSDE in my organization. We actually have SDE for our webmapping software, but we are unable to edit it using ArcGIS basic licenses. I'm trying to put together some sort of spread sheet showing cost savings of using SDE to the President who doesn't know how ArcGIS works. What are some of the cost savings that purchasing Standard licenses would give us. My company is small and just wants to start with 3 standard licenses and move on from there.


title: how can I set the StartBounds, units, and tileSize correctly in OpenLayers?

text: how can I set the StartBounds, units, and tileSize correctly in OpenLaters?I can not make sure this parameters,for I use jsonp,and it will dynamticly read layerinfo from esri rest resources.                var maxExtent = new OpenLayers.Bounds(102.9702000357959, 26.573810737410064, 110.21822155809812, 29.11729567697843);         baseLayer = new OpenLayers.Layer.ArcGISCache("baseMap", layerURL, {             isBaseLayer: true,             //numZoomLevels: 11,             StartBounds: maxExtent,             zoom: 5,             layerInfo: layerInfo,             projection: 'EPSG:' + layerInfo.spatialReference.wkt         });         console.log(layerInfo.spatialReference.wkt);         //console.log(baseLayer.spatialReference);         map = new OpenLayers.Map('map', {             StartBounds: maxExtent,             initialExtent: baseLayer.initialExtent,             maxExtent: maxExtent,             units: (baseLayer.units == "esriFeet") ? 'ft' : 'm',             resolutions: baseLayer.resolutions,             tileSize: baseLayer.tileSize,             eventListeners: { //set event handler                 "moveend": moveEvent},             //displayProjection: baseLayer.displayProjection             projection: 'EPSG:' + layerInfo.spatialReference.wkt         });


title: How to get City, State, Numeration, etc from OSM roads by Geofabrik?

text: I'm really new in this GIS world. I downloaded a shp file from Geofabrik (http://download.geofabrik.de/osm/south-america/chile.shp.zip) and imported it to Postgresql using Postgis. If I see the road table, this is the info that I get: http://grab.by/fHa4 Looking in internet, I understood that geom can give me some geographic info that I need (lat, long per example). But, I need to know more specific information about this polyline: City, State, numeration, etc. Is this info in geom column? Or in other part in this .shp? How could I get this information?


title: How can I copy archive data from one server to another?

text: I have an SDE 10.0 server and an SDE 10.1 server and I am trying to migrate the layers from 10.0 to 10.1. (On a side note the 10.0 server is running SQL Server 2005 and the 10.1 server is running SQL Server 2012.) Some of the layers have archiving turned on and there seems to be no way to transfer the layer as well as all of the archival information. Is there a way to copy the layer and also its archive? Alternately, can I just turn on archiving on the new server after transferring the layer, then copy the rows from the old server into the newly created archival table with a SQL tool (Import/Export Data)?


title: How to obtain road classification type at a point via nominatim?

text: This is my first time posting here so please forgive me if i ask a trivial question. Is there a way of obtaining the type of road an object is settled in from a request via nominatim? (i have the geocoded sample) For example: http://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1 does provide me with loads of info. yet, there is no info on the road the address is settled in. would like to obtain something like: rural road or even just grade*N* (where N stands for the level of hierarchy.) i hope what i'm looking for is understandable :) thanks in advance!


title: Using Qgis server with Ubuntu 12.04

text: I realise there had been many posts on this subject but unfortunately I need to post again. I've been banging my head against this all day. I'm trying to get qgis server working with Ubuntu 12.04 with no luck. I'm using Qgis 1.8 lisbora I used Synaptic package Manager to install all the necessary packages. Apache2 web server is running ok tested using [http://localhost/] returned "It Works!" Created a folder in /usr/lib/cgi-bin/ called project and copied qgis_mapserv.fcgi and wms_metadata.xml files into the project folder. /usr/lib/cgi-bin/ Created a .qgs project in desktop Qgis 1.8 and saved it directly to /usr/lib/cgi-bin/project Checked capabilities using: [http://localhost/cgi- bin/project/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities] in a browser url address bar. Get Capabilities shows the right CRS and the vector layer name but zero values for the bounding box and zero values for the lat/long bounding values. I've used absolute paths for the .qgs project file, changed the permissions for both the project file and the folder. I've also checked the path to the data files in the .qgs project file and it looks correct. I also removed the # at the first line of the httpd file. I think this is a problem with the bounding box and the lat/long bounding values. This was set in project properties dialogue box under >OWServer>Advertised extent> Use Current Canvas Extent. I'm at a loss as to what to do next. Any help would be greatly appreciated. Regards


title: How to import multiple textfiles in one step

text: Is ist possible to import multiple textfiles (csv, tsv etc.) as layers in one step or do i have to do it file by file?


title: Merging multiple tables to shape using for loop

text: I have to join multiple tables to a shapefile using a common field. I want to script this in python (i am using ArcGIS 10.1). Below is the script i am using. My question is As folks might notice, I am calling the tables one by one and merging them to the shape. I would like to put this in a for loop so the script reads all the tables (that have prefix dTable) and merge them to the shape. Just not sure how to proceed (I am very new to this. started just over a week ago). Any help will be appreciated.               #Redefine the workspace to the geodatabase          env.workspace = os.path.dirname(os.path.dirname(__file__))+'\\'+ out_name +'.gdb'     print "Workspace for GDB:"+ env.workspace          ################################################################################     #STEP 5: Start Joining Tables     # Set local variables          featureName = "temp_Streets"     layerName="Streets2"          outFeature = "temp_Streets2"     expression = "temp_Streets.FUNC_CLASS < 99"          ################################################################################     # Exclude centriod connectors from the shapefile before joining     try:          # Make a layer from the feature class         arcpy.MakeFeatureLayer_management(featureName,layerName)         print "Converting to Layer Done !"              # Select desired features from street layer         arcpy.SelectLayerByAttribute_management(layerName, "NEW_SELECTION", expression)         print "Selection Done !"              # Copy the layer to a new permanent feature class         arcpy.CopyFeatures_management(layerName, outFeature)         print "Copy to new layer Done !"              print "Step 5: Creating Streets file Done !"         print "#################################################"         arcpy.AddMessage("Creating Streets file Done !")     except:         print arcpy.GetMessages()     ################################################################################     joinTable1 = "dTable_HBW_csv"     layername1="j_Streets1"     outFeature1 = "temp_j_Streets1"     joinField = "CONNECT"          # Join the first CSV file     try:          # Make a layer from the feature class         arcpy.MakeFeatureLayer_management(outFeature,layername1)         print "Converting to layername1 Done !"              # Join the feature layer to a table         arcpy.AddJoin_management(layername1, joinField, joinTable1, joinField, "KEEP_ALL")         print "Join 1 Done !"              # Copy the layer to a new permanent feature class         arcpy.CopyFeatures_management(layername1, outFeature1)         print "Copy to new layer 1 Done !"              print "Step 5a: Joining Streets 1 file Done !"         print "#################################################"         arcpy.AddMessage("Joining Streets 1 file Done !")          except:         print arcpy.GetMessages()     ###############################################################################     joinTable2 = "dTable_HBO_csv"     layername2="j_Streets2"     outFeature2 = "temp_j_Streets2"     joinField2 = joinTable1+"_CONNECT"          # Join Second CSV file     try:          # Make a layer from the feature class         arcpy.MakeFeatureLayer_management(outFeature1,layername2)         print "Converting to layername2 Done !"              # Join the feature layer to a table         arcpy.AddJoin_management(layername2, joinField2, joinTable2, joinField, "KEEP_ALL")         print "Join 2 Done !"              # Copy the layer to a new permanent feature class         arcpy.CopyFeatures_management(layername2, outFeature2)         print "Copy to new layer 2 Done !"              print "Step 5b: Joining Streets 2 file Done !"         print "#################################################"         arcpy.AddMessage("Joining Streets 2 file Done !")          except:         print arcpy.GetMessages()


title: Mod Tile Cache Size

text: I am using Mod Tile, Renderd and Mapnik to creat a Tile Server. My question here is, does mod_tile have specific limits for the cache size? If yes, where can it be configured. And what mechanism it uses to regulate the cache? I mean removing older images and if yes then for what zoom etc.


title: How to auto-start a pyQGIS thread?

text: having build some (two) minor plugins, it's now time for me to link a few (perl-) applications to qgis. As there is no perl-interface in qgis I thought the best way to link both worlds together is a kind of messaging system. It should work like tis:   * the perl-app sends a message to a certain folder   * qgis starts a separete loop which looks every second, whether there is an incoming message in that folder   * Qgis performs the necessary stuff an deletes the message again.   * Or vice versa. My question is how to start such a loop in qgis and how to do this at qgis- startup. By the way - is there a possibility to "automate" QGis from external python applications? And if so is there any example code? Thanks and regards


title: PostGIS Group By Error

text: I am performing a pretty simple query in PostGIS 2.1.1 from within QGIS 2.2 for Windows (using the DB Manager plugin). I have a table with many columns and I am trying to perform a Group By function. However, PostGIS returns an error when I do not add all the columns from my SELECT call within the GROUP BY call (see below). **ORIGINAL QUERY**               SELECT city, state, city_abbr     FROM "public".footprints     WHERE city_abbr = 'nyc'     GROUP BY city      This query returns the following error:               column "footprints.state" must appear in the GROUP BY clause or be used in an aggregate      function     LINE 1: SELECT city, state, city_abbr      If I change my query to the following, it runs. **ALTERED QUERY**               SELECT city, state, city_abbr     FROM "public".footprints     WHERE city_abbr = 'nyc'     GROUP BY city, state, city_abbr      I do not want to have to add each column to my GROUP BY statement. Can anyone shed any light on why this would be happening. Thanks... **EDIT** Here is an example of the data in the table               gid   | city      | state   | city_abbr     ______________________________________     0        boston      ny         bos     1        manhattan   ny         nyc     2        brooklyn    ny         nyc     3        newark      nj         nyc     4        denver      co         den     5        seattle     wa         sea


title: Creating contiguous pixel based cartogram using ArcGIS for Desktop?

text: There are several types of cartograms out in the world, but I feel the best one are the continuous cartograms made with separate pixels. I recently made one on paper and then transcribed it to excel by filling in each cell with different colors. This was time consuming and disheartening. Is there a straightforward way of doing a similar cartogram in ArcGIS? Examples ![Credit: improving- visualisation.org](http://i.stack.imgur.com/sNnsn.jpg) ![Credit: Reuters electoral college map](http://i.stack.imgur.com/4KzQ4.jpg)


title: ArcGIS arcpy code fails in Toolbox mode

text: This code executes correctly in Python window but fails with > ERROR 000732: Input Table: Dataset JHJ does not exist or is not supported               # Import ArcPy and other required modules     import arcpy     from arcpy import env     import fileinput     import string     import os     env.overwriteOutput = True     filud=file(r"c:\temp\dum.txt","w")     # Open file for debug output     filud.write("Hello \n")     try:        # Will create shape file fcname.shp        arcpy.CreateFeatureclass_management(r"C:\temp\TestArcGis\FraFil","JHJ","Polyline")        filud.write(str(time.time()) + " After create \n")     except Exception as e:        filud.write(str(time.time()) + "Error: " + e.message + "\n")     try:        # Add fields for data        filud.write(str(time.time()) + " Before Addfield " + "JHJ" + "\n")        arcpy.AddField_management("JHJ","Sbet","TEXT")     except Exception as e:       print e.message       filud.write("Error: " + e.message)     filud.close()


title: Arcpy Subtracting rasters error - TypeError: 'unicode' object is not callable

text: I have a script which subtracts 2 versions of the same raster from each other (one newer than the other) and then extracts the additions & deletions that have happened. I created a simple test script which works:               # Import arcpy module     import arcpy     from arcpy import env     from arcpy.sa import *          # Check out any necessary licenses     arcpy.CheckOutExtension("spatial")               # Local variables:     New = "C:\\Data\\JOB_13\\tq03\\ABRdsText.tif"     Old = "D:\\Data\\Job_Backups\\JOB_13\\tq03\\ABRdsText.tif"     Addition_Raster = "C:\\Testing\\District_Editor\\QC_ChangePlots\\JOB_13\\tq03\\Additions\\output.tif"     Deletion_Raster = "C:\\Testing\\District_Editor\\QC_ChangePlots\\JOB_13\\tq03\\Deletions\\output.tif"          arcpy.MakeRasterLayer_management(New, "N")     arcpy.MakeRasterLayer_management(Old, "O")               # Process: Raster Calculator     RR = Raster("N") - Raster("O")          # Process: Extract by Attributes     arcpy.gp.ExtractByAttributes_sa(RR, "VALUE =-255 OR VALUE =0", Addition_Raster)          # Process: Extract by Attributes (2)     arcpy.gp.ExtractByAttributes_sa(RR, "VALUE =255 or VALUE=0", Deletion_Raster      I then replicated this into my main script:               #import the necessary modules     import arcpy     from arcpy import env     from arcpy.sa import *     import os          #Checkout the necessary Arc licences     arcpy.CheckOutExtension("spatial")          #Ask the user for the job number     #Job_Number = arcpy.GetParameterAsText(0)     # MANUAL OVERIDE TO GET TEST JOB_NUMBER     Job_Number = 13     Job = 'JOB_'+str(Job_Number)          ####################################################     #Folder where all data will be written to     OutputsDirectory = r"C:\Testing\District_Editor\QC_ChangePlots"          ####################################################     #Folder with the backed up data pre-editing i.e. old data     BackupDirectory =r"D:\Data\Job_Backups"          ####################################################     #Location of the QC Change plot Master mxd     ChangePlot_mxd = r"Y:\esriuk\OSBurnProcessGPTools\resources\mxdHolder\QC_ChangePlot.mxd"          ####################################################     #Location of the Job folder     DataFolder = os.path.join("C:\\Data\\",Job)          ####################################################          JobF = os.path.join(OutputsDirectory,Job)          for folder in os.listdir(DataFolder):         arcpy.env.workspace = DataFolder + "\\" + str(folder)         Ras = arcpy.ListRasters("*", "TIF")         for Raster in Ras:             #Set the output rasters             Additions = os.path.join(JobF + "\\" + str(folder) + "\\Additions\\"+ str(Raster))             Deletions = os.path.join (JobF + "\\" + str(folder) + "\\Deletions\\"+ str(Raster))                  #Set the file paths for the new and old rasters             New = os.path.join(str(DataFolder) +"\\" + str(folder) + "\\" + str(Raster))             Old = os.path.join(str(BackupDirectory) + "\\" + str(Job) + "\\" + str(folder) + "\\" + str(Raster))                  #Convert the Raster datasets into a temporary Raster Layer so that they can be used for a calculaion             arcpy.MakeRasterLayer_management(New, "N")             arcpy.MakeRasterLayer_management(Old, "O")                       #Raster Calculator - subtract the old raster from the new raster ( new - old)             CalculatedRast = Raster("N") - Raster("O")                            #Extract the Additions             arcpy.gp.ExtractByAttributes_sa(CalculatedRast, "VALUE =-255 OR VALUE =0", Additions)                       #Extract the deletions             arcpy.gp.ExtractByAttributes_sa(CalculatedRast, "VALUE =255 or VALUE=0", Deletions)      However, I get the error               Traceback (most recent call last):       File "C:\Python27\ArcGIS10.1\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript         exec codeObject in __main__.__dict__       File "S:\Development\Dan\GIS\Code\District_Editor\QC_ChangePlots.py", line 204, in <module>         CalculatedRast = Raster("N") - Raster("O")     TypeError: 'unicode' object is not callable      Anybody able to suggest where I am going wrong and how to fix it? I'm fairly new to python, so it's probably something quite simple! The error seems to be here               CalculatedRast = Raster("N") - Raster("O")


title: Intersection of two lines tool

text: Is there any way to make intersection of two lines tool with extending lines option, so the result would be a point. the hardest part is when the lines have to be extended to intersect. the tool will intersect int the cases described in the picture below. this operation is a common CAD operation but i haven't found a tool or a snippet to do it in Arcobjects or Arcgis Engine 10.1. Any help please. ![enter image description here](http://i.stack.imgur.com/UMEuw.png)


title: Customized popup in Openlayers

text: I have done point layer overlay with openlayer. Whenever i click any point, its showing me all the data of the table(postgresql) in popup. How to control amount of data in the popup? All the columns are being displayed in popup. I just want location_name to be displayed in the popup. how to extract location_name from event.text? Code is:               ....     info = new OpenLayers.Control.WMSGetFeatureInfo({         url: 'http://localhost:8080/geoserver/layername/wms',  // geoserver point layer          title: 'Identify features by clicking',         queryVisible: true,         eventListeners: {             getfeatureinfo: function(event) {                 map.addPopup(new OpenLayers.Popup.FramedCloud(                     "ABCD",                      map.getLonLatFromPixel(event.xy),                     null,                     event.text,                     null,                     true                 ));             }         }     });     map.addControl(info);     info.activate();


title: From local tiles to WMS via Mapproxy

text: I have any local tiles (seed via Mapproxy) of any local area. May I configure mapproxy that I can use a local tile directory on my computer as a source and get the output then WMS ? I've already configured mapproxy.yaml which has this lines: services:               demo:       wms:         srs: ['EPSG:3857', 'EPSG:4326', 'EPSG:3395']         # image_formats: ['image/jpeg', 'image/png']         md:           # metadata used in capabilities documents           title: MapProxy WMS Proxy           abstract: This is the fantastic MapProxy.           online_resource: http://mapproxy.org/           contact:             person: Your Name Here             position: Technical Director             organization:              address: Fakestreet 123             city: Somewhere             postcode: 12345             country: Germany             phone: +49(0)000-000000-0             fax: +49(0)000-000000-0             email: info@omniscale.de           access_constraints:             This service is intended for private and evaluation use only.             The data is licensed as Creative Commons Attribution-Share Alike 2.0             (http://creativecommons.org/licenses/by-sa/2.0/)           fees: 'None'          layers:       - name: Testing tiles         title: Testing tiles         sources: [osm_cached]     caches:       osm_cached:         grids: [gmaps_grid]         sources: []         cache:          type: file          directory_layout: tms          grids:       gmaps_grid:         tile_size: [256, 256]         srs: EPSG:3857         origin: nw      But cannot see the results, just empty page whout scrolling Please explain should I use cache->directory_layoutORdirectory? If so how does it look?


title: Add a new field in a already created feature class

text: I have a feature class. On the basis of some calculation, I want to create a new field in that table and set value of that field. To do so, my algorithm is:               void UpdateFeatureClass(IFeatureClass featureClass, List<Edge> edges)     {         CreateField(featureClass);         UpdateDictionary(featureClass);         UpdateFieldValue(edges);     }      To add a field I use following code snippet:               private void CreateField(IFeatureClass featureClass)     {         IFields oldFields = featureClass.Fields;         IFieldsEdit fieldsEdit = (IFieldsEdit)oldFields;              IField field = new FieldClass();         var fieldEdit = (IFieldEdit)field;         fieldEdit.Name_2 = "Value";         fieldEdit.Type_2 = esriFieldType.esriFieldTypeInteger;         fieldsEdit.AddField(field);     }      Update dictionary basically creates a dictionary with all features of the feature class. The key of the dictionary is feature's OID and value of the dictionary is the feature. After that I am trying to update features with value in the value field. The code snippet is:               private void UpdateFieldValue(List<Edge> edges)     {         int fieldIndex = dictionary[0].Fields.FindField("Value");         if (fieldIndex != -1)         {             foreach (Edge edge in edges)             {                 var feature = _dictionary[edge.PolylineEdge.OID];                 feature.set_Value(fieldIndex, edge.Value);                 feature.Store();             }         }     }      Everything works fine for me except the feature.Store() command. Whenever this line executes, `'System.Runtime.InteropServices.COMException'` exception occurs. From my perspective, if there is any problem with set value, the error should occur in that statement. I couldn't find out any pointer why the store command creates the error. Can anyone please help me to find why the error is occurring? **EDIT :** I tried to store value in different fields of the feature and succeeded. Only updating the value of the newly created field, gives the exception.   * Error message: "Error encoding INFO item during save"   * Error code: (-2147220133) **EDIT :** I think the problem is the newly created field is not permanent. after adding the field, I go through the feature class and the newly created field is here. But whenever I close the ArcMap and open a new ArcMap, I find that the newly added field is vanished. So, I think the problem is the change is not permanent. So, My question is **how to create a field in a already created feature class permanently?** Thanks


title: PostGIS schemas doesn't show in QGIS

text: I try to use QGIS to display some data stored in PostGIS, some of schemas don't show except public; And it's a testing DB, so I have only one super user: postgres. I use PostgreSQL9.3. Anyone has some suggestion? Thanks.


title: Is there public OGC Catalog Service (CSW) available which lets ArcGIS for Desktop with CSW Client Add (WMS) To Map?

text: This is a follow on from a Question that I asked last year entitled **Is there a public OGC Catalog Service (CSW) available?**. That Question has an Accept- ed Answer but I would now like to expand upon the question slightly. Is there a public OGC Catalog Service (CSW) available which serves URLs that can be bound to as **Live Data and Maps** by **ArcGIS for Desktop 10.2** ? I would like to learn of a CSW service URL (with its Profile specified) that I could use to Configure the **CSW Client of ArcGIS for Desktop 10.2** so that I can see it add a WMS service to ArcMap by using the Add to Map button rather than by using copy/paste of URLs. A Comment on my Answer to **this question** says that it is possible but I do not recall ever being able to do it personally, including during tests I performed yesterday using the latest versions of ArcGIS for Desktop and its CSW Client.


title: Import raster into ArcGIS

text: I received raster data from a grid of 1100 by 1000 meters with a resolution of 1 meter. It is the output of EFC-400 software showing the field strength around power lines. The data is currently in Excel format and I want to use the raster in ArcGIS 10.2. In Excel the raster looks as follows:               x\y[m]                               B[uT]   0   1   2   3   4   5   6       0   0.01    0.01    0.01    0.01    0.01    0.01    0.01       1   0.01    0.01    0.01    0.01    0.01    0.01    0.01       2   0.01    0.01    0.01    0.01    0.01    0.01    0.01        etc... The second row indicates the y-direction (0-1000 meters) and the first column indicates the x-direction (0-1100 meters). I assumed that removing the first 2 rows and the first column and subsequently adding the header that ArcGIS expects would make the import in ArcGIS possible. I added the following header to the Excel sheet: > ncols 1001   >  nrows 1101   >  xllcorner 0   >  yllcorner 0   >  cellsize 1   >  nodata -9999 and saved the data in .txt format. In Notepad I made sure that all datavalues were separated by a space. In ArcGIS I used 'ASCII to raster'. This gave no error message, but the shape of the resulting raster does not resemble the original raster: ![ascii to raster error](http://i.stack.imgur.com/t0jHq.png) The raster should show two powerlines approaching each other. Anyone any suggestions?


title: Can SqlWorkspaceFactory connection files be created with ArcGIS Desktop?

text: With ArcObjects, I can use `IWorkspaceFactory.Create` I can create a connection file for a SqlWorkspaceFactory. Is there an out-of-the-box method to create the same file in ArcGIS Desktop? **Update:** I tried the Create SDE Connection GP tool approach. I am unable to Open with the OpenFromFile method. The files are the same length but different when compared.   ![enter image description here](http://i.stack.imgur.com/HkDC2.png) **Update 2:** I experience the same result in ArcGIS 10.2.


title: Create a mask for a 3 Band Raster Image with surrounding white areas

text: How do I create a mask in order to clip a 3 band raster image so that the surrounding white area does not display. My thinking is to use Raster Calculator to create the mask or cut all three bands on the basis of the white area outside of the image having Band 1=255, Band2+255 and Band3=255. I'm not sure how to create this nested statement though. Would I have to do this band by band and then recompile using "Build Virtual Raster"? Thanks.


title: Help converting Aerial file

text: I am mapping utilities for a small town in Iowa. I have shape files of my water, gas and sewer lines, fire hydrants, ect. I also have a aerial view of the town that was taken in state plane. When I bring that aerial file into the project I cannot see any of my utilities that I have already set up. the shape files are set to NAD83/UTM Zone 15N EPSG:26915.I am just learning the software so any help would be appreciated.


title: How to extract X Y coordinates and RGB from pixels using python in QGIS?

text: I'm trying to white a Python plugin in QGIS (2.2) to get, for each pixel of a raster image, its X Y coordinates, as well as, its RGB (3 bands) values. At first I opened the raster file using: rlayer = QgsRasterLayer(rfileName, rbaseName) Now I don't know how to get, for example, for pixel (1,1) its coordinates (X,Y) and its RGB color values. Anybody could help me? I know that I'll need to implement a DO WHILE, but I don't know the commands to extract this information of each pixel. Thanks in advance, Mateus


title: OpenLayers/Extjs/Mapfish put permaink in menubar

text: I solved my problem Problems getting openlayers permalink working on how to get the maps view permalink but now I want to put the permalink in the toolbar instead of reloading the page with the permalink. I would like a popup like the one here on stackexchange when you click the "Link" under the post. That pops up a box with the URL selected. Here is my map: http://babkart.no/ and the toolbar is like this now:               var setToolbarContent = function() {          toolbar.addControl(             new OpenLayers.Control.ZoomToMaxExtent({                 map: map,                 title: 'Zoom til kartets maksimumsvisning'             }), {         iconCls: 'zoomfull',         toggleGroup: 'map'     }             );          addSeparator();          toolbar.addControl(             new OpenLayers.Control.ZoomBox({                 title: 'Zoom inn: klikk i kartet eller bruk venstre museknapp for å tegne en rektangel'             }), {         iconCls: 'zoomin',         toggleGroup: 'map'     }             );     toolbar.addControl(             new OpenLayers.Control.ZoomBox({                 out: true,                 title: 'Zoom ut: klikk i kartet eller bruk venstre museknapp for å tegne en rektangel'             }), {         iconCls: 'zoomout',         toggleGroup: 'map'     }             );     toolbar.addControl(             new OpenLayers.Control.DragPan({                 isDefault: true,                 title: 'Pan kartet: hold venstre museknapp inne og dra i kartet'             }), {         iconCls: 'pan',         toggleGroup: 'map'     }             );     toolbar.addControl(             new OpenLayers.Control.DragPan({                 title: 'Vis info: klikk på et ikon for å vise mere informasjon'             }), {         iconCls: 'info',         toggleGroup: 'map'     }             );


title: Unsplitting Zpolylines without flattening vertical line segments?

text: Trying to figure out how to fully keep vertical line segments when using Dissolve/unspit lines... The first image shows the original Zlines in Arcscene ![enter image description here](http://i.stack.imgur.com/tXXWN.jpg) The second image is the result of a Dissolve /Unsplit lines ![enter image description here](http://i.stack.imgur.com/KZeAu.jpg) Vertical Segment (identical x, y but different z) are missing, the vertex are deleted and not simply stacked. This is a known Problem (already identified with ArcGis10.0 but apparently unsolved) : _http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002t00000010000000_ Looking for some workaround, I found an earlier Q&A titled Vertical lines in a polygon shapefile. It could be one of the step of a larger process. Has anyone had to deal with dissolving/unsplitting vertical Segment? Any tips, ideas, comments, opinions, feedback of experiments, bits of coding would be welcome. Using ArcGis Adavnced 10.2 + full Version of Edit Tools, FME, QGIS (AutoCAD is available, though no expert user on site).


title: How to read the GEOMETRY table inside a sqlite database

text: I'm working on an android app which should display some lineobjects stored in a sqlite database. This sqlite database is created through an export in QuantumGIS.               My first question is it a real sqlite database or is it a so called spatialite database?      But my main question is `how to read the column GEOMERTY`. This column has the dataformat BLOB. When i open my database with a tool called SQlite database browser this column is empty. When i open the same database with the Firefox extension SQLite Manager it gives me a value like `X'01020000000200000089C8500C60FC2A403D2E994C25404A405C51DE4DDCFC2A40BA85E1865A404A40'`. And when i open this database on an android device it gives me a value like `[B@408acb78` for the GEOMETRY column. Which markup language is used for this column? Is it Well-known text, well- known binary or something totaly different? Does anyone know some answers for my questions? Or maybe even someone worked on a similar project (display objects from a sqlitedb on an android device)? Thanks for any answers...


title: Are there Open Source alternatives to ArcGIS Aggregate and Extract Value to Points?

text: I am looking for some kind of Open source GIS library which can perform spatial analytic functions same as ArcGIS. My use case is : I am processing GeoTIFF file provided by USGS and performing Aggregate and Extract Values to Points functions from ArcGIS. Once I have result in GeoDatabase I create Text File out of that, that's all I do. Instead of using Aggregate and Extract Value to Points function from ArcGIS I want to use some open source. Any thought? Thanks in advance.


title: Making POINT from longitude/latitude coordinates in existing table using PostGIS?

text: I would like to make a POINT using the longitude and latitude columns of an existing table.   Here's a link to the documentation of ST_MakePoint. Here's my table:                 CREATE TABLE sysinst.bio (           oid INTEGER PRIMARY KEY,           longitude FLOAT,           latitude FLOAT,               geom GEOMETRY(POINT, 26913)     );      Adding Geometry Column:               SELECT AddGeometryColumn ('sysinst', 'bio', 'geom', 26913, 'POINT', 2);      Here's my query:                 UPDATE sysinst.bio SET geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 26913);      No returned error though the POINTS are wrongly plotted when viewed in QGIS. For `(-97.5959, 21.1922)` , I recieve `(-109.4896, 0.0002)` Any suggestions? I'm open to doing this more efficiently if there's an easier way.


title: Pick random points in an earth circle

text: All I need is the ability to create random points within a radius of another point. so given `self.fence.latitude` and `self.fence.longitude` and `self.fence.radius` I should be able to generate random points with the following code (i'm writing in python/django and using numpy but all these calcs can be done using the standard math library) for whatever reason my points are showing up in a line. I need random points.               # angle for this random point     angle = numpy.float128(2 * numpy.pi * numpy.random.random_sample())     # radius from fence center     radius = numpy.float128(self.fence.radius) * numpy.random.random_sample()          # diff from ceneter in radians     latitudinal_diff_rad = radius * numpy.sin(angle) / numpy.float128(settings.EARTH_RADIUS)     longitudinal_diff_rad = radius * numpy.cos(angle) / numpy.float128(settings.EARTH_RADIUS)          # radians to degrees     latitudinal_diff = latitudinal_diff_rad * 180 / numpy.pi     longitudinal_diff = longitudinal_diff_rad * 180 / numpy.pi          try :          # create the item         item = Item(             latitude = numpy.float128(self.fence.latitude) + latitudinal_diff,             longitude = numpy.float128(self.fence.longitude) + latitudinal_diff,         )         item.save()          except IntegrityError, e :         continue         print e      ![stupid line](http://i.stack.imgur.com/4aHYo.png) What am i doing wrong? ### Edit               # this was the math I was using before I simplified it and switched to numpy lib     distance_from_point = float(self.fence.radius) * random.random()     unit_length = distance_from_point / settings.EARTH_RADIUS     longitudinal_diff_rad = ((unit_length) * (2 * random.random() - 1))     latitudinal_diff_rad = math.acos(math.cos(unit_length) / math.cos(longitudinal_diff_rad))


title: Erase features from feature classes based on record ID?

text: This is the challenge: I have two feature classes, which have the same number of polygon features, that when overlaid form concentric "rings." I need to erase the inner circle from the outer circle for each feature, **matching them by their record ID**. So, if both feature classes 1 and 2 have records A, B, and C, I want to erase the polygon of Record A in FC2 from Record A in FC1, RecordB in FC2 from Record B in FC1, etc. ArcGIS' Erase function will only take the entirety of the feature class and erase from them - I can't find a way to link up records by their feature ID. I'm working with Arc10.1 with all licenses. LATEST EDITS: I've replaced the useless code from before with this revised snippet below, but now I need a bit of guidance - I can't find where in here that I am over-writing the output. It works! However the script leaves me with a single donut feature output. Can you help me spot my error?               #Test script: select record from a VTR and erase it from another, matching selected record          import os     import sys     import arcpy     from arcpy import env     import time          #Set overwrote output     arcpy.env.overwriteOutput = True     print arcpy.env.overwriteOutput          workspace = "C:\\BOEM\\pt_buff3\\"               fileList = []     buffersd4 = []     buffersd3 = []     recordID3 = []     recordID4 = []          buffs = workspace+"buffer.gdb"     directorypath = buffs          #create new results_feature class          for dirpath, dirnames, buffs in arcpy.da.Walk(directorypath,                                                   datatype="FeatureClass",                                                   type="Polygon"):     for buff in buffs:              if buff.endswith(str("d4")):            # buffersd4.append(buff)             #print buffersd4            print buff            buffbits4=buff.split('_')            print buffbits4[2]            buffersd4.append(buff)            field = ['APR16_ID']            APR16_ID = [row[0] for row in arcpy.da.SearchCursor(workspace+"buffer.gdb\\"+buff,(field))]            print APR16_ID            for ID4 in APR16_ID:                ID4split = ID4.split('_')                selectID4 = ID4split[1]                #print selectID4              if buff.endswith(str("d3")):            # buffersd4.append(buff)             #print buffersd4            print buff            buffbits3=buff.split('_')            print buffbits3[2]            buffersd3.append(buff)            field = ['APR16_ID']            APR16_ID = [row[0] for row in arcpy.da.SearchCursor(workspace+"buffer.gdb\\"+buff,(field))]            print APR16_ID            for ID3 in APR16_ID:                ID3split = ID3.split('_')                selectID3 = ID3split[1]               # print selectID3     print selectID4     print selectID3     if selectID4 == selectID3:         print "yay they match!"              #make feature layer of feature d4 for FCs in buffersd4:         for fc in buffersd4:             in_feat=workspace+"buffer.gdb\\"+fc             out_layer4= fc+"_lyr"             arcpy.MakeFeatureLayer_management(in_feat,out_layer4)             print arcpy.GetMessages()         #select record in fc_layer             #where_clause4=""" "APR16_ID" = """ + str(selectID4)             where_clause4=""" "APR16_ID" = """ + "'"+ID4+"'"             arcpy.SelectLayerByAttribute_management(out_layer4,"NEW_SELECTION",where_clause4)             print arcpy.GetMessages()              #make feature layer of feature d3         for fc in buffersd3:             in_feat=workspace+"buffer.gdb\\"+fc             out_layer3= fc+"_lyr"             arcpy.MakeFeatureLayer_management(in_feat,out_layer3)             print arcpy.GetMessages()         #select record in fc_layer             #where_clause3=""" "APR16_ID" = """ + str(selectID3)             where_clause3=""" "APR16_ID" = """ + "'"+ID3+"'"             arcpy.SelectLayerByAttribute_management(out_layer3,"NEW_SELECTION",where_clause3)             print arcpy.GetMessages()           #execute Erase function(erase d3 from d4)             out_feat = "C:\\BOEM\\Donuts\\donuts_output.gdb\\"+"donut_d4_"+ID4             arcpy.Erase_analysis(out_layer4, out_layer3,out_feat,"")             print arcpy.GetMessages()              print "done rolling through records in this feature class."              print "done going through the buffers in the fGDB"                   #celebrate                                          `      ![I hope this handy diagram will help illustrate what the heck I'm trying to do...](http://i.stack.imgur.com/Xok7W.jpg)


title: How to create a drop-down list of geoprocessing tasks?

text: I need to construct a drop down menu with each choice enabling a different geoprocessing task to run over my script.               <select id="myList" onchange="environment()">        <option>Select..</option>        <option value="http://********/arcgis/rest/services/EDDM/selectZIP/GPServer">DEV</option>        <option value="http://********/arcgis/rest/services/EDDM/selectZIP/GPServer">SIT</option>          <option value="http://********/arcgis/rest/services/EDDM/selectZIP/GPServer">CAT</option>        <option value="http://********/arcgis/rest/services/EDDM/selectZIP/GPServer">PROD</option>     </select>      They each run the same process albeit at different levels of production. I have this code that is a placeholder and uses just one value.               function selectZIP(Zip_code){         gp = new esri.tasks.Geoprocessor("http://********/arcgis/rest/services/EDDM/selectZIP/GPServer/selectZIP");       How can I make a drop-down that will allow the user to select which GPServer they need and use it on the same script?


title: Problem with loading ArcGIS Javascript API sample locally

text:
I'm new to the ArcGIS Javascript API and I'm trying to set up a local development environment for a web application. I'm having trouble with getting on of the example scripts provided by ESRI to load correctly when opened locally (Code 1 below). This code retrieves a map service hosted in ArcGIS online addeds to the application. I need to be able to retrieve a map service created in ArcGIS Online into an application i want to build, but when I tested this out using ESRI's example script locally on my machine, I get an error (Error 1 below). I have Tomcat 7 running locally on my machine, listening on port 80 with the service started. I believe its not a configuration or firewall issue since I am able to load another of the example scripts just fine (Code 2 below). Due to the fact that Chrome's console logged an error for the init function in Code 1, I think the issue lies with something happening in this function. Any explanations as to why this may be happening would be greatly appreciated. Thank you in advance Code 1 (html file does not load successfully):               <!DOCTYPE html>                 <title>Create a Web Map</title>       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">       <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">            <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">

                  Error 1:               Failed to load resource file://www.arcgis.com/sharing/rest/content/items/1a40fa5cc1ab4569b79f45444d728067?f=json     _577 {stack: "Error: Unable to load file://www.arcgis.com/sharin…cgisonline.com/jsapi/arcgis/3.5compact/:15:99992)", message: "Unable to load file://www.arcgis.com/sharing/rest/…1a40fa5cc1ab4569b79f45444d728067?f=json status: 0", response: Object, status: 0, responseText: ""…}     _ssl: undefined     log: undefined     message: "Unable to load file://www.arcgis.com/sharing/rest/content/items/1a40fa5cc1ab4569b79f45444d728067?f=json status: 0"     response: Object     getHeader: function (_402){return this.xhr.getResponseHeader(_402);}     arguments: null     caller: null     length: 1     name: ""     prototype: Object     constructor: function (_402){return this.xhr.getResponseHeader(_402);}     __proto__: Object     __proto__: function Empty() {}     <function scope>     options: TMP     handleAs: "text"     headers: TMP     ioArgs: Object     timeout: 60000     __proto__: Object     data: null     headers: Object     Content-Type: "application/x-www-form-urlencoded"     __proto__: Object     method: "GET"     query: null     sync: false     __proto__: Object     __defineGetter__: function __defineGetter__() { [native code] }     __defineSetter__: function __defineSetter__() { [native code] }     __lookupGetter__: function __lookupGetter__() { [native code] }     __lookupSetter__: function __lookupSetter__() { [native code] }     constructor: function Object() { [native code] }     hasOwnProperty: function hasOwnProperty() { [native code] }     isPrototypeOf: function isPrototypeOf() { [native code] }     propertyIsEnumerable: function propertyIsEnumerable() { [native code] }     toLocaleString: function toLocaleString() { [native code] }     toString: function toString() { [native code] }     valueOf: function valueOf() { [native code] }     status: 0     text: ""     url: "file://www.arcgis.com/sharing/rest/content/items/1a40fa5cc1ab4569b79f45444d728067?f=json"     xhr: XMLHttpRequest     onabort: null     onerror: null     onload: null     onloadend: null     onloadstart: null     onprogress: null     onreadystatechange: null     readyState: 0     response: ""     responseText: ""     responseType: ""     responseXML: null     status: 0     statusText: ""     upload: XMLHttpRequestUpload     onabort: null     onerror: null     onload: null     onloadend: null     onloadstart: null     onprogress: null     __proto__: XMLHttpRequestUpload     addEventListener: function addEventListener() { [native code] }     constructor: function XMLHttpRequestUpload() { [native code] }     dispatchEvent: function dispatchEvent() { [native code] }     removeEventListener: function removeEventListener() { [native code] }     __proto__: Object     withCredentials: false     __proto__: XMLHttpRequest     __proto__: Object     __defineGetter__: function __defineGetter__() { [native code] }     __defineSetter__: function __defineSetter__() { [native code] }     __lookupGetter__: function __lookupGetter__() { [native code] }     __lookupSetter__: function __lookupSetter__() { [native code] }     constructor: function Object() { [native code] }     hasOwnProperty: function hasOwnProperty() { [native code] }     isPrototypeOf: function isPrototypeOf() { [native code] }     propertyIsEnumerable: function propertyIsEnumerable() { [native code] }     toLocaleString: function toLocaleString() { [native code] }     toString: function toString() { [native code] }     valueOf: function valueOf() { [native code] }     responseText: ""     stack: "Error: Unable to load file://www.arcgis.com/sharing/rest/content/items/1a40fa5cc1ab4569b79f45444d728067?f=json status: 0↵    at Error (<anonymous>)↵    at new _577 (http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/:15:141016)↵    at XMLHttpRequest._3f3 (http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/:15:99992)"     status: 0     xhr: XMLHttpRequest     onabort: null     onerror: null     onload: null     onloadend: null     onloadstart: null     onprogress: null     onreadystatechange: null     readyState: 0     response: ""     responseText: ""     responseType: ""     responseXML: null     status: 0     statusText: ""     upload: XMLHttpRequestUpload     withCredentials: false     __proto__: XMLHttpRequest     __proto__: TMP     constructor: function (_578){if(base===Error){if(Error.captureStackTrace){Error.captureStackTrace(this,_577);}var err=Error.call(this,_578),prop;for(prop in err){if(err.hasOwnProperty(prop)){this[prop]=err[prop];}}this.message=_578;this.stack=err.stack;}else{base.apply(this,arguments);}if(ctor){ctor.apply(this,arguments);}}     name: "RequestError"     __proto__: d     serverapi.arcgisonline.com/:15     _49dserverapi.arcgisonline.com/:15     (anonymous function)serverapi.arcgisonline.com/:15     _1e1serverapi.arcgisonline.com/:15     _1dfserverapi.arcgisonline.com/:15     resolve.callbackserverapi.arcgisonline.com/:15     _1e1serverapi.arcgisonline.com/:15     _1dfserverapi.arcgisonline.com/:15     reject.errbackserverapi.arcgisonline.com/:15     _1e1serverapi.arcgisonline.com/:15     _1dfserverapi.arcgisonline.com/:15     reject.errbackserverapi.arcgisonline.com/:15     _1e1serverapi.arcgisonline.com/:15     _1dfserverapi.arcgisonline.com/:15     reject.errbackserverapi.arcgisonline.com/:15     (anonymous function)serverapi.arcgisonline.com/:15     _4c2serverapi.arcgisonline.com/:15     _4bcserverapi.arcgisonline.com/:15     _4da.rejectserverapi.arcgisonline.com/:15     _4c8serverapi.arcgisonline.com/:15     _4c2serverapi.arcgisonline.com/:15     _4bcserverapi.arcgisonline.com/:15     _4da.rejectserverapi.arcgisonline.com/:15     _4c8serverapi.arcgisonline.com/:15     _4c2serverapi.arcgisonline.com/:15     _4bcserverapi.arcgisonline.com/:15     _4da.rejectserverapi.arcgisonline.com/:15     _4c8serverapi.arcgisonline.com/:15     _4c2serverapi.arcgisonline.com/:15     _4bcserverapi.arcgisonline.com/:15     _4da.rejectserverapi.arcgisonline.com/:15     _4c8serverapi.arcgisonline.com/:15     _4c2serverapi.arcgisonline.com/:15     _4bcserverapi.arcgisonline.com/:15     _4da.rejectserverapi.arcgisonline.com/:15     _3e6serverapi.arcgisonline.com/:15     _3f3serverapi.arcgisonline.com/:15      Code 2 (html file loads successfully):               <!DOCTYPE html>                  <title>Create a Map</title>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">        <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">        <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css">        <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css">


title: Reprojecting GeoTIFFs to WGS84/UTM

text: I'm using `libgeotiff` and `proj4` to read and (try to!) process GeoTIFFs. After reading the file, I want to get the corner coordinates in WGS84/UTM - but there are so many functions and parameters to try and understand, I'm flailing around a bit. A lot actually! My current hacky function goes like this:               //------------------------------------------------------------------------------     BOOL CGeoTIFFImporter::GetUTMCorner(Corners cnr, double& x, double& y)     //------------------------------------------------------------------------------     {         BOOL bRet = FALSE;         if (m_bIsGeoTIFF)         {             x = -DBL_MAX;             y = -DBL_MAX;             double xtmp = -DBL_MAX;             double ytmp = -DBL_MAX;             CString spjUTM = "";             projPJ pjUTM, pjPJ;             char *pszProjection;                  switch (cnr)             {                 case LowerLeft: x = 0.0; y = m_Ypx; break;                 case LowerRight: x = m_Xpx; y = m_Ypx; break;                 case UpperLeft: x = 0.0; y = 0.0; break;                 case UpperRight: x = m_Xpx; y = 0.0; break;             }                  // Try to transform the coordinate into PCS space             bRet = GTIFImageToPCS(m_pGTF, &x, &y);                  if (bRet && m_GTFDef.Zone != 0)             {                 xtmp = x; ytmp = y;                 if (m_GTFDef.Model == ModelTypeGeographic)                 {                 }                 else if (!GTIFProj4ToLatLong(&m_GTFDef, 1, &xtmp, &ytmp))                 {                     return FALSE;                 }                      spjUTM.Format("+proj=utm +zone=%d +ellps=WGS84 +datum=WGS84", UTMZone(xtmp));                      pjUTM = pj_init_plus(spjUTM);                      if (pjUTM == NULL)                 {                     return FALSE;                 }                      pszProjection = GTIFGetProj4Defn(&m_GTFDef);                      if (pszProjection == NULL)                 {                     return FALSE;                 }                 pjPJ = pj_init_plus(pszProjection);                 free(pszProjection);                      if (pjPJ == NULL)                 {                     return FALSE;                 }                      bRet = (pj_transform(pjPJ, pjUTM, 1, 1, &x, &y, NULL) == 0);             }         }         return bRet;     }      Somewhat unsurprisingly given my state of knowledge onthe subject, this doesn't work. Can anyone give me some pointers as to what I'm doing wrong? Cheers.


title: Accessing results window from ArcObjects not using Geoprocessing

text: Is it at all possible to write messages to the results window in either/both ArcMap and ArcCatalog, straight from ArcObjects? I understand that each result comes from running a geoprocessing tool, and the messages are contained within the results file from the tool. I am unable to use geoprocessing due to the requirements of the project. I am wondering therefore, if it is possible to create a results file, write to it from ArcObjects without creating a GeoProcessor object and have them display in the results window as code runs. I've looked through some examples and the API without anything looking promising, but the documentation is thousands of pages so its easy to miss concepts some times.


title: Find all points in a linestring that are contained by a polygon

text: I'm fairly new to PostGIS, so I apologize if this has been answered before. I have a linestring made up of 4D points and I need to determine which points in this linestring fall within a specific bounding box so that I can get the Z dimension of those points. I'm using Python 2.7 and Postgresql 9.3.4 with PostGIS 2.1.2. As of right now I'm first determining if the linstring overlaps the bounding box:               SELECT id FROM my_table WHERE ST_Intersects(my_geom, ST_GeometryFromText('POLYGON((minLon minLat, minLon maxLat, maxLon maxLat, maxLon minLat, minLon minLat))', 0))      Next, I'm dumping out all of the points of any linestring that intersects the bounding box:               SELECT ST_AsText((dp).geom) FROM (SELECT ST_DumpPoints(my_geom) as dp FROM my_table WHERE id like id_from_above) as foo      I then loop through the points and store any that are found inside the box (I'm pseudo-coding here):               for i in range(0, len(points)):         SELECT ST_Contains(ST_GeometryFromText('POLYGON((minLon minLat, minLon maxLat, maxLon maxLat, maxLon minLat, minLon minLat))'), ST_GeometryFromText('points[i]'))      Last, I get the Z dimension of each of these stored points (again, pseudo- coding):               for i in range(0, len(stored_points)):         SELECT ST_Z(ST_GeometryFromText('stored_points[i]'))      This method seems to work, however each linestring contains on the order of 25000 points. Since there are potentially many linestrings that will need to be checked, I'd like something that runs a bit faster. Multiple days of searching the internet hasn't gotten me anywhere, so I'd really appreciate it if anyone could point me in the right direction. Thanks!


title: Stack sat images and run operation on all

text: I have about 300 MODIS satellite with different acqusition dates, covering the same area. I am not used to work with so many tiles at once so I ask for advice. I am working with ArcMap10.1 What I want to do is:   1. Stack all the images on top of each other   2. clip them with the same extent.   3. Run raster calculator for each of them, with the same function. I guess my biggest problem is how to stack them in a good way so I later can run my tools on the whole pack. Best regards!


title: How correct is the "Accuracy" value given by GPS devices?

text: I have a Garmin Forerunner 305 and a Google Nexus One Android phone. From the GPS on both these devices I can get a "Accuracy" value that is usually between 6-20 meters. How much can I trust this value? Is it close to correct or may it be very incorrect? I think it must be derived from the NMEA strings received. I think that both my devices is using standalone-GPS and Assisted GPS from the mobile phone network, if that matters.


title: Offline tiled map web app

text: I'm not sure whether to post this here or on Stackoverflow, as it's sort of a crossover. Let me give it a try. In the proposed HTML5 standard, there's the option of storing web application data in a local cache using a cache manifest. I am looking to use this technique for an offline tiled web map application and did a quick prototype here based on a standard install of Geoserver. I just ripped the OpenLayers client page that is generated from one of the default layers and changed the `<html>` tag to               <html xmlns="http://www.w3.org/1999/xhtml" manifest="cache.manifest">      And created the file `cache.manifest` which simply reads               CACHE MANIFEST     http://lima.schaaltreinen.nl:8080/      Which should, in my limited understanding of the matter, locally cache everything that loads from that URL: all tiles and the OpenLayers JS. In fact, upon first call in Firefox, it does ask me to allow local storage, but when I hit refresh - either online or offline - the page croaks stating that the OpenLayers object is not defined. Looks like it hasn't loaded the OpenLayers JS. Anyone successfully did a functioning offline OpenLayers-based tiled web map app? Or hints on how to investigate this further?


title: How to using custom point markers in Matlab Mapping Toolbox?

text: I'm trying to find out if it's possible to create custom point markers (from some image files) in Matlab with Mapping Toolbox. So far, I haven't found anything about this in their documentation. Online searches only yielded: > No. The marker shapes are hard-coded and you cannot add new ones. If you > want a custom marker, then at each point you want the marker, you will have > to use line() or equivalent to draw the marker or image() or equivalent to > draw in an image. (Source: http://groups.google.com/group/comp.soft- sys.matlab/browse_thread/thread/4fe4e31f191f7080)


title: Is it possible to some how find out which feature is identified on ArcMap document, using arcpy and then read the attributes of the feature?

text: I have to find out which feature is identified on the map, thus subsequently read the attributes of the feature, and then do some logic to plot a time series graph. Is it possible to find out which feature is identified on the map using the identify tool, or alternatively is it possible to find a graphic below a mouse click using python in ArcGIS.


title: How to publish PostGIS Rasters in Geoserver?

text: **What is the best solution to publish postgis rasters using Geoserver?** I have spent a lot of time trying to create a Raster datasource using Image Mosaic JDBC but with no luck. Steps performed:   1. Downloaded and Installed the JDBC Image Mosaic extension (worked ok)   2. Created the "Connection Parameter" files:      _connect.postgis.xml.inc:_               <connect>       <dstype value="DBCP"/>       <username value="postgres" />       <password value="password" />       <jdbcUrl value="jdbc:postgresql://localhost:5432/db1" />       <driverClassName value="org.postgresql.Driver"/>       <maxActive value="10"/>       <maxIdle value="0"/>     </connect>         _mapping.postgis.xml.inc:_               <spatialExtension name="postgis"/>     <mapping>         <masterTable name="mosaic" >             <coverageNameAttribute name="name"/>             <maxXAttribute name="maxX"/>             <maxYAttribute name="maxY"/>             <minXAttribute name="minX"/>             <minYAttribute name="minY"/>             <resXAttribute name="resX"/>             <resYAttribute name="resY"/>             <tileTableNameAtribute name="tiletable" />         </masterTable>         <tileTable>             <blobAttributeName name="rast" />         </tileTable>     </mapping>         _osm.postgis.xml:_               <?xml version="1.0" encoding="UTF-8" standalone="no"?>     <!DOCTYPE ImageMosaicJDBCConfig [       <!ENTITY mapping PUBLIC "mapping"  "mapping.postgis.xml.inc">       <!ENTITY connect PUBLIC "connect"  "connect.postgis.xml.inc">]>     <config version="1.0">       <coverageName name="gfm"/>       <coordsys name="EPSG:25832"/>       <!-- interpolation 1 = nearest neighbour, 2 = bilinear, 3 = bicubic -->       <scaleop  interpolation="1"/>       <verify cardinality="false"/>       &mapping;       &connect;     </config>      where "mosaic" is a table (columns: name, titletable,minX,minY,maxX,maxY,resX,resY) containing one row: "gfm, testrastertable, , , , , , ,"      3. Saved the config files in ../geoserver/data_dir/coverages/    4. While trying to add an Image Mosaic JDBC data store I receive the following error:               Error: Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: ImageMosaicJDBC            Update: Geoserver log               2012-10-24 14:09:11,404 DEBUG [org.geoserver] - Thread 14 locking in mode WRITE     2012-10-24 14:09:11,404 DEBUG [org.geoserver] - Thread 14 got the lock in mode WRITE     2012-10-24 14:09:11,406 DEBUG [geoserver.config] - Persisting coverage store raster_store     2012-10-24 14:09:11,408 DEBUG [geoserver.config] - Persisted org.geoserver.catalog.impl.CoverageStoreInfoImpl to /opt/geoserver/data_dir/workspaces/raster/raster_store/coveragestore.xml     2012-10-24 14:09:11,416 DEBUG [geoserver.config] - Persisted $Proxy15 to /opt/geoserver/data_dir/global.xml     2012-10-24 14:09:11,438 ERROR [imagemosaic.jdbc] -      2012-10-24 14:09:11,438 WARN [imagemosaic.jdbc] -      java.io.IOException         at org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCReader.<init>(ImageMosaicJDBCReader.java:163)         at org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCFormat.getReader(ImageMosaicJDBCFormat.java:209)     ....     2012-10-24 14:09:11,439 INFO [geoserver.web] - Getting list of coverages for saved store file:coverages/osm.postgis.xml     java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: ImageMosaicJDBC         at org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:115)     ...     Caused by: java.lang.Exception: Unable to acquire a reader for this coverage with format: ImageMosaicJDBC         at org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:812)         at org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:82)         ... 95 more     2012-10-24 14:09:11,441 DEBUG [geoserver.config] - Removing coverage store raster_store     2012-10-24 14:09:11,446 DEBUG [geoserver.config] - Persisted $Proxy15 to /opt/geoserver/data_dir/global.xml     2012-10-24 14:09:11,459 DEBUG [org.geoserver] - Thread 14 releasing the lock in mode WRITE


title: Setting Geometry Fail Error on ESRI server

text: I'm trying to insert a point on a feature layer on a ESRI server. Sometimes it works nicely, but sometimes I get an error when I send the save instruction: "Setting of Geometry Fail" This happens when I build the geometry from a mappoint. When I compare the geometry from a mappoint with a normal geometry, I don't find any difference. The mappoint is made only by using X,Y and WKID. Can anyone have a clue of what I'm doing wrong? Thanks


title: How to measure minimum distance between objects in two layers using arcpy?

text: I am working on an alien species analysis looking at the spread of a species from the mainland to islands in an archipelago. I am doing the analysis using arcpy and I have succeeded in isolating risk zone islands based on how far the alien species can swim. Yup, the critters can swim some 2.000 meters. With my islands isolated using repetitive buffer analysis I now need to be able to measure the minimum distance between one of the islands in the risk- zone and the mainland. So what I am looking for is something like this: arcpy.distancebetweenlayers(risk_islands,mainland) The closest I can get is the point distance tool. Since it only works with points I am out of luck. "Exploding" the features into points could be an option, but I would rather not have to go that way.   * Is there some functionality I have overlooked which can support me on this task?   * Using other libraries than arcpy might be option. Which libraries could give me a quick fix on this one? For the record I am aware of a similar question with response about a year ago, but do not think it sufficiently answerede the question.