title: How can I connect my point pattern shapefile with my polygon window in R?

text: I would like to do some spatial statistics in R. I have a point layer called '1983' that represents the distribution of one species, and a polygon layer called 'SA-R' that represents the study area. I followed the steps from the pdf "Handling shapefiles in the spatstat package": > _library(spatstat)_ spatstat 1.36-0 (nickname: ‘Intense Scrutiny’) For an introduction to spatstat, type ‘beginner’ > _library(sp)_ > > _library(maptools)_ Checking rgeos availability: FALSE Note: when rgeos is not available, polygon geometry computations in maptools depend on gpclib, which has a restricted licence. It is disabled by default; to enable gpclib, type gpclibPermit() > _Year1 <\- readShapeSpatial("1983.shp")_ > > _Studyarea <\- readShapeSpatial("SA-R.shp")_ Field name: ‘opp mÂ²’ changed to: ‘opp.mÂ²’ Field name: ‘opp ha’ changed to: ‘opp.ha’ > _as.owin(Studyarea)_ window: polygonal boundary enclosing rectangle: [226675.38, 234961.33] x [21233.66, 32693.92] units > _as.ppp(Year1)_ marked planar point pattern: 7 points Mark variables: ID, Year window: rectangle = [227669.54, 229542.88] x [22341.009, 30989.048] units > _Data1 <\- Year1[Studyarea]_ Error in x[j] : invalid subscript type 'S4' I can plot each of my shapefiles in R, but do not manage to plot my point layer within my study area polygon. Does someone know what's wrong with my last command? I have already checked, and both of my shapefile layers are in the same projection system. Your syntax works until this step: > w -> as.owin(Studyarea) Error in as.owin.default(Studyarea) : Can't > interpret W as a window For some reason, it did work like this: > library(spatstat) library(maptools) library(sp) Year1 <\- > readShapeSpatial("1983.shp") as.ppp(Year1) marked planar point pattern: 7 points Mark variables: ID, Year window: rectangle = [227669.54, 229542.88] x [22341.009, 30989.048] units > Studyarea <\- readShapeSpatial("SA-R.shp") Field name: ‘opp mÂ²’ changed to: ‘opp.mÂ²’ Field name: ‘opp ha’ changed to: ‘opp.ha’ > w <\- as.owin(Studyarea) > > Year1 <\- ppp(coordinates(Year1)[,1],coordinates(Year1)[,2], window=w, > marks=Year1@data$MyVar) > > plot(Year1)


title: geodatabase with multiple projection

text: I have a geodatabase (ESRI/PostgreSQL) I'm working in an application for digitizing : in my country we have 4 coordinate system(projection), so I'm looking for a way to switch projection or any other idea or set projection parameter to all my feature classes.


title: how to make web mapping project run (serve map) faster

text: I'm implementing a project with openlayers 2.12, Geoserver 2.1.3 and PostgreSQL 9.1/PostGIS 2.0 I also use HTML5 Geolocation API and MapQuest's Geocoding API. In the database I have data (osm_line, osm_point, osm_polygon, osm_road) of a county I downloaded from OpenStreet Map. The user can also search for points. Thats implemented with javascript and vector layers. The problem is , after a certain zoom level (about 16/20) the tiles load **very** slow. Especially in FireFox and Internet Explorer. Also, when panning, tiles are **blended** in Internet Explorer. Please advice, how can I fix this? Is there a way to make the whole system load faster? Thanks in advance **EDIT** As for the IE problem, with tiles blending, a friend of mine Skyped me this As for the loading speed issue, I checked the CPU usage and Geoserver goes up to 60-70, when postGis and browsers are about 08-10. And I also remeber that I edited the settings of Geoserver so I increased the SLD file limit. Also the base layer is WMS, containing the four tables together `{layers: 'cultumap:planet_osm_polygon, cultumap:planet_osm_line, cultumap:planet_osm_roads, cultumap:planet_osm_point'}` Any thoughts?


title: Adding GPS tracking data from Excel into QGIS

text: Sorry if this is an easy question! I have added GPS points in QGIS however all of them are the same colour. I want the points to be coloured differently for each individual. How do I do this? Thank you!


title: wxpython frame run from ArcMap loses focus almost immediately after it's shown

text: I'm trying to prepare a Python add-in using "Python Add-In Wizard". I want my add-in to perform some geoprocessing but first it should take data from a user and there's already a problem. I'm displaying a wxpython GUI and it loses focus and hides behind the arcmap window almost immediately after it's shown. I have no idea how to debug it and what could cause the problem. I decided to go this way after getting hands on this example. My code is here: **addin.py**               from dialogs.import_dialog import ImportDialog          class ImportButton(object):         """Runs the import function."""         dlg = None              def __init__(self):             self.enabled = True             self.checked = False              def onClick(self):             if self.dlg is None:                 self.dlg = ImportDialog()             else:                 self.dlg.Show()      **import_dialog.py**               class ImportDialog(wx.Frame):         def __init__(self):             wxStyle = wx.CAPTION | wx.CLOSE_BOX | wx.SYSTEM_MENU             wx.Frame.__init__(self, None, wx.ID_ANY, "some msg", style=wxStyle, size=(350, 200))             self.panel = wx.Panel(self, wx.ID_ANY)                  self.path_label = wx.StaticText(self.panel, wx.ID_ANY, u"some msg", pos=(8, 8))             self.input_path = wx.TextCtrl(self.panel, wx.ID_ANY, value="", pos=(8, 36), size=(330, 21))                  self.path_label = wx.StaticText(self.panel, wx.ID_ANY,                                             u"some msg",                                             pos=(8, 65))                  self.group_layers = wx.ComboBox(self.panel, wx.ID_ANY, pos=(8, 93), size=(330, 21))                  self.ok_button = wx.Button(self.panel, label="OK", pos=(8, 130))                  self.Bind(wx.EVT_CLOSE, self.OnClose)                  self.Center()             self.Show(True)              def OnClose(self, event):             self.Show(False)


title: Calculating many shortest paths with pgRouting

text: I 145013 Danish addresses, and 10 big cities in Denmark as points in `QGIS`. Furthermore, I have four vector layers that connect all the points. They are small roads, main roads, freeways and ferry routes. See the screen dump from `QGIS` below for an illustration: ![QGIS screen dump illustrating my problem](http://i.stack.imgur.com/qLFsf.jpg) Now I would like to calculate the shortest distance from each address to each of the 10 big cities. I will use `pgRouting` for this, and I have followed the nice tutorial on finding 1 shortest path here http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ However, I can't figure out how to extend the problem from 1 path to (145013 * 10 =) 1450130 paths.   * What method should I use in `pgRouting`, and how do I incorporate all the 1450130 paths? I use:   * QGIS 2.1.0   * postgres 9.2   * postgis 2.0   * pgRouting 2.0   * OS: Win 7 64bit I have shared my data here: https://www.dropbox.com/sh/rn8gdxr1bki4q4x/fFRd0PerkP It's in in a QGIS project file. I appreciate all comments and answers!


title: Math algorithm for n amount points in objective-c

text: I need some information about the Answer on an earlier **Question**. I need this calculation for an iOS App. I have three points with different Circles. I understand the problem and your solution. But i have no idea how the function self works. Do you have an idea which libary can help me to solve this problem (C C++) I also looked at google. But i'm not really sure which lib can do this. I need this for objective c. Also google had no solution for me. Maybe you have me some Resources or a Mathematic description for me. It would help me really when you have some Informations for me.


title: What are the Server Hardware Needs for Using ArcGIS Desktop in a Citrix Environment?

text: We are currently ramping up our ArcGIS Desktop usage and capacity in a Citrix environment and I am wondering if there is some good documentation available regarding best practices for Citrix server hardware specifications, configuration, etc. Our specific use case is 15-30 active ArcGIS Desktop users that spend about 60% of the time working on map products and 40% of the time working with geoprocessing tools to run vector-based analysis, etc. We are running ArcGIS 10.1 for the time being. No ArcScene or ArcGlobe work at this time, but occasionally some heavy analysis work and detailed mapping with complex Maplex labeling and several data frames that has the potential to bog down the server for individual users. We are currently in preliminary roll-out using an old server and are looking to purchase a new server for increased performance. Our goal is to provide similar performance inside of Citrix as a user would expect from a decent workstation. Below is what we are currently thinking of purchasing. We are also planning to buy a second one of these for failover purposes. We have read that running ArcGIS in a virtualized server environment is not a good practice, so this will be a dedicated physical server.   * Processors: Dual Intel Xeon E5-2690 v2 (10 cores, 25M Cache, 3.00 GHz)   * Memory: 64GB RAM   * Hard Drives: 2x 600GB SAS/10k   * Video Card: Currently unknown, any recommendations would be appreciated. Below are links to existing documentation I have found, but I am looking for some specific hardware recommendations and potential pitfalls based on your personal experiences:   * What are the best practices for running ArcGIS Desktop in a Citrix XenApp environment?   * Citrix XenApp and Best Practices for ArcGIS Below are my specific questions, I apologize that there is not just a single question in this post, but I felt that splitting them up would not give a complete picture of the situation.   1. Would a server similar to the above be appropriate for this usage case, or is it way too much or too little?   2. Is there a general guideline to follow regarding number/speed of processor cores per ArcGIS Desktop user?   3. Is there a general guideline to follow for amount of RAM to accommodate each user?   4. What standalone video card requirements are there to provide ArcGIS Desktop users a good experience (no 3D visualization required)?   5. What documentation is available to help determine server specifications and configuration for the specific case of running ArcGIS Desktop in Citrix?


title: about intersection function of QGIS

text: I used QGIS digitization function to create polylines. Then I need to find the intersection points of these intersected lines. I used the function under the vector editing menu. But I couldnt do it. I will be thankfull if someone help me out.


title: Converting a CAD/DXF file to a SHP file

text: I need your ideas and suggestions about a problem....   I have a dxf file which was converted from a CAD file. I used QGIS to convert it to a shp file...   This is when I realized that the text associated with the drawing is actually a separate layer...   What I need is one layer where the text is in the attribute table. What would best the best way to accomplish this? Regards Chris


title: label placment in multipolygon with cartocss (Denmark, Greenland)

text: I am rendering an interactive world map with Tilemill and I have the problem that the country name for Denmark is placed onto Greenland. This is because Denmark is represented as a multipolygon with polygons for Denmark proper and Greenland, as Greenland is a territorial dependency of Denmark, and because Tilemill only places one text label onto a multipolygon . My question is if it is possible to influence with Tilemill's cartocss on which of a multipolygon's subpolygons the textlabel is placed. I'd prefer for the text label to appear on continental Denmark. I have tried the                   text-placement-type: simple;         text-placements: 'E,W';      properties, hoping that this would select the more east or westward polygon, but to no avail. I have also looked for a way to position a textlabel at an absolute position, but this also does not seem to be possible. Finally, I would like to avoid manipulating the shapefile, as I am taking it from an external source. Thanks!


title: Does ArcGIS API support Geoserver's WMS and WFS services?

text: I want to know whether ArcGIS API for Java Script support Geoserver's WMS and WFS standards. I have published my data on Geoserver and i want to query my data by WFS in ArcGIS API to develope my appliction.


title: How to disable log messages in QGIS

text: Is it possible to disable log messages in QGIS Dufour? When I work in QGIS 2.0, log messages increase to more than 2000 and it makes QGIS very slow. Then I save project and open it again, then QGIS work fine and everything is fast. But during work in QGIS, logged messages increase and it works slowly. Kindly help me to resolve the problem ASAP.Here I have enclosed the screen shot of the log messages from QGIS. Thank you, ![Log messages ](http://i.stack.imgur.com/Gu4jg.png)


title: How can I use pyqgis to automate a series of field calculations?

text: I've got a shapefile with about 30 fields that I'll need to update from time to time by importing a CSV with new data, joining it to the shapefile, and using the field calculator to carry the new values into the old fields one at a time: ![enter image description here](http://i.stack.imgur.com/RPfz3.jpg) However, this is a tedious process, and it seems like something ripe for automation with pyQGIS. The target field names and corresponding join field names will not change over time. I have a sense of what this would look like in SQL, but the python version escapes me, and this documentation is thin on field calculation. Is it even possible to automate a batch of field calculations like this?


title: How to add cross origin filter settings in org.mortbay.jetty?

text: I am using GeoServer 2.4.0 on Windows 2008 Server. I have installed Geoserver by using windows installer. My problem is I dont know to add cross origin filter settings in Jetty. When I have searched this on google, am getting the examples for org.eclipse but inside my all jetty xml files I can found only org.mortbay. Please let me know how to add the below thing in org.mortbay.jetty and where to add. Thanks in Advance.               <web-app>     <filter>     <filter-name>cross-origin</filter-name>     <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>     <init-param>        <param-name>allowedOrigins</param-name>        <param-value>*</param-value>     </init-param>     <init-param>        <param-name>allowedMethods</param-name>        <param-value>*</param-value>     </init-param>     <init-param>        <param-name>allowedHeaders</param-name>        <param-value>*</param-value>     </init-param>     </filter>     <filter-mapping>      <filter-name>cross-origin</filter-name>      <url-pattern>/*</url-pattern>     </filter-mapping>     </web-app>


title: Using WFS Layer as a baselayer

text: I've looked around the net and I've looked for examples, but I just can't seem to find a way to make a WFS layer be the baselayer. I set up the projection the right way and I set isBaseLayer: true . When I open my map it's empty. Only the controls are present and there is a white map. Could it be that it's simply not supported (but since there is the option to set it as isBaseLayer: true, this wouldn't make no sense) ?! Thanks for your help. P.S.: The only thing I've changed can be seen inside of the code. EDIT: Here is my code:               function myInit2(){              var geographic = new OpenLayers.Projection("EPSG:4326");         var mercator = new OpenLayers.Projection("EPSG:900913");         var world = new OpenLayers.Bounds(-180, -89, 180, 89).transform(                 geographic, mercator         );         var deutschl = new OpenLayers.Bounds(5, 50, 15, 56).transform(                 geographic, mercator         );              var dortmund= new OpenLayers.LonLat(7.46, 51.51).transform(                 geographic, mercator         );              map = new OpenLayers.Map("map_location", {             maxExtent: new OpenLayers.Bounds(5, 50, 15, 56).transform(                     geographic, mercator)         });              //var osm = new OpenLayers.Layer.OSM();         // this was the old baselayer              var baseL = new OpenLayers.Layer.WFS(                     "Bundesländer",                     "http://vs136213:8080/geoserver/wfs",                     {typename: "BitmarckKarten:land_shp"},                     {isBaseLayer: true, extractAttributes: true, styleMap: myStyleMapL}             );                         //initialize the base layer here         //map.addLayers([osm]);         //old add of baselayer              map.addLayers([baseL]);                map.addControl(new OpenLayers.Control.LayerSwitcher());         // map.addControl(new OpenLayers.Control.Permalink());         map.addControl(new OpenLayers.Control.MousePosition());                 map.addControl(new OpenLayers.Control.PanZoomBar());         map.addControl(new OpenLayers.Control.Navigation());          map.setCenter(dortmund, 6);                 getDivInfos();          };


title: Converted GPX file has null values in open attributes

text: I'm an absolute newbie but I think I'm doing this right. I've got a bunch of .fit files from my garmin. I can use GPSBabel to manually convert these to GPX XML and the map looks fine after the conversion. If I open the file it looks fine. I then use Vector | GPS | GPS Tools to import the gpx file. The layer is created but there's nothing to see on the map. If I go to the Attribute Table there is only one line and it's full of nulls. Is there are better output file type in GPS Babel that qgis prefers?               <?xml version="1.0" encoding="UTF-8"?>     <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1">       <metadata>         <time>2014-04-25T05:42:52.371Z</time>         <bounds minlat="-36.755794164" minlon="174.555711483" maxlat="-36.722196898" maxlon="174.580664325"/>       </metadata>       <trk>         <trkseg>           <trkpt lat="-36.755794164" lon="174.563342619">             <ele>42.200000</ele>             <time>2014-04-24T22:28:41Z</time>             <extensions>               <gpxtpx:TrackPointExtension>                 <gpxtpx:atemp>27.000000</gpxtpx:atemp>               </gpxtpx:TrackPointExtension>             </extensions>           </trkpt>           <trkpt lat="-36.755728199" lon="174.563325436">             <ele>42.200000</ele>             <time>2014-04-24T22:28:45Z</time>             <extensions>               <gpxtpx:TrackPointExtension>                 <gpxtpx:atemp>27.000000</gpxtpx:atemp>               </gpxtpx:TrackPointExtension>             </extensions>           </trkpt>


title: Why geoNetwork use H2 database engine?

text: I am new to geoNetwork, I want to know why geoNetwork use H2 database, Is there any special reason not to use mysql or pgsql? what are the special features in H2 database in GIS, I search about this in google but i didn't get clear answer.


title: How to access map tiles from external storage in PhoneGap?

text: I am trying to build an Android app using Phonegap and Leaflet. I have added a local tile layer and added the tile folder within the www folder. It's working fine.               var tmsLayer = L.tileLayer('tile/{z}/{x}/{y}.png', {         maxZoom: 16,          minZoom: 13,          tms: true     }).addTo(map);      But when I added the tiles for higher zoom level, the folder size is becoming moe than 200mb. Therefore, I want to put the tile folder outside the www folder, so that my apk file does not become too large. But I am not able to acces the tiles from the Tile folder, copied directly to the external storage. I am using phonegap plugin for file and file transfer. This what I have done so far:               window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {             var tmsLayer = L.tileLayer(fileSystem.root.fullPath + 'tile/{z}/{x}/{y}.png', {                  maxZoom: 20,                   minZoom: 13,                   tms: true              }).addTo(map);         });


title: linked maps not working in R

text: I am trying use the micromap package in R, but something is not working. This is the code:               library(micromap)     library(rgdal)     library(ggplot2)          setwd ('C:/Users/Jesus/Dropbox/linked maps/Chapter4')     mexico<-readShapePoly("ESTADOS.shp")     gdp<-read.csv('mexico.csv')     gdp$CVE_ENT<-as.character(gdp$CVE_ENT)     statePolys <- create_map_table(mexico, 'CVE_ENT')          lmplot(stat.data=gdp,                     map.data=statePolys,            panel.types=c('labels','dot','map'),            panel.data=list('estado','percapita', NA),            ord.by='percapita',            grouping=8, median.row=FALSE,            map.link=c('CVE_ENT','ID'))      The code seems to work but produces the the following image with incomplete information: ![enter image description here](http://i.stack.imgur.com/buUg3.jpg) As you can see in the image some states are not ploted. Any idea on why my code is not working? The link to the files is here: https://www.dropbox.com/s/idvi1nlxq3uml3h/mexico.rar Thanks,


title: How to draw polygons from the python console?

text: I've been visiting and revisiting the page on geometry handling in the PyQGIS Cookbook: https://www.qgis.org/en/docs/pyqgis_developer_cookbook/geometry.html but can't seem to figure out how to get the polygon to draw from the Python console. Can anyone help?


title: CartoDB.js - Accessing table fields in hover function

text:
I am new to CartoDB.js and javascript in general, and I am attempting to highlight polygons in response to a mouse hover. My plan of attack attempts to utilize one of the interesting templates designed by Michael Keller. The basic elements of the visualization are there (it is a choropleth of demographic information in DC), but I can't seem to access the geometry field of the data (to build the polygon hover). Though I started without doing so, I tried to leverage parallel SQL call strategy suggested in a related question. Here is the code:                           <link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />

                Since I added the layer to the map (in what seems to me to be a redundant manner), I am not clear one why I can't seem to get access to the converted geometry field. I am sure I am missing something small, so any thoughts on the matter would be appreciated.


title: responsive design openlayers - bootstrap or foundation

text: im looking to use zurb foundation or twitter bootstrap with my map app but before i pick a platform i was trying to find out if people had done this already it seems lots of people have had issues making the OL maps responsive full screen maps seem to work but my maps are in a container with a header and side nav has anyone successfully made their maps responsive? we have been using JS on window resize but its horribly slow, so i've removed that code and dont really want to use JS if i can do it with responsive design or do i need to wait until version 3 of open layers? suggestions on RD framework welcomed too


title: JSAPI help with query returning results from feature layers with a specified named column

text: I have a workflow that results in generating a report for certain features with a column name. Goal is to return only results from feature layers in my map service which have a specified column name. User clicks a location on the map service and the queryTask begins... I'm trying to move my coding format to AMD and am using JSAPI 3.7 with 10.2 map service. I've included a JSFiddle link for the intent on sharing the code. Hope that's okay and thanks in advance! JSFiddle Link


title: How to compute distance between 4500 points fast?

text: I am working on a location problem with 150 customers (points) and 30 facilities (points). I have determined the location of any customer and facility by google earth and then saved them in a KMZ file. I need to compute the distance between any pair of customers and facilities. So I should compute 150*30=4500 values by ruler tool in Google Earth. Is there any other way to obtain these values faster and easier? Even by converting the KMZ file to a layer in ArcGIS 10?


title: How to set high value clustered feature to the front?

text: Here is the clustered vector layer I just added to the map.               var defaultStyle = new OpenLayers.Style({             strokeColor     : "#FFFFFF",             strokeOpacity   : 1,             strokeWidth     : 2,             fillColor       : settings.color,             fillOpacity     : 0.9,             cursor          : "pointer",             pointRadius     : "${point_radius}",             pointerEvents   : "visiblePainted",             label           : "${label}",             fontColor       : "#000000",             fontSize        : "12px",             fontFamily      : "verdana",             fontWeight      : "bold",             labelAlign      : "center"          }, {             context: {                 label: function(feature) {                     var sumValue = 0;                     if(feature.attributes.count>1) {                         for (var i=0; i<feature.cluster.length; i++) {                             sumValue++;                         }                         return sumValue;                     }else{                         return 1;                     }                 },                 point_radius: function(feature) {                     var pix = 10;                     if(feature.cluster) {                         pix =Math.min(feature.attributes.count, 30) * 2.5 + 8;                     }                     return pix;                 }             }         });              var onSelectStyle = new OpenLayers.Style({             strokeColor     : "#000000",             fontColor       : "#FFFFFF",             pointerEvents   : "visiblePainted",             fontSize        : "15px"         });              var strategy = new OpenLayers.Strategy.Cluster({distance: 30, threshold: 2});              var ly=new OpenLayers.Layer.Vector(GSMapLayerName,{                 strategies: [strategy],                 styleMap:new OpenLayers.StyleMap({                             "default":defaultStyle,                             "select": onSelectStyle                         }),                 displayInLayerSwitcher:false             });         map.addLayer(ly);      I am getting the below output ![enter image description here](http://i.stack.imgur.com/VNw1P.jpg) Look at the image the feature which have 9 is behind the 3 and 5. This is not a good to view. So, How can I set this feature to the front of all other features? Note: I am using Openlayers 2.11 Thanks for any reply.


title: Compiling Python Scripts that use ArcGIS Geoprocessing Tools?

text: I've been coding with Python for several months now and have developed some reasonably complex scripts for primarily geoprocessing tasks. That being said, I'm still learning a lot as I'm coming from a SQL/VBA/VBScript background. I know that compiled code typically runs faster than code that must be processed by a language interpreter, so I'm interested in the possibility of compiling a geoprocessing Python script to a .EXE file for working with big data. Is this even possible? If it is, what i the best way to compile a Python (.py) script that is importing the arcgisscripting or arcpy modules? I spent a few minutes trying what I found doing some quick Google searches that returned this article among others: http://www.ehow.com/how_2091641_compile-python-code.html The compiler seemed to work, but upon executing the resulting .EXE file it gave a cryptic error saying some files were unavailable. The Python script runs what seems to be reasonably well from the command line, but I'm wondering if I could see some slight improvement if I were able to compile the .py file. Again, I'm working with some big datasets that are taking +20 hours to process (delineating watersheds from input water-quality sample sites). I'll take anything I can get in way of improvements. The script ran 10% quicker outside of ArcGIS from the command line using a test set of sites versus setting the script up as a script tool in a new toolbox in ArcCatalog. I've been running the script from the command line w/o any instance of ArcGIS open on a dedicated machine. So, is it possible to compile Python scripts that import the arcgisscripting module and that call ArcToolBox tools? ## EDIT Thanks for the input, this is helpful for me. The script is largely a way to coordinate a number of ArcGIS tools and to output in desired formats/locations/with appropriate attribution. I've already trimmed some fat I think by writing to a scratch folder instead of a scratch personal geodatabase for some interim raster files so they can be stored in the esri GRID format vs. the IMG format. I'll check out the profiler suggestions though There are some in my office that question Python saying "that compiled code is so much quicker than code running through an interpreter" mainly in comparison to, say, a compiled Visual Basic program or VB.NET program , but that is a good point that the tools are going to take time either way. And, it seems like with present day computing machines that interpreted code may not be that much slower than compiled code to warrant going that extra mile ## EDIT - update on optimization of the program with raster formats Wanted to follow up on my "optimization" of this Python program, and I was able to shave 2 hours of processing time by writing interim rasters to GRID format instead of to a personal geodatabase. Not only that, there was a SIGNIFICANT reduction in data size disk space consumption. The original run I did writing all rasters (and they were only point features converted to rasters, and then watershed rasters) resulted in 37.1 GB of data just for those files. Writing the latter two data outputs to a folder in GRID format was reduced to 667 MB of data. I'd be curious to see how a file GDB would handle these data though mainly in way of the size of the data. But, cutting my processing time down from 9.5 hours to 7.5 hours certainly is enough to advocate for dealing with rasters outside of geodatabases in the GRID format.


title: Mapping Rainforest Deforestation in Peru

text: I'm working on a project on the the rainforest deforestation in Peru. This is related to the work of http://www.coolearth.org/our-mission but I am not affiliated with the organization. I'm hoping to produce several thematic maps visualizing the chronology and rate of logging, the displacement of villages/people and CO2 released into the atmosphere (and any other data I find that might be relevant--suggestions welcome here too!). Does anyone know where I could find this data? Also does anyone have any advice on how to best map/represent these variables? I will be using QGIS, so any suggestions for plugins or tools would be welcome!


title: How to avoid "Handle bad layers" message when using QGIS Flowmapper plugin?

text: In QGIS, if I close a project and try to open it a few days later I often get a message that says "Handle bad layers". This is very frustrating because when I open the project various layers will have been deleted. This has happened to me while using the QGIS flowmapper plugin in particular. What does this message mean? And how do I avoid this in the future? ![Handle bad layers](http://i.stack.imgur.com/8dD06.png)


title: Possible to provide a MaxRecordCount in a esri/tasks/Query?

text: I see no mention of how to limit the number of results the server will return in esri/tasks/Query. Is it not possible? This query services seems to indicate it is not possible.


title: Python script to select a point within a cell?

text: I have two features: points and grid cells (vector). I want to select a point within a grid cell (some cell do not have point) using python script and create a new feature layer with below conditions:   1. If no point in cell then leave as it is.   2. If only one point then pick that point.   3. If more than one point then calculate average point. How can I achieve this task ? I will appreciate your help. Thanks.


title: How to automate the drawing of polygons (square) around a number of points in QGIS?

text: In QGIS (or alternatively any other scripting + GIS stack), how can I automate drawing a 100km x 100km square around a number of points, with the point being dead in the center? I'd need to loop through all the points and create a polygon, but not sure what would be the automated way of doing so. * * * UPDATE: I was able to create buffers (circular) around the points, but now looking for a solution to convert those circles to squares -- something like the Envelope approach described here (but need it in QGIS): Creating a square buffer around a point feature in ArcMap


title: How to connnect two lines with different width so it looks good?

text: Simple question, how do you create a symbol with or without representation to connect two lines with different line width so it looks good? I need to have a smooth transition between the lines, otherwise I need to create a polygon (hard job). * * * https://docs.google.com/open?id=0B8sJ0k30rFr2N1ZRQTRVZldRVGs https://docs.google.com/open?id=0B8sJ0k30rFr2MHNPemRDVTlRbnM ok so I tried the solution and it works, but I want it to be moore gradient like next link https://docs.google.com/open?id=0B8sJ0k30rFr2NVdTTGpGbTBMT2c just for an example we dont use outline and the round cap makes it looks like a half ball, maybe i will need to use a polygon to mask somehow the problem is when one long straight line change symbology to much bigger width, and I want the transition to be like the third link, and when one line ends, i need it to be flat so i think i have to use polygon to mask and fill the transitions


title: Clipping a raster using a polyline or polygon

text: I have a large raster created from values that cover the whole United States and Alaska which are both polygon and polyline features, this raster was caluclated using Spatial Analyst IDW Interpolation. How can I get the raster to clip with the either the polyline of the United States border or the polygon shape of the United States?![alt text](http://i.stack.imgur.com/q0G2Y.jpg) **UPDATE: 12/21/10** Ok so I followed your advice Swingley and set the cell size environment setting to match the original raster. It gives it a smooth border but instead of having smooth grades of differentiating colors now i have large blocks of differentiating colors. Good ![alt text](http://i.stack.imgur.com/lt2Od.jpg) Bad ![alt text](http://i.stack.imgur.com/z3Py8.jpg) Any ideas on how I can fix this and get the Bad raster to look like the orignial (good) raster but keep the bad rasters border?


title: Technical and usability differences between OpenLayers and Google Maps API V3

text: I know this is supposed to be a wiki question, but the feature has been taken of the site   * What are the main differences between OpenLayers and Google Maps api?   * What are the strengths and weaknesses of each system?   * Where would you prefer one system over the other?   * etc? These are just a few questions, feel free to answer more.


title: Right click on layer in TOCControl get a context menu

text: Is there a way to right click on a layer in the AxTOCControl and get a context menu? I would like the options to be something like: {annotate layer, change annotation, move layer up or down the view stack} Using ArcEngine 10 C# VS2010


title: Any Good Map Rendering Engines for SqlGeometry/SqlGeography

text: Can anyone suggest good map rendering engines for MS SQL Server Spatial types (SqlGeometry/SqlGeography)? By rendering, I mean plot the geometries to a common image format such as png or jpeg with very simple symbology. The 2 I have experimented with thus far are: 1\. SharpMap 2\. MapServer with the MSSql plugin I just want to see if there is anything else out there that I might have missed.


title: QGIS raster calculator manual or help

text: There is plenty unknown about how to use raster calculator, for example:   1. how to write NODATA (Null) value in expression   2. is it possible to use within (polygonLayerName) to clip result   3. between shown operators there is even "not equal" symbol, you need to find yourself it is "!=" etc. Generally is there any manual/help/tutorial to QGIS raster calculator describing what is and is not possible to do with it?


title: How can I shift raster layer for making cloud-shadow mask?

text: I want to make cloud shadow mask in QGIS. I have raster cloud mask and I have to shift it by X,Y coordinates. Is there any easy solution? Many thanks, Helena


title: QGIS and MapInfo Projections - EPSG 27700 (British National Grid)

text: I have some data in a PostGIS table with the projection EPSG 27700. If I export this data from QGIS (v1.8) to MapInfo TAB / MIF when I open the data in MapInfo it has a shift on it. Does anyone know why this happens? I don't get any problems if I open MapInfo data directly into QGIS, but I did notice that QGIS opens the data with a custom projection.


title: How to determine if a tiff is georeferenced or not?

text: I received a tiff file from someone, but I'm not sure if it's georeferenced. Is there an easy way to check this?


title: qgis and embedded ajax (bing map)

text: I need to load in a docked QWebView this html:                   < html >     < body >     < iframe width="100%" height="499" frameborder="0"      scrolling="no" marginheight="0"      marginwidth="0"      src="http://dev.virtualearth.net/embeddedMap/v1/ajax/BirdseyeWithLabels?zoomLevel=10&pushpins=45.0610173308_7.64466465993&center=45.0610173308_7.64466465993&heading=123" >     < /iframe >     < /body >< /html >      I'm using this code:               class WebView(QWebView):     def __init__(self, parent=None,framed=False):         QWebView.__init__(self, parent)         #QObject.connect(self, SIGNAL("loadFinished(bool)"), self.onLoad)         #QObject.connect(self.page().networkAccessManager(), SIGNAL("sslErrors(QNetworkReply *, const QList<QSslError> &)"), self.onErrors)         self.settings().setAttribute(QWebSettings.PluginsEnabled, True)         self.framed = framed          def load(self,url, params):         mqurl = QUrl.fromUserInput(QString.fromAscii(url))         p = []         QgsMessageLog.logMessage("url="+url, "WebView")         for k, v in params.iteritems():             p.append( (k, v) )             QgsMessageLog.logMessage(str(k)+'=' + str(v), "WebView")              mqurl.setQueryItems(p)         if self.framed==True:             mhtml=HtmlFrame(mqurl.toString(),self.height()-20)             qmhtml = QString.fromAscii(mhtml)             self.setHtml(qmhtml,mqurl)         else:             QDesktopServices.openUrl(mqurl)      If framed is False it works, if framed is True the webpage is not loaded. With other webpages it works. Is it due to Ajax? How to solve this? Thanks


title: Qgis - How to change GDAL version

text: im working on Ubuntu 12.04 server; i noticed this when i installed additional support for ECW format into the GDAL 1.9.1 which worked ok. Then i tried to add ECW files to Qgis but it said they still weren't supported. I checked Help->About and to my surprise the gdal version that qgis was using was 1.7.3; no wonder they didnt work. Through trial and error i removed Qgis then i reinstalled it via synaptic installer and also forcefully disabled the libgdal 1.7 as a dependancy. Then qgis loaded the version of GDAL i intended for qgis from the beginning. But this seems like an overkill to do and i dont feel like im having much control here Is there a better way to for example:   * check which dependancies exist and dont need installing, or   * is there a way, a config file or something to tell qgis which library version you want it to use The packages for 12.04 seem to be quite old and have old dependacies installed with them. This same issue arises with qgis-mapserver for which i have no way of telling which version of gdal it is using, but my guess is the old one, because ECW imagery doesnt work while other does. Thanks


title: Convert old ArcGIS 9 VBA tool to new Python script tool for ArcGIS 10

text: I have an ArcGIS .mxd file with an imbedded VBA script that is executed from a tool bar button. I would like to convert this VBA script tool to a python script tool for use in ArcGIS 10. Is that possible?


title: What are some best practices for managing large amounts of geospatial data?

text: How do you manage your geospatial data? I have terabytes of data spread out over hundreds of datasets, and have an ad-hoc solution using symbolic links within projects which link back to an domain-name based archive directory for each dataset. This works mostly, but has its own issues. I'm also keen to hear if anyone manages their geospatial data in a revision control system; I currently use one for my code and small datasets, but not for full datasets.


title: Advice regarding set up of GIS/CAD directories

text: > **Possible Duplicate:**   >  Best practices for managing geospatial data I'm seeking input on the most practical way to set up a directory system for AutoCAD and GIS projects. I want a basic folder template I can copy and paste each time I have a new project. I can modify the contents of each sub- directory on an "as-needed" basis, but I want to set up something I will use consistently (in a fashion that makes the most sense). I will working from an external hard drive so I can go to my clients wih a laptop. What I had in mind (first printscreen): The top directory would be the external device. The folder inside of that would list the client name and their assigned project number. I think at this point, it's necessary to break apart projects into two directories (CAD & GIS). ![enter image description here](http://i.stack.imgur.com/SLvam.jpg) Next, A snapshot is shown inside of each of these directories (printscreen 2). ![enter image description here](http://i.stack.imgur.com/DzgGI.jpg) In both folders, I have a directory in which I will store the original data from the client. This way I can take what I need from "copied" data and maintain the original product supplied by the client. The superceded folders are meant to house older versions of the maps/CAD Drawings. This will allow me to keep "dated" versions of prior work when there has been a significant change to the project or study area. This is just in case there's a need to retrieve something - which does happen from time-to- time. In the " **GIS** " folder, I will have a place for Vector and Raster data. An AutoCAD folder can be created inside the "Vector" folder if there is a need on a given project. If I am to provide layouts to the client in .mxd format, I think it becomes necessary to store logos and layer files at the top of the GIS folder for every project (same idea in the CAD folder). This way, when I move things over to the clients server, those connections will remain intact. With regard to my " **CAD** " folder, I have a similar, but slightly different structure in mind. I have a folder for .dwg files, and a specific spot for superceded drawings. Again, I have a place for òriginal`drawings should the client (or another firm) provide any. I also have a place for GIS data storage. The nature of my projects will often involve importing augmented or modified GIS data into my CAD drawings. Ultimately, I want to achieve a highly logical order to the way I store my data, maps and CAD drawings. I also want to alleviate any problems related to sending the work to my clients. It should be very clear where data SHOULD be located at the receiving end. Reconnecting to data at the receiving end should be as painless as possible. I`m looking for suggestions and opinions. Do any of you see anything critical I`ve overlooked? Can anyone suggest a better way to set up my folder structure? If anyone has a better way to set things up, please post an answer with some printscreens. Thanks in advance


title: Multiple Selections from one shapefile

text: I have two shapfiles, Country and Blocks. I need to run a very basic selection to find out what blocks intersect the country shpe. But, the country shape has 250+ countries and I need to do this for each row. The output is a list (ideally a .txt file) of one of the attributes of the block shapefile. I'm trying to automate this so I don't have to query each country then run the intersection manually. I'd like to run a Python script or make a model builder, but I don't know how to automate going from one row to the next. Thanks for your help,


title: Spatially join large raster to polygon shapefile

text: I have a large raster file with elevation data. From this raster, I would like to infer the average ruggedness for different geographic zones (like countries). I have the "countries shapefile" as a separate polygon shapefile. I was able to get a raster file with a ruggedness measure. However, this raster is still very large. It is therefore not possible to convert it to a shapefile to do a spatial join of the two shapefiles. Since I do not need very precise data, is it possible to either: \- convert my raster to a shapefile with an output that has larger cells than the default (I did not find this option) \- directly spatially join the raster to the polygon shapefile Do you have any advice? Thank you! I use ArcGis10, Gdal, and Qgis 1.8


title: Alternative layperson-friendly names for 'Legend'?

text: I am making a mobile mapping app that has a button that displays a legend. Because my legend is initially hidden from view, it is really important the text I put in the button that displays the legend, be understandable to the decent amount of people who dont know what the word "Legend" refers to on its own. Since it is a mobile app, I only have so much space available, so shorter suggestions (approx. 10 characters) are ideal. All the alternatives I can think of are equally ambiguous:               -Icon Key     -Marker Key (my data is all points)     -Map key     -Info/ the 'i' info symbol      -the icon seen on many mobile apps, three parallel horizontal bars       Ideas?


title: How to install PostGIS 8.4 in windows 7 64 bit parallel to an existing PostGIS 9.2?

text: PostGIS 9.2 is installed along with OpenGeoSuite using one click setup. But 9.2 dont support pgRouting. So I need to install 8.4. I dont how to include binaries and all. So someone please tell me how to install it in windows 7 64 bit in detail including what port etc.


title: Resources for learning to create mobile GIS Apps using Windows 8 Metro?

text: I have no experience with either mobile apps or Windows 8 Metro. Are there any good resources out there that would be good for getting started from ground zero? Thanks for helping a noob out!


title: How to modify raster pixel inside a polygon?

text: I would like to set to novalue all the pixels of my raster inside a polygon. ![enter image description here](http://i.stack.imgur.com/qSsJr.jpg) I'm trying the gdalwarp command line with `-cutline` option. But this command extract the values of my raster inside the polygone (shapefile). Raster and vector dataset's are both in the same projection. What coud be the next steps ? If this is the right track, is it possible to script the "raster calculator" plugins ? Thank you in advance


title: Is there a way to start the route on pgrouting from a coordinate that is not a node?

text: After execute all steps from this pgRouting tutorial, now I have a map that creates and displays routes, but as the routing methods rely on parameters representing vertex Ids that was created using osm2pgrouting, my route always starts either after or before the place I selected on the map, and ends on the same way.. after or before the place it should end. We all know that there are tools that are based on pgrouting, that displays the route ending and starting exactly where the user clicked, not in the nearest node. I was wondering if there is a way to create more nodes between the current ones, so I would reduce the distance between nodes to few meters, what would fix it, or if there is another solution to my issue.. Thank you in advance!


title: How to zoom to feature when clicking on drop-down list box item with ArcGIS JS API?

text: I am developing a web application with ArcGIS JS Api that is similar to this smart campus: UCSB Interactive Campus Map. Here, in the **Building** drop down list box, you can select a building, and the service map next to the sidebar will simply zoom and select that polygon feature. The thing is that in my application, I do have a sidebar with a drop down list box, where you can select buildings as well. But I don't know how to make the map service to zoom-and-select that building when the user clicks on a determined Building code, such as "Library" or "Engineering". How to make this **correspondence between a text item and a polygon**? Please, could you provide any ideas on how to make this web application behave the same as UCSB? Thanks for your help,


title: How to access restricted layers in geoserver?

text: I have a website running at http://127.o.o.1/ and geoserver running at http://127.o.o.1/geoserver/, I want to access layers in the geoserver via WMS through my website but the problem is some layers are restricted. Is there a way I can access those layers?


title: Python Development Project - Team working

text: We have a development project in Python (ArcGIS 10). This project involves a mixture of toolboxes, map templates, layer files, file geodatabase templates (acting as templates being imported into a map by scripts) and various other things. We use Eclipse as our source editor and SVN as our Source Code Repository. Though we have a problem with keeping all the files (that aren't py files) in a synchronised project by everyone. The toolbox routinely gets messed up by multiple people editing the toolbox and then template files get adjusted and then not updated for other people as they are not checked back in. How are people in organisations with more than one python developer on a company toolbox project ensuring that the project and all the different files are get versioned and managed correctly? Or is it a case through everything goes into Eclipse (including template layers and GDB's used by the scripts) into the project and hope that people check out the files correctly? Many thanks Rob


title: How to move the QGIS Layerpanel/Dockwidget programmatically

text: i'm working on a QGIS-plugin and want to move the default LayerPanel/Dockwidget to somewhere else programmatically. More specific: i want to move it into a tab of my tabwidget. Is this possible? How can i get access to that specic dockwidget out of python?


title: "Combo-box" for ArcGIS Java script API (ver. 3.1)

text: I am using combo-box in ArcGIS Java script API (ver.2.8). When I update the version to 3.1 it gives an error "TypeError: _2d.store.query is not a function" Can anybody tell me that "Combo-box" effect is removed in 3.1 version ?? I am trying to make similar type example (Click here) Any help will be great.. thanks in advance : )


title: openlayers + mapserver: controlling tiles

text: I have a mapserver serving the following mapfile:               MAP         NAME "GLOBCOVER MAP"         # Map image size         SIZE 1000 1000         UNITS meters              EXTENT -30.001389 -30.106069 80.998611 80.108847              PROJECTION             'proj=longlat'             'ellps=WGS84'             'towgs84=0,0,0,0,0,0,0'             'no_defs'         END              # Background color for the map canvas -- change as desired         IMAGECOLOR 255 255 255         IMAGEQUALITY 95         IMAGETYPE agg              OUTPUTFORMAT             NAME agg             DRIVER AGG/PNG             IMAGEMODE RGB         END              # Legend         LEGEND             IMAGECOLOR 255 255 255             STATUS ON             KEYSIZE 18 12             LABEL             TYPE BITMAP             SIZE MEDIUM             COLOR 0 0 89         END     END          # Web interface definition. Only the template parameter     # is required to display a map. See MapServer documentation     WEB         # Set IMAGEPATH to the path where MapServer should         # write its output.         IMAGEPATH '/tmp/'              # Set IMAGEURL to the url that points to IMAGEPATH         # as defined in your web server configuration         IMAGEURL '/tmp/'              # WMS server settings         METADATA             'ows_title'           'QGIS-MAP'           'ows_onlineresource'  'http://localhost/cgi-bin/mapserv?map=/opt/local/apache2/htdocs/eth_luc.map'       'ows_srs'             'EPSG:4326'     END          #Scale range at which web interface will operate     # Template and header/footer settings     # Only the template parameter is required to display a map. See MapServer documentation     TEMPLATE 'fooOnlyForWMSGetFeatureInfo'     END          LAYER       NAME 'GLOBCOVER_L4_200901_200912_V2.3'       TYPE RASTER       DUMP true       TEMPLATE fooOnlyForWMSGetFeatureInfo     EXTENT -30.001389 -30.106069 80.998611 80.108847       DATA '/Users/calvin/work/luc/proj_public/media/GLOBCOVER_L4_200901_200912_V2.3.tif'       METADATA           'ows_title' 'GLOBCOVER_L4_200901_200912_V2.3'       END       STATUS OFF       TRANSPARENCY 100       PROJECTION           'proj=longlat'           'ellps=WGS84'           'towgs84=0,0,0,0,0,0,0'         'no_defs'        END     END          END      A png is dynamically generated by mapserver and shown on the web browser as expected from what is specified in my mapfile's EXTENT. The url can be seen in the screenshot here:- ![enter image description here](http://i.stack.imgur.com/7Hq7C.png) However, when I attempt to make use of openlayers to do the same using the same mapfile, by means of this openlayers code snippet:               <script type="text/javascript">         $(document).ready(function() {             var lon = 5;             var lat = 40;             var zoom = 5;             var map, layer;             var defaultProjection = new OpenLayers.Projection("EPSG:4326")                  map = new OpenLayers.Map({                 div: 'map',                  displayProjection: defaultProjection             });             layer = new OpenLayers.Layer.MapServer(                  "GLOBCOVER_L4_200901_200912_V2.3",                  "http://localhost/cgi-bin/mapserv",                 {                     map: '/opt/local/apache2/htdocs/eth_luc.map',                     srs: 'EPSG:4326',                     isBaseLayer: true                 });             console.log(layer);             map.addLayer(layer);             map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);             map.addControl( new OpenLayers.Control.LayerSwitcher() );             console.log(map)         });     </script>      all I am getting are 36 instances of white PNGs tiled and displayed on the browser, as seen here:- ![enter image description here](http://i.stack.imgur.com/Ai8Hl.png) **What am I missing in order to serve my dynamically generated mapserver tiles (PNGs) on openlayers? (with the same visual result as what was done by the pure mapserver solution)**


title: Get shortest distance between two geometries in ArcPy

text: I'm using ArcPy and using a cursor to step through one polygon feature class. For each of these 'source' polygons, I am creating a SearchCursor to find all polygons in a second feature class that share a common attribute. For each of these matching polygons, I want to measure the distance between it and the search polygon. I also plan on measuring other geometry differences (to determine if it has just been shifted, rotated, scaled, etc). The purpose of this work is to build up a change history between polygon datasets representing features at different times. I've seen the ReturnDistance method mentioned in ArcObjects, but can't figure out how to run this using ArcPy. Is it possible, and if so, can anyone help with some rough sample code? If not, I'll probably resort to measuring the change in centroid position between the polygons. Thanks, Steve


title: Feature Service layer issues

text: What is the maximum number of records returned by WFS protocol? What is maximum number of records returned by a Feature Layer in ArcGIS Server 10.1? What is maximum number of records the ArcGIS JavaScript 3.1 feature layer can display? I am facing a peculiar problem in ArcGIS Server 10.1 and ArcGIS JavaScript API 3.1. In the capability tab, if I set the maximum number of records to more than 13,000 records, then the layer is not displayed. I am using a relational database and joining 5-6 tables to get the desired data.


title: Using 'gdalwarp' in Python script for Grass

text: I'm writing a Python script that aims to re-project various LANDSAT tiles into a common projection and then import the tiles into Grass. The script at present is shown below:               #!/usr/bin/python          import os     import sys     import glob     import grass.script as grass          def import_tifs(dirpath):         for dirpath, dirname, filenames in os.walk(dirpath):             for tile in filenames:             if tile.upper().endswith('.TIF'):                     full_path = os.path.join(dirpath, tile)                          name = os.path.splitext(tile)[0]                     rename = name[:-4] + '.' + name[-2]             new_path = os.path.join(dirpath, rename)             re_project = 'EPSG:32643'                     grass.message('Importing %s -> %s@%s...' % (tile, name, dirpath))                            grass.run_command('gdalwarp',                       '-t_srs',                       re_project,                       full_path,                       new_path)                     grass.run_command('r.in.gdal',                                       flags = 'e',                                       input = full_path,                                       output = name,                                       quiet = True,                                       overwrite = True)          def main():                                          if len(sys.argv) == 1:                                       for directory in filter(os.path.isdir, os.listdir(os.getcwd())):                 import_tifs(directory)         else:             import_tifs(sys.argv[1])                if __name__ == "__main__":        main()      I'm having real trouble using the 'gdalwarp' command to reproject the LANDSAT tiles. I keep getting the following error:               Traceback (most recent call last):       File "C:/Users/Simon/Documents/import_landsat3.py", line     76, in <module>         main()       File "C:/Users/Simon/Documents/import_landsat3.py", line     73, in main         import_tifs(sys.argv[1])       File "C:/Users/Simon/Documents/import_landsat3.py", line     31, in import_tifs         new_path)       File "C:\GRASS64\etc\python\grass\script\core.py", line     189, in run_command         ps = start_command(*args, **kwargs)       File "C:\GRASS64\etc\python\grass\script\core.py", line     167, in start_command         args = make_command(prog, flags, overwrite, quiet,     verbose, **options)       File "C:\GRASS64\etc\python\grass\script\core.py", line     124, in make_command         raise ScriptError("'-' is not a valid flag")     grass.script.core.ScriptError: "'-' is not a valid flag"      I'm assuming this is related to '-t_srs' but I haven't been able to work out a way around the problem - can anyone suggest how to do this? Many thanks.


title: Web mapping within ASP MVC 3 framework

text: Just curious if anyone has used the ASP MVC 3 framework for creating web mapping applications. I have one coming up and am planning on using the ArcGIS javascript API. Would be interested in hearing if anyone has had success or their pitfalls using this framework. Anyone try connecting to SDE with MVC3?


title: Java + GMaps JSF + PostGis + JasonSanford / geojson-google-maps

text:
Guys want to test how to plot lines and points in google maps using Java + JSF + PostGIS + GMaps JasonSanford / GeoJSON-google-maps. First have a spaceport in postgis with a table of rows and other points, after searching I thought it best to bring these geometries into a GeoJSON bank using ST_AsGeoJSON postgis function. The GeoJSON-google-maps do the job of converting the GeoJSON objects to google maps, specification: https://github.com/JasonSanford/geojson-google- maps But in practice I use this utility in java? Look GeoJSON.js put the script in the root of my project and in my head where I only index show any two points. How do I pass to my postgis GeoJSON returned by the script and return objects from google maps to my index? > >     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">    > > xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" > xmlns:f="http://java.sun.com/jsf/core" > xmlns:ui="http://java.sun.com/jsf/facelets" > xmlns:m="http://code.google.com/p/gmaps4jsf/"> >   >   >     <h:head>   >         <title> Facelet Title </title>   >            >          >          >   >     </h:head>   >     <h:body>   >
 GMaps4JSF
   >   >      >         <h:form id="form">   >   >             <h:panelGroup id="map">   >   >       >                 <m:map width="1000px" height="700px" latitude="30.01" > longitude="51.00" enableScrollWheelZoom="true">   >                     <m:marker latitude= "-30.038337"    longitude= > "-51.229502"/>   >                     <m:htmlInformationWindow latitude= "-30.038337" > longitude=    "-51.229502" htmlText="Point 1"/> >   >                     <m:marker latitude=    "-30.038246" longitude= > "-51.229631"/>   >                     <m:htmlInformationWindow latitude="-30.038246" > longitude="-51.229631" htmlText="Point 2"/> >   >                 </m:map> >   >             </h:panelGroup> >   This script Geojson.js > >     var GeoJSON = function( geojson, options ){ >   >     var _geometryToGoogleMaps = function( geojsonGeometry, options, > geojsonProperties ){ >   >         var googleObj, opts = _copy(options); >   >         switch ( geojsonGeometry.type ){ >             case "Point": >                 opts.position = new > google.maps.LatLng(geojsonGeometry.coordinates[1], >   > > geojsonGeometry.coordinates[0]); googleObj = new google.maps.Marker(opts); > if (geojsonProperties) { googleObj.set("geojsonProperties", > geojsonProperties); } break; >   >   >             case "MultiPoint": >                 googleObj = []; >                 for (var i = 0; i < geojsonGeometry.coordinates.length; > i++){ >                     opts.position = new > google.maps.LatLng(geojsonGeometry.coordinates[i][1], >   > > geojsonGeometry.coordinates[i][0]); googleObj.push(new > google.maps.Marker(opts)); } if (geojsonProperties) { for (var k = 0; k < > googleObj.length; k++){ googleObj[k].set("geojsonProperties", > geojsonProperties); } } break; >   >   >             case "LineString": >                 var path = []; >                 for (var i = 0; i < geojsonGeometry.coordinates.length; > i++){ >                     var coord = geojsonGeometry.coordinates[i]; >                     var ll = new google.maps.LatLng(coord[1], coord[0]); >                     path.push(ll); >                 } >                 opts.path = path; >                 googleObj = new google.maps.Polyline(opts); >                 if (geojsonProperties) { >                     googleObj.set("geojsonProperties", geojsonProperties); >                 } >                 break; >   >             case "MultiLineString": >                 googleObj = []; >                 for (var i = 0; i < geojsonGeometry.coordinates.length; > i++){ >                     var path = []; >                     for (var j = 0; j < > geojsonGeometry.coordinates[i].length; j++){ >                         var coord = geojsonGeometry.coordinates[i][j]; >                         var ll = new google.maps.LatLng(coord[1], coord[0]); >                         path.push(ll); >                     } >                     opts.path = path; >                     googleObj.push(new google.maps.Polyline(opts)); >                 } >                 if (geojsonProperties) { >                     for (var k = 0; k < googleObj.length; k++){ >                         googleObj[k].set("geojsonProperties", > geojsonProperties); >                     } >                 } >                 break; >   >             case "Polygon": >                 var paths = []; >                 var exteriorDirection; >                 var interiorDirection; >                 for (var i = 0; i < geojsonGeometry.coordinates.length; > i++){ >                     var path = []; >                     for (var j = 0; j < > geojsonGeometry.coordinates[i].length; j++){ >                         var ll = new > google.maps.LatLng(geojsonGeometry.coordinates[i][j][1], >   > > geojsonGeometry.coordinates[i][j][0]); path.push(ll); } if(!i){ > exteriorDirection = _ccw(path); paths.push(path); }else if(i == 1){ > interiorDirection = _ccw(path); if(exteriorDirection == interiorDirection){ > paths.push(path.reverse()); }else{ paths.push(path); } }else{ > if(exteriorDirection == interiorDirection){ paths.push(path.reverse()); > }else{ paths.push(path); } } } opts.paths = paths; googleObj = new > google.maps.Polygon(opts); if (geojsonProperties) { > googleObj.set("geojsonProperties", geojsonProperties); } break; >   >   >             case "MultiPolygon": >                 googleObj = []; >                 for (var i = 0; i < geojsonGeometry.coordinates.length; > i++){ >                     var paths = []; >                     var exteriorDirection; >                     var interiorDirection; >                     for (var j = 0; j < > geojsonGeometry.coordinates[i].length; j++){ >                         var path = []; >                         for (var k = 0; k < > geojsonGeometry.coordinates[i][j].length; k++){ >                             var ll = new > google.maps.LatLng(geojsonGeometry.coordinates[i][j][k][1], >   > > geojsonGeometry.coordinates[i][j][k][0]); path.push(ll); } if(!j){ > exteriorDirection = _ccw(path); paths.push(path); }else if(j == 1){ > interiorDirection = _ccw(path); if(exteriorDirection == interiorDirection){ > paths.push(path.reverse()); }else{ paths.push(path); } }else{ > if(exteriorDirection == interiorDirection){ paths.push(path.reverse()); > }else{ paths.push(path); } } } opts.paths = paths; googleObj.push(new > google.maps.Polygon(opts)); } if (geojsonProperties) { for (var k = 0; k < > googleObj.length; k++){ googleObj[k].set("geojsonProperties", > geojsonProperties); } } break; >   >   >             case "GeometryCollection": >                 googleObj = []; >                 if (!geojsonGeometry.geometries){ >                     googleObj = _error("Invalid GeoJSON object: > GeometryCollection object missing \"geometries\" member."); >                 }else{ >                     for (var i = 0; i < geojsonGeometry.geometries.length; > i++){ > > googleObj.push(_geometryToGoogleMaps(geojsonGeometry.geometries[i], >   > > opts, geojsonProperties || null)); } } break; >   >   >             default: >                 googleObj = _error("Invalid GeoJSON object: Geometry object > must be one of \"Point\", \"LineString\", \"Polygon\" or >   > > \"MultiPolygon\"."); } >   >   >         return googleObj; >   >     }; >   >     var _error = function( message ){ >   >         return { >             type: "Error", >             message: message >         }; >   >     }; >   >     var _ccw = function( path ){ >         var isCCW; >         var a = 0; >         for (var i = 0; i < path.length-2; i++){ >             a += ((path[i+1].lat() - path[i].lat()) * (path[i+2].lng() - > path[i].lng()) - (path[i+2].lat() - path[i].lat()) * (path[i+1].lng() - > path[i].lng())); >         } >         if(a > 0){ >             isCCW = true; >         } >         else{ >             isCCW = false; >         } >         return isCCW; >     }; >   > > var _copy = function(obj){ var newObj = {}; for(var i in obj){ > if(obj.hasOwnProperty(i)){ newObj[i] = obj[i]; } } return newObj; }; >   >   >     var obj; >   >     var opts = options || {}; >   >     switch ( geojson.type ){ >   >         case "FeatureCollection": >             if (!geojson.features){ >                 obj = _error("Invalid GeoJSON object: FeatureCollection > object missing \"features\" member."); >             }else{ >                 obj = []; >                 for (var i = 0; i < geojson.features.length; i++){ > > obj.push(_geometryToGoogleMaps(geojson.features[i].geometry, opts, >   > > geojson.features[i].properties)); } } break; >   >   >         case "GeometryCollection": >             if (!geojson.geometries){ >                 obj = _error("Invalid GeoJSON object: GeometryCollection > object missing \"geometries\" member."); >             }else{ >                 obj = []; >                 for (var i = 0; i < geojson.geometries.length; i++){ >                     obj.push(_geometryToGoogleMaps(geojson.geometries[i], > opts)); >                 } >             } >             break; >   >         case "Feature": >             if (!( geojson.properties && geojson.geometry )){ >                 obj = _error("Invalid GeoJSON object: Feature object missing > \"properties\" or \"geometry\" member."); >             }else{ >                 obj = _geometryToGoogleMaps(geojson.geometry, opts, > geojson.properties); >             } >             break; >   >         case "Point": case "MultiPoint": case "LineString": case > "MultiLineString": case "Polygon": case "MultiPolygon": >             obj = geojson.coordinates >                 ? obj = _geometryToGoogleMaps(geojson, opts) >                 : _error("Invalid GeoJSON object: Geometry object missing > \"coordinates\" member."); >             break; >   >         default: >             obj = _error("Invalid GeoJSON object: GeoJSON object must be one > of \"Point\", \"LineString\", \"Polygon\", \"MultiPolygon\", >   > > \"Feature\", \"FeatureCollection\" or \"GeometryCollection\"."); >   >   >     } >   >     return obj; >   > > };


title: Can I use QGIS with Qt5?

text: I want to use QGIS with Qt 5.But i don't know the exact relationship between Qt and QGIS.Will there some problems if i use qgis with qt5 or it will not depand on it...


title: Multiply a raster list with a field value list in a FOR loop in ArcPy

text: I'm trying to create a simple map algebra calculation not managed by ModelBuilder, but writing it in Python is trickier than I thought. I have a list of raster in a GDB and I must multiply them by each value contained in a population field. I created my raster list, the a search cursor for the population value, and I use everything in 2 nested FOR loop to do my multiplication.               # Import arcpy module     import arcpy     from arcpy import env     from arcpy.sa import *          #Check Spatial Analyst extension     arcpy.CheckOutExtension("Spatial")          # Set the current workspace to iterate on rasters     arcpy.env.workspace = "D:/PROJECTS/03_2014_AB_HYDRO_MODELLING/02_TRANSFORM_DATA/WPWFS/WaterSupplyVulnerability.gdb"          #Variables     PiS = "D:/PROJECTS/03_2014_AB_HYDRO_MODELLING/02_TRANSFORM_DATA/WPWFS/SurfaceWaterUtilities.gdb/SurfaceWaterNetwork/SurfUtsAB_Proj_corr25m" # Water treatment station feature class     Pi = ["POPN_CURRE"] # Get the population value in the field "POPN_CURRE" for each water treatment station     WiS = arcpy.ListRasters("WEI*", "All") # Create a list of rasters     Qn = arcpy.Raster('WaterYield_CubicMeters_SqKm_Year') # Water yield raster          #  For each Station's population Pi in All stations PiS, multiply POPN_CURRE with rasts (119 rasters)     with arcpy.da.SearchCursor(PiS, Pi) as cursor:         for row in cursor:             row.next()             for Wi in WiS:                 print Wi                 WiPi = Wi * row                 WiPi.save("D:/PROJECTS/03_2014_AB_HYDRO_MODELLING/02_TRANSFORM_DATA/WPWFS/WaterSupplyVulnerability.gdb/WiPi" + row)                 WiPiS = arcpy.ListRasters("Wi*", "All") # Create a list to iterate through WiPi calculation rasters                 SWiPi = CellStatistics("WiPiS", "SUM", "DATA")                 SWiPi.save("D:/PROJECTS/03_2014_AB_HYDRO_MODELLING/02_TRANSFORM_DATA/WPWFS/WaterSupplyVulnerability.gdb/SWiPi" + row)                 IMPn = Qn * SWiPi                 IMPn.save("D:/PROJECTS/03_2014_AB_HYDRO_MODELLING/02_TRANSFORM_DATA/WPWFS/WaterSupplyVulnerability.gdb/IMPn" + row)             arcpy.Delete_management(WiPiS) #Delete intermediate raster from Times processing      It returns the following error : Runtime error               Traceback (most recent call last):       File "<string>", line 4, in <module>     TypeError: can't multiply sequence by non-int of type 'tuple'      I understand that my population field is not a integer, and so ? When I try the 2 for loop with just a print rather than the calculation, it works. So what is the function or method to call ? Thanks


title: How to display seismic lines from CSV?

text: I wish to display land seismic lines on a map. Land seismic lines are often not straight so often there is survey data for each shotpoint or every 5 shotpoints. Typically a shotpoint (SP) could be 25m or 50m apart. There are often many hundreds of SPs. The TDL loads as discrete points. I need to be able to identify the seismic line (that is in the TDL file) and also say every 100 SP. I cannot find a way to label SPs every 100 points, or to just label the line at the start and end. A typical file looks like:               Rad PROFIL_ID   SP  SWRF99TM_N  SWRF99TM_E       1   MC-81-313E  4   6414971 735192  6414387 1687468       2   MC-81-313E  5   6414988 735192  6414404 1687468     3   MC-81-313E  6   6415004 735192  6414420 1687468     4   MC-81-313E  7   6415020 735192  6414436 1687468      PROFIL_ID = Line number, SP is Shotpoint and the other 2 columns are XY coordinates.


title: IColor reporting BGR rather than RGB

text: I've created a single point in ArcMap 10.1 SP1, and set it's color (SimpleMarkerSymbol) to Red = `16`, Green = `0`, and Blue = `255`, or `1000FF` in hex. I saved that as a layer package, and opened it back up in a small C# application. When I query that point it reports it's color as `FF0010,` which is BGR and not RGB (spec). Is it possible that I'm doing wrong? I'm not finding any references to this issue anywhere. I can supply the code if need be.


title: problem with SelectLayerByAttribute management in script

text: hello my problem is that this tool works perfectly in IDLE or PyScripter programs, but if I use in the script in ArcGIS desktop this problem occurs: arcgisscripting.ExecuteError:ERROR 000582... why not executing in Arcgis script and the other progran yes? the tool SelectLayerByAttribute management is inside the arcpy.da.UpdateCursor this is my code:               import arcpy     import datetime     arcpy.env.overwriteOutput = True          territory= arcpy.GetParameterAsText(0)     path= arcpy.GetParameterAsText(1)     territory_lyr=  path+ "territorios_lyr"          arcpy.MakeFeatureLayer_management(territory,territory_lyr)     fields= ("FID", "avg_mindis", "I_conc", "Max_lenght","TamanoTerr")     with arcpy.da.UpdateCursor(territory,  fields) as cursor:         for row in cursor:             currentID= row[0]             where= "FID="+str(currentID)             arcpy.SelectLayerByAttribute_management(territory_lyr, "NEW_SELECTION",where)      ![Image ArcToolbox scrpit of Arcgis Desktop  and I am print the error in the line select by atribute](http://i.stack.imgur.com/bj46a.jpg)


title: OSR Python testSR.ImportFromEPSG(4326) returns empty spatial reference

text: This is empty using Python .ImportFromEPSG(4326):               import osr     #this fails:     testSR = osr.SpatialReference()     testSR.ImportFromEPSG(4326)     print testSR.ExportToPrettyWkt()          #why did the import from EPSG fail above?     testSR.SetWellKnownGeogCS("WGS84")     print testSR.ExportToPrettyWkt()     GEOGCS["WGS 84",     DATUM["WGS_1984", and so on...


title: How to calculate runoff in Rainfall Analysis?

text: I have 30 years daily rainfall data. How can i calculate the mean monthly runoff, minimum monthly runoff and maximum monthly runoff with the available rainfall data using GIS? I would like to use SCS curve number method for run off computation.


title: gdalwarp, cutline and postgis

text: I can not figure out how I directly can read a polygon into gdawarp's `-cutline` argument. My current approach is: `ogr2ogr -f "ESRI Shapefile" mydata.shp PG:"user=myuser dbname=gisdb" -sql "select * from polys where id='12345'"`   and then I run `gdalwarp -cutline mydata.shp in.tif out.tif` How could I skip the step with the shapefile? Thanks in advance for any hints


title: Mapserver MapFile label at polygons, how to say "not repeat"?

text: I am using Mapserver v5.6 and used MapFile with 2 layers. One layer to show polygon and other to show label at ST_PointOnSurface of the same polygon... **There are another way to show unique-label** at POSITION CC of the polygon? I tested `REPEATDISTANCE 9999` but no effect. Even Mapserver v6 documentation have no instruction about "no-repeat" options. The polygon-layer was tested (with no effect) with this mapfile fragment for label                     LABEL             ALIGN center             FONT "ubuntu"             TYPE TRUETYPE             SIZE 15             POSITION CC             COLOR 255 0 0             REPEATDISTANCE 9999             OUTLINECOLOR 50 200 60           END #label


title: Cannot use a SnapAgent alone?

text: I'm trying to use a standalone snap agent. Is that not possible? Here's some code:                       // instantiate these agents.             _snapSupportAgent = new FeatureSnapClass();             _snapSupportAgent.FeatureClass = _parcelSplitLine;             _snapSupportAgent.HitType = esriGeometryHitPartType.esriGeometryPartBoundary;                  _snapParcelAgent = new FeatureSnapClass();             _snapParcelAgent.FeatureClass = _parcelSplitLine;             _snapParcelAgent.HitType = esriGeometryHitPartType.esriGeometryPartBoundary;      Later on code:                       var newPoint = new PointClass();             _snapParcelAgent.Snap(null,newPoint,1);      When I do that, I get a nasty protected memory exception. I'm editing directly to a IWorkspaceEdit, without interference of the IEditor.


title: Filling in Donut Polygons using ArcGIS for Desktop?

text: I have a set of polygons that represent bodies of water. In the same feature are polygons that are the islands in the body of water. So for a given lake, there are smaller polygons within that represent the islands in the same feature. However, the actual water polygon itself for that lake there are "holes" where the islands exist. So for a lake with one island in the middle, the water polygon would look like a donut. Now I want to create a layer of water polygons with the holes filled in, so that when I want to view all the lakes in a map, I can see all the water polygons without holes in them. Note: An island may contain bodies of water within itself. There may even be nested bodies of water within an island, which is part of a body of water that is part of another island. Kind of like an inception of water/islands :-). How would I be able to do this in ArcGIS for Desktop?


title: ArcGIS Mobile projects access from Field device

text: I am trying to figure out how to allow field users to connect to ArcGIS Server based mobile services within an enterprise environment. As part of this, I am asking network security to allow this access from Trimble GPS units. We are going to be doing this for the first time and data sensitivity is an issue. I am looking for some feedback from other users with similar experience within enterprise environment. I know that I need to allow access to mobile projects but I am curious if there is any other access that we need to provide. I want to have as much detail as possible for network security team.   *http://ArcGIS/Mobile/Content/WindowsMobile/Projects Appreciate any input. Thanks


title: Mod Tiles configuring probelem

text: I have installed all most every requirements to configure Mod Tiles. When I am trying to install it by ./autogen.sh its not installing. Its replying               ./autogen.sh: 2: ./autogen.sh: autoreconf: not found      Can any body tell me whats happen?


title: Not rendered pois on OpenStreetMap

text: There are a few poi that I can see on Josm that are not rendered to the final map. OSM database contains them at least for some month. I can' figure out why the doesn't appear on the map. Example poi ids:               2022172177     2011325312     1579653536     1572586097     1750804585      Any idea? Thanks, Hubi


title: How to add field with filename when merging shapefiles with ogr2ogr?

text: I'm merging some shapefiles and I had some problems doing so inside QGIS, so i'm using ogr2ogr directly. I'm doing this (in a batch):               ogr2ogr -overwrite %destination% %n1%     ogr2ogr -update -append %destination% %n2% -nln all_new     ogr2ogr -update -append %destination% %n3% -nln all_new     ogr2ogr -update -append %destination% %n4% -nln all_new      It works fine, but now I need to have in the resulting shapefile, a field with the names of the original shapefiles I merged. Doesn't sound very difficult, but I'm not managing to do it. Can anyone help? Thank you!


title: Space filling between random 2D lines

text: Consider a region (2D) filled with lines randomly (following Figure). We are interested in filling the empty spaces between lines including four boundary edges in a way: **0-** maximizing the size of parcels;   **1-** shape of filling parcels is square aligned horizontally or vertically;   **2-** shape of filling parcels is square, _i.e., relaxed alignment_ ;   **3-** **shape of filling parcels is any quadrangle.** _our original question_ So for now there are three different scenarios.   **_Note** that the lines are of the form `[x1,y1,x2,y2]` point set, real numbers._ [* * *] **_Ideas of possible solutions/algorithms/code snippets/etc are more than welcome._** ![enter image description here](http://i.stack.imgur.com/K0gTM.png) * * * **Update 1:** We could manage a solution for the first case:   ![enter image description here](http://i.stack.imgur.com/Pb8pZ.png)   **_Steps are:_**   **1-** lines   **2-** rasterizing lines into a bitmap   **3-** searching nearby cells for each cell of desired color (i.e., the same color) with an objective function to maximize the area i.e., the number of cells. It works well however it covers only the first scenario and it is also slow. * * * **Update 2:**   We assumed that the reader is familiar with the concept of space-filling- tiling. You may follow the link for inspiration. However note that our problem is different. As we do not fill the empty space randomly and we do not chose the size randomly. The solution should be iterative. For all the cases, there is no limit on the number of parcel being fitted. Indeed, it is up to user to limit the iteration number, by choosing a minimum area for parcels, for example. This is obvious in the example given above in which we discretized lines into pixels with specified size. That is, the procedure should run until entire empty area is filled respecting the criterion e.g., the maximum area of parcels. * * * **Update 3:**   _summary:_   One application is to find out the distribution of extractable intact 'rock' blocks in a heavily fractured 'mine'. This could be very helpful for many aspects including drilling design, financial evaluation etc.   _description:_   For a mine of decorative rock (stone) the products which are the blocks of intact rocks cut as rectangular cubes the price is closely dependent to the size of the block. Extraction of a block from a suitable area i.e., with no major fracture will be desired if the amount of remaining parts is small as possible. Usually, the small pieces of rocks have no economic value relatively and are considered so as waste.   The question in this post investigates solutions for this kind of problem. **A mathematical view for the problem can be stated as follows:**   **2D:** Find all rectangles that could be extracted from a given 2D region with some lines optimized for larger rectangle size as possible.   **3D:** Find all rectangular cubes that could be extracted from a given 3D region with some sub-planes (better: polygons) optimized for larger block size as possible. * * * Since this is part of an on-going research, some of the questions asked in the comments below do not have certain answers that we can provide. We believe that the provided information here so far is indeed enough to get the overall picture of the problem. Nevertheless, we provide some details as we can for community benefits.   You may put some restrictions on the solution for the ultimate question, although, we believe it is always possible to add more later. For example, follow these: {2D case}   The best size of a block (economically optimum rectangle) to be extracted under the conditions mentioned above, is `1x1 m` given `10x10 m` for the region in the example. This is one constraint defined based on economical value. The minimum workable size for cutting etc, let be `0.15x0.15 m`; so this the second size limit.   ![enter image description here](http://i.stack.imgur.com/akj12.jpg)   The figure above shows the economic value function depending to the block size. So for this particular case every rock piece smaller than `0.15x0.15 m` is just waste. There will be no block size larger than `1.7x1.7 m` due to operation limits.


title: How to migrate data from ArcSDE to PostGIS?

text: Its been suggested that i ask this question again, but perhaps worded differently than how to Bulk load multiple shapefiles into PostGIS. I'm new to postgis and sql but i want to use postgis as a slave (for the time being) to ArcSDE. Therefore what i'm after is some help in woking out how i might go about batch uploading ArcSDE data into PostGIS every night. I can produce a python script to export ArcSDE data into SHP nightly, but i'm then not sure how to then batch upload the exported SHP files into PostGIS, overwriting those that already existed in postgis all as an automative task (batch file i guess). My grand plan is to replace ArcSDE/ArcGIS in time with PostGIS, QGIS and GeoServer or MapServer. Any help would be great.


title: How to use the Oracle Spatial functions inside ms4w MAPFILE DATA string?

text: How to use Oracle Spatial functions in the DATA queries of MapServer(ms4w 3.0.3)? I am getting the following error while trying to highlight selected features which lie inside a particular boundary : > msDrawMap(): Image handling error. Failed to draw layer named > 'thematic_layer'. msOracleSpatialLayerWhichShapes(): OracleSpatial error. > Error parsing OracleSpatial DATA variable. Following is the query I am using in the DATA string :               DATA "geom from (select S.XFM_ID as XFM_ID,S.LOCATION as LOCATION,S.OGC_GEOMETRY as geom from STRAND S,NODEBOUNDARY NB where SDO_RELATE(S.OGC_GEOMETRY,NB.OGC_GEOMETRY,'mask=inside')='TRUE' and NB.NODENAME='PUGA2003' and S.LOCATION in ('A','2')) as FOO USING UNIQUE XFM_ID SRID 2622 VERSION 10g"


title: OpenStreetMap data into ESRI CityEngine

text: I am trying to download building footprints from OpenStreetMap so I can import them into ESRI's CityEngine but I am only able to download road files (as routes), as seen below. I am trying to download a section of Seoul (Gangnam) to display the area in CityEngine. I am a newbie to downloading OSM data and any advice is appreciated! Thanks~ ![Image 1 example](http://i.stack.imgur.com/NAyCf.png) ![Image 2 example](http://i.stack.imgur.com/EoqP9.png)


title: Does the Chamberlin trimetric projection map (some) great circles to straight lines?

text: ![Chamberline trimetric projection from wikipedia](http://i.stack.imgur.com/WXru8.png) I know that, in general, the Chamberlin trimetric projection maps _most_ great circles on the sphere to some sort of non-straight curve on the flat map. But what about the 3 special great circles that go through each pair of the 3 control points of the Chamberlin trimetric projection? Does the Chamberlin trimetric projection map those 3 great circles to straight lines on the flat map?


title: How to debug Geoserver HTTP response code: 400?

text: We are using opengeo 2.4.3, and trying to open some layers with geoserver through WMS. The different layers in the WMS file are detected, but when doing 'layer preview', we get the following error:               'org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:871)      at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:290)      ... 88 more      Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:8080/thredds/wms/conakry.nc?SERVICE=WMS&LAYERS=tz&FORMAT=image%252Fpng&TRANSPARENT=FALSE&HEIGHT=512&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=512&BBOX=-21.017490386963,3.9957752227786,-9.0176734924312,15.99559211731&STYLES=&SRS=CRS:84&VERSION=1.3.0'       The thing is that we have previously done this with the geoserver 2.1.1 version and everything worked fine. We have checked the URL causing the problem, and pasting the URL into a web-browser and changing the 'SRS' bit to CRS bit seems to be working somehow... Can someone please help us on this issue? Otherwise, does somebody know how to use another version of geoserver in the opengeo suite Best regards, Juan


title: Uninstalled Chrome now arctoolbox won't work

text: I have a big problem - I installed google earth for a project and when I went to uninstall chrome that it forced onto my computer now Arctoolbox won't work at all. I can see the toolbox but whenever I click on a tool it tries to open a chrome html and I get an error Navigation to the webpage was canceled. I've tried to search on the internet, reboot, anything. I don't understand why this is happening and I really need ArcMap back! also I don't really want to uninstall - I have the educational version and I don't think I can reinstall it again.


title: How can I view a KMZ on an iPad?

text: Greetings everyone! So work is finally catching up to the present and buying my group iPads. My group does extensive field work and currently uses giant laptops to run our GIS software, Google Earth being one of the primary pieces of software. My question is how can I load a KMZ that contains 3 layers of data that is 600kb in size onto my iPad and be able to view it through the GE iPad app? Does it have to be hosted or can I load it locally on the iPad?


title: Running EsriRegAsm on Windows 7 without running as Administrator?

text: Even though I'm logged in as a user with admin privs, Windows 7 still won't let me register with EsriRegAsm.exe. I need to explicitly run as Administrator. Is there some way to configure a machine so that I can use EsriRegAsm without running as administrator? > Starting with ArcGIS 10, it has been decided to move away from the COM > component category approach. The replacement consists of a new registration > utility (ESRIRegAsm.exe) and an Extensible Markup Language (XML) database > stored in published per product and version configuration folders, > independent of the system registry; therefore, the registration of component > and category information for a developer’s assembly or dynamic-link library > (DLL) is achieved using the new ESRI provided utility called ESRIRegAsm. > ESRIRegAsm performs registration on both native COM DLLs and managed COM > assemblies, and as previously discussed, **does not write the component > category portion of the registration information into the system registry**. Update: So does it write _anything_ to the system registry? If not, why should admin privs be required for installation?


title: How to maintain integrity between changing street network and geocoded points?

text: We maintain hundreds of thousands of points geocoded against a dual-centerline Navteq street network. We are faced with the challenge of maintaining referential integrity between our points and the street network, which changes with each Navteq update. A high percentage of our points are geocoded manually, so we can't just run them again through an automated geocode process. Some points are geocoded by street address, others by distance and direction from an intersection, still others by GPS coordinates. In each case we need to retain the closest possible match on the updated street network. I solved this problem once before on a single-centerline network, using linear referencing, geocoding, and snapping techniques, but the process was very rigid and brittle. (See http://thewyvern.co/Thesis.final.pdf for details.) Has anyone else confronted this problem? Do you have any suggestions? Can you point to any research out there that could help us develop a robust solution? _For context: we are using a custom geocoding algorithm coded in ArcObjects, which relies only partly on ESRI's Locator class. Our system is based on ArcGIS Server 9.3.1, with data stored in ArcSDE 9.3.1 on Oracle. Navteq data is delivered in shapefile format._


title: New values created with QGIS field calculator become null upon saving

text: I'm having a problem with QGIS. I'm trying to create a new column in the attribute table for a shapefile. The numbers in the fourth column (see screenshots) are currently strings, so I want to convert them into real numbers. This seems to work just fine until I save my edits. Then all the values in the new column become null. ![enter image description here](http://i.stack.imgur.com/TET04.png) ![enter image description here](http://i.stack.imgur.com/5kz92.png) It looks like a couple of other people have had this problem (here and here) but they seemed to solve the problem by expanding the width of the output field (from 10 to 20). I tried that, and it didn't make a difference. Can anyone help?


title: Sum of areas in all each polygon layer?

text: I've got several layers/feature classes in an ArcMap 10 project. Thanks to everyone's help, I'm able to get the areas for the polygons contained within each layer. By opening the attribute tables for each layer, and right-clicking on the SHAPE_area column, I can obtain the total area for all the polygons in that layer. Is there a way to summarise the total areas for ALL of my polygon layers? Or do I have to do it manually for each one? Thanks! P.S. Just to illustrate, suppose I have layers A, B, and C, all of which contain multiple polygons. Right now, I have to right-click on each layer, open its Attribute Table, right click on the "SHAPE_area" field, click on Summarize (or Statistics), see the sum of all the cells, and manually copy that into a waiting Excel spreadsheet. Is there a "global" Summarize function so that I can get output like this (formatted to be comma delimited)? Layer, area A, 12 B, 13 C, 5


title: ImportError: 'No module named pyproj'

text: im running mac os X with native python 2.6.1 install . Later today installed GDAL complete pkg, and added the program to the shell path on the terminal with the folowing cmd : ~: echo "export PATH=/Library/Frameworks/PROJ.framework/Programs:$PATH" >>.bash_profile Resulting on my bash_file this following line : ~: echo "export PATH=/Library/Frameworks/PROJ.framework/Programs:$PATH" >>.bash_profile Now every time i try on terminal to import the pyproj i receive the error described on title. ps. go easy im new to Mac's/UNIXs and to osgeo in general. Many thanks Jorge


title: Can a “Join” be detected programmatically?

text: I have some Python code that is launched from within an ArcMap project. Any joins that the user may have created in the project must be removed in order for my code to run. Unfortunately, the code that removes a join… arcpy.RemoveJoin_management("layer1", "layer2")… also breaks some of the layer properties that are critical to my application (highlighted fields, read-only fields, etc). If joins are removed by right-clicking the layer in ArcMap and choosing “Remove Joins” the layer properties are left intact. If I can detect that a join exists from within my code, I will simply exit the code and display a message that the user must manually remove their joins before attempting to run the code. So… Can a Join be detected programmatically?


title: Text ShapeFile not displaying ArcGIS/ArcMap

text: I currently am trying to load different shp files in ArcObjects progromatically. Currently I can load lines,polylines, polygons and ellipses (even though that's just a fancy polygon as far as ArcObjects is concerned). However, I'm having a problem loading Text. Basically it's a point on a map with some text above it. This is how I'm trying to load the shape File. Note this is basically the same thing I do for polygons, polylines,and ellipses. The only notable difference is ITextSymbol as opposed to ISimpleFillSymbol for Polygons or ISimpleLineSymbol for Lines               IFeatureLayer featureLayer = new FeatureLayerrClass();     featureLayer.FeatureClass = myFeatureClass //Loaded from the featureWorkspace     featureLayer.Name = featureClass.AliasName;     featureLayer.Visibile = true;          IGeoFeatureLayer layer = featureLayer as IGeoFeatureLayer;          IRgbColor textColor = new RgbColorClass();     textColor.Red = 255;     textColor.Blue = 0;     textColor.Green =0;          ITextSymbol textSymbol = new TextSymbolClass();     textSymbol.Color = textColor;     textSymbol.Font = (stdole.IFontDisp)OLE.GetIFontDispFromFont(new Font("Arial", 12 , FontStyle.Bold);     textSymbol.Size = 12;     textSymbol.Text = myText;          ISimpleRenderer simpleRenderer = new SimpleRendererClass();     simpleRenderer.Symbol = textSymbol as ISymbol;     geoFeatureLayer.Renderer = simpleRenderer;          myAxMap.AddLayer(geoFeatureLayer as ILayer);     Invalidate();


title: How to detetmine county of GPS coordinate?

text: I have a SHP file that contains all counties in the USA. I also have roughly 100 million GPS locations. I need to tally the number of GPS locations per county. A linear search through the counties for each coordinate is obviously a bad idea. I'm guessing I need some sort of spatial data structure that will prune candidate counties drastically and was hoping this was a common enough query that canned solutions were already available. In other words, I pass in SHP records for the counties and then query the resultant data structure for some unique identifier (FIPS code) of the county from a GPS coordinate (represented as some Point object). My toolset is Python, shapely, fiona, etc.