Draw point on google map

i try to add google map on my own wms and wfs layer. everything works but when i create point, i intersect point geometry and my geojson data. So without googlemap it was run. But when add google map, points cordinates will be different and intersect result is wrong.you can see picture what i said. when i click on africa, intersect results is correct but i must click on my overlays layers. http://i.hizliresim.com/xVyDJj.png WFS_LAYER                wfs_layer = new OpenLayers.Layer.Vector("Point Layer",             {                      styleMap: new OpenLayers.StyleMap({                     "default": new OpenLayers.Style({                         pointRadius: 10, // sized according to type attribute                         fillColor: "#00FFFF",                         strokeColor: "#33CCCC",                         strokeWidth: 3,                         graphicZIndex: 1                     }),                 }),                      strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],                      protocol: new OpenLayers.Protocol.WFS({                     version: version,//1.1.0                     // loading data through localhost url path                     url: wfsUrl,                     featureNS: featureNS,                     visibility: true,                     // layer name                     featureType: featureType,                     // geometry column name                     srsName: "EPSG:900913",                     geometryName: geometryName,                     schema: schema,                      })             });      point intersect :                function mahalleBul(request) {                      var geojson_format = new OpenLayers.Format.GeoJSON({                     internalProjection: new OpenLayers.Projection("EPSG:900913"),                     externalProjection: new OpenLayers.Projection("EPSG:4326")                 });                 var getMahalle = geojson_format.read(request.responseText);                 if (getMahalle.length > 0) {                     mahalleadi = getMahalle[0].attributes.ADI;                     mahallegisID = getMahalle[0].attributes.GIS_ID;                 }     }      var request = OpenLayers.Request.GET({                 url: rootURL + "ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Kaski:ADRES_MAHALLE&outputFormat=json&cql_filter=INTERSECTS(the_geom," + feature.geometry + ")",                           callback: mahalleBul             });


How to convert WGS84 to UTM when the study area covers two zones: UTM 51N and 52N

I want to use ArcMap to convert the WGS84 to UTM. But the study area covers two zones: UTM 51N and 52N. Which zone should I choose to output the result?


Is there maximum number of .DBFs that can be joined using ModelBuilder?

Is there a maximum number of .DBFs that can be joined using the Join Tool in ModelBuilder? I tried joining 480 .DBFs but results generated only 250 fields in the input table. Is this a glitch? I am using ArcGIS for Desktop 10.2.


OGC Compliance Test for GeoServer WMS 1.1

I have installed OpenGeo Suite and using GeoServer installed under this suite. Now i want to get OGC Compliance Certificate for WMS.   For the same.. I have also import the cite data in GeoServer. Now when i am running the WMS1.1.1 test from OGC portal Team Engine page it is failed for following test results:   1. Test wms:wmsops-getmap-params-bgcolor-1   2. Test wms:wmsops-getmap-params-bgcolor-2   3. Test wms:wmsops-getmap-params-transparent-1   4. Test wms:wmsops-getmap-params-transparent-2   5. Test wms:wmsops-getmap-each-style   6. Test wms:wmsops-getmap-each-style The log of test 1 is:               Test wms:wmsops-getmap-params-bgcolor-1 type Mandatory default result Passed (s0028/d1e1515_1)          Assertion: When a GetMap request is made with no BGCOLOR parameter, then areas which are not covered contain white (0xFFFFFF) pixels.          Request d1e7670_1:        Method: get        URL: `http://182.71.192.178:8090/geoserver/wms?SERVICE=WMS&&HeIgHt=100&SrS=EPSG:4326&BbOx=0,-0.0020,0.0040,0&VeRsIoN=1.1.1&ReQuEsT=GetMap&LaYeRs=cite:Lakes&WiDtH=200&FoRmAt=image/png&StYlEs=`        Response from parser example:ImageStats:           <image_stats>                                                             <model value="RGB">                                                                     <subimage height="100" width="25" x="0" y="0">                                                                             <count bands="RGB" sample="0xffffff">25</count>                                                                     </subimage>                                                                     <subimage height="50" width="50" x="150" y="0">                                                                             <count bands="RGB" sample="0xffffff">50</count>                                                                     </subimage>                                                             </model>                                                     <!--Response received in [477] milliseconds--></image_stats>          Result: Failed      But when i am browsing the same url:               http://182.71.192.178:8090/geoserver/wms?SERVICE=WMS&&HeIgHt=100&SrS=EPSG:4326&BbOx=0,-0.0020,0.0040,0&VeRsIoN=1.1.1&ReQuEsT=GetMap&LaYeRs=cite:Lakes&WiDtH=200&FoRmAt=image/png&StYlEs=      it is giving the showing the same image according to test condition. Same is for tests 2, 3 and 4. Please help me to resolve the problems. Thanks & Regards, Manish Gupta


What is the distinction between Difference and Clip in QGIS?

What is the primary distinction between the **Difference** and **Clip** geoprocessing tools in QGIS?


Make Google Analytics city data showed on the Google map

I use the Google fusion table to table to mark city on google map, but there are about 20~25% which quality is ambiguous. How to make the ambiguous data precise?   Here is my finished map (scroll down to see map)


How can I use data from PDF map?

I have a map over Sweden with plenty of data represented as circles of various sizes. The map is saved as PDF from Illustrator, fully editable. I wonder if there is any way I could get these circles into Tilemill so that I can make a searchable georeferenced map? I don't know the projection but I would guess WGS84 or SWEREF99. One way that comes to mind is to extrakt the geodata from a geotiff of Sweden (if I find one with the same projection), place PDF-map on top of the geotiff in Illustrator/Photoshop and then use gdal to insert the geodata again. Any ideas if this is a good way, or if there are better methods?![enter image description here](http://i.stack.imgur.com/sL2Sf.png)


looking for a GPS device which can transmit the location directly

I am looking for a `GPS` device or receiver that can transmit its own location to a specified configured server directly. there will be no medium like mobile phone or computer in between GPS and Server which receives the data. a dongle sort of thing which has a sim card in it and with the use of that it can transfer data directly to server


Capturing/overriding mousewheel zoom in openlayers

So I've created a map in openlayers and I am setting it up so that there are only certain zoom levels a user can see. I have the code created to handle forcing a user to the next acceptable zoom level when they attempt to zoom in/out. I have been able to create listener for handling double-clicks (see code below) but for the life of me I cannot figure out how to capture mousewheel events. The documentation makes it seem like it should be straightforward but I've been banging my head against a wall for more than a day trying to figure this out. All my googling has turned up plenty of results for disabling the mousewheel but nothing for capturing wheel events.               function init() {         map = new OpenLayers.Map('map_canvas',mapSettings);         ....         ....         );              var click = new OpenLayers.Control.Click();         map.addControl(click);         click.activate();     }          OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {         defaultHandlerOptions: {         'single': false,         'double': true,         'pixelTolerance': 0,         'stopSingle': false,         'stopDouble': false         },              initialize: function(options) {             this.handlerOptions = OpenLayers.Util.extend(             {}, this.defaultHandlerOptions             );             OpenLayers.Control.prototype.initialize.apply(             this, arguments             );             this.handler = new OpenLayers.Handler.Click(             this, {             'dblclick': this.trigger             }, this.handlerOptions             );         },              trigger: function(e) {             var lonlat = map.getLonLatFromViewPortPx(e.xy);             curZoom = map.getZoom();             var newZoom = stepZoomIn(map.getZoom());             updateMapZoom(newZoom);             map.setCenter(event.lonlat);         }          });


How to filter out multipart polygons and then buffer?

I've written a small script trying to accomplish the task described in the question title. It basically looks like:               in_fc = '...' # Some shapefile goes here          # Get the fields (column names) of the attribute table     desc = arcpy.Describe(in_fc)     shape_field = desc.ShapeFieldName          # Initialize an empty polygon list     singlepolys = []          # Open the attribute table of the shapefile     rows = arcpy.SearchCursor(in_fc)     for row in rows:         poly = row.getValue(shape_field)              # Check if single part (not multipart)         if not poly.isMultipart:             singlepolys.append(poly)          # Print areas of single polygons - just for debugging     for p in singlepolys:         print p.area          # Buffer code would go here...      The final printing of the areas shows that only multiples of the last polygon have been copied to the list singlepolys. I really don't understand why. Any help appreciated! **Edit** A clumsy work-around is possible (I've found a faster one but this is closer to the original thought). Here goes:               # ... Skipping initialization          # Open the attribute table of the shapefile     rows = arcpy.SearchCursor(in_fc)     for row in rows:         poly = row.getValue(shape_field)              # Check if single part (not multipart)         if not poly.isMultipart:             # Buffer this polygon only and add to list             geom = arcpy.Geometry()             result = arcpy.Buffer_analysis(poly, geom, '1000 Meters')             singlepoly_bufs.append(result[0])          # Now union the buffered features     out_geom = arcpy.Geometry()     union = arcpy.Union_analysis(singlepoly_bufs, out_geom)          # ... Skipping the end


What is the best way to change a data type in the ArcGIS attribute table?

What is the easiest way to change the data type in an attribute table in ArcGIS for multiple fields? Say if the fields have been exported as a string from Excel and I would like to use them as numerical values?


ArcGIS JS API - Can't draw results of Query Task

I have an ArcGIS JavaScript map that I'm trying to use with a Query Task. The query runs fine on the server side and the proper geometry is returned. Then, I draw the feature as follows:               var features = featureSet.features;          for (var i = 0; i < features.length; i++) {         var feature = features[i];         feature.setSymbol(lbSymbol);         feature.setInfoTemplate(lbInfoTemplate);         map.graphics.add(feature);     }      This was working for a while but it randomly broke and I can't figure out why. No errors -- the map just doesn't draw anything. If I listen for the `graphics-add` event on the graphics layer it fires and all the event data looks fine (including spatial reference, geometry, etc.) Can anyone think of why this wouldn't work or how else to troubleshoot? For what it's worth - this code to zoom to the extent of the feature is also broken:               var extent = esri.graphicsExtent(features);     if (extent) {         extent = extent.expand(3.0);         map.setExtent(extent);     }      The extent of esri.graphicsExtent(features) matches the extent of the feature. Not sure why the map doesn't zoom on setExtent. **UPDATE** : I noticed that graphics layer is referenced to WGS84, while the map and graphic feature are State Plane. I'm just using the built-in `map.graphics` layer -- I assumed this would match the spatial reference of the map automatically. Still puzzled.


How to count number of feature classes in geodatabase using ArcPy?

I would like to count the number of feature classes in a geodatabase. Some of the classes are in feature datasets as well. I have tried get count management, but that returns the number of rows in each feature class in the GDB.


Build a website to track GPS signals

I need to build a solution that allows me to track cellphones/tablets and display on a visual map. I think there are two parts, one is understanding the general architecture. The other is more detail. I have seen a few websites that do what i want to do.For example,the Android Device Manager lets you see where your devices are on a map. I'd envisage the tablets to be Android based so even if there is a SAAS solution that I could plug into my web page would be perfect Basically I was thinking of installing a generic app(possibly android) on a tablet/cellphone then capturing the gps data somehow through a web interface and displaying the tablets onto a single map on my webpage. A SAAS solution would work well or alternatively a javascript package to read the captured GPS co ordinates and display on a map. Any help is appreciated. Regards


I develop an application and I want to erase overlay features in a feature class in the application.I use ArcEngine 10. I don't have another layer that have erase features then i cant use erase tool in overlay toolset How to erase using feature(s) within the same feature class? is there any tools or programmatically way to do this? Thanks for advance ![enter image description here](http://i.stack.imgur.com/FDTYl.png)


Determining Natural Origin for a GeoTIFF file (Lambert Conic)

I am trying to display an existing GeoTIFF file (from the FAA WAC set) in an application that requires the GeoTIFF NaturalOriginLongitude tag (FalconView 5.1.1). There are some older files in that set that display OK, and newer files that don't appear. I'm confident that it is that tag (from running the code in a debugger, and from trying "fake" longitude values in files). That is, I know how to add the tag (using listgeo and geotifcp) as described in an earlier question, and adding the tag makes the file appear. However the values that I'm putting in aren't providing an appropriately georeferenced display. I've tried zero (because that seemed like something easy) and I've tried using the same value as is in FalseOriginLongitude (which is what the older files seemed to contain). Setting NaturalOriginalLongitude to be the same as the FalseOriginLongitude value is definitely better than setting it to zero, but its a little off in Longitude (a few minutes) and a lot off in Latitude (a few degrees). I tried some likely-looking google hits (especially an EPSG Guidance Note 7 Part2), but I didn't find anything that gives me the natural origin longitude (lambda0) value that I need. Here is the output of listgeo for a specific file that does not display.               $ listgeo CG-18\ WAC\ 42\ North.tif      TIFFReadDirectory: Warning, CG-18 WAC 42 North.tif: unknown field with tag 42112 (0xa480) encountered.     TIFFReadDirectory: Warning, CG-18 WAC 42 North.tif: unknown field with tag 42113 (0xa481) encountered.     Geotiff_Information:        Version: 1        Key_Revision: 1.0        Tagged_Information:            ModelTiepointTag (2,3):              0                0                0                              -833364.681326397491974.541710076 0                            ModelPixelScaleTag (1,3):               126.87142        126.87142        0                            End_Of_Tags.        Keyed_Information:           GTModelTypeGeoKey (Short,1): ModelTypeProjected           GTRasterTypeGeoKey (Short,1): RasterPixelIsArea           GTCitationGeoKey (Ascii,21): "PCS Name = CG-18 WAC"           GeographicTypeGeoKey (Short,1): GCS_NAD83           GeogCitationGeoKey (Ascii,24): "GCS_North_American_1983"           GeogAngularUnitsGeoKey (Short,1): Angular_Degree           GeogSemiMajorAxisGeoKey (Double,1): 6378137                     GeogInvFlatteningGeoKey (Double,1): 298.257222101               ProjectedCSTypeGeoKey (Short,1): User-Defined           ProjectionGeoKey (Short,1): User-Defined           ProjCoordTransGeoKey (Short,1): CT_LambertConfConic_2SP           ProjLinearUnitsGeoKey (Short,1): Linear_Meter           ProjStdParallel1GeoKey (Double,1): 38.66667                    ProjStdParallel2GeoKey (Double,1): 33.33333                    ProjFalseOriginLongGeoKey (Double,1): -118.085                    ProjFalseOriginLatGeoKey (Double,1): 36                          ProjFalseOriginEastingGeoKey (Double,1): 0                           ProjFalseOriginNorthingGeoKey (Double,1): 0                           End_Of_Keys.        End_Of_Geotiff.          Projection Method: CT_LambertConfConic_2SP        ProjFalseOriginLatGeoKey: 36.000000 ( 36d 0' 0.00"N)        ProjFalseOriginLongGeoKey: -118.085000 (118d 5' 6.00"W)        ProjStdParallel1GeoKey: 38.666670 ( 38d40' 0.01"N)        ProjStdParallel2GeoKey: 33.333330 ( 33d19'59.99"N)        ProjFalseEastingGeoKey: 0.000000 m        ProjFalseNorthingGeoKey: 0.000000 m     GCS: 4269/NAD83     Datum: 6269/North American Datum 1983     Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)     Prime Meridian: 8901/Greenwich (0.000000/  0d 0' 0.00"E)     Projection Linear Units: 9001/metre (1.000000m)          Corner Coordinates:     Upper Left    ( -833364.681,  491974.542)  (127d51'15.84"W, 40d 3'23.84"N)     Lower Left    ( -833364.681,  -31877.551)  (127d16'36.93"W, 35d21'26.95"N)     Upper Right   (  685286.216,  491974.542)  (110d 2'34.02"W, 40d10'41.37"N)     Lower Right   (  685286.216,  -31877.551)  (110d31' 8.78"W, 35d28'20.04"N)     Center        (  -74039.233,  230048.495)  (118d55'44.97"W, 38d 4'18.53"N)      There are also world files for each TIFF. Here is an example:               $ cat CG-18\ WAC\ 42\ North.tfw     126.8714200000     0.0000000000     0.0000000000     -126.8714200000     -833301.2456163971     491911.1060000764      There are also HTML files providing metadata, but it seems (to me) to be a subset of the GeoTIFF tags. Any suggestions for how to get a reasonable value for NaturalOriginLongitude from the information I have available?


How to fix "The entry point for the procedure sqlite3_open_v2 cannot be found in the dynamic link library sqlite3.dll"

### Translation: Hello, I have a problem installing version 1.0.8. The following error message appears: > The entry point for the procedure `sqlite3_open_v2` cannot be found in the > dynamic link library `sqlite3.dll` _[The next sentence is ungrammatical in the original and therefore its translation is in doubt.]_ Previously I had version 1.7 Wroclaw, which I uninstalled before installing the new one. Thank you for your help. ### Original Bonjour, J'ai un problème pour installer la version 1.0.8, le message d'erreur suivant apparait: > Le point d'entrée de procédure `sqlite3_open_v2` est introuvable dans la > bibliothèque de liens dynamiques `sqlite3.dll` J'avais avant d'installer la version 1.7 Wroclaw que j'ai désinstaller pour installer la nouvelle. Merci pour votre aide.


online map of 242,888 locations: which service to use? (what if temporal heat map?)

I have a 161.8 MB large CSV file with geocoded locations (with latitude and longitude) for 242,888 lines. I want to have an embeddable online map of all this. I wonder which service could deal with this amount of data, and what you'd recommend. Relevant details: — if the data looks too big (162 MB), I can cut down on fields, some are extraneous. But others would be nice to link to the points on the map, even if they are not strictly there for the mapping. (So people could navigate back to the original data source, e.g.) — I have date field for a temporal map. It would be great to use this to let viewers filter which points to show, or even better, show animated versions if possible. — one field would be good to use for showing intensity, hot spots on the map (viz. concentration of procurement contracts in space and time) — the data is the universe of procurement contracts in Hungary since 1998. So good Unicode support is a must, as is global coverage (though I think both are pretty standard these days).


My KMZ works for older versions of GE, but not the newer ones

I have a KMZ file which is a time animation. It used to work in the older GE, such as version 5 (I think). I can load the KMZ file in the newer GE, but do not see the animation control bar to play it. Something needs to be changed in the KMZ file, but cannot figure out. Here is the beginning and end of the KML file:               <?xml version="1.0" encoding="UTF-8"?>     <kml xmlns="http://earth.google.com/kml/2.0">     <Folder>       <name maxLines="1">ADCIRC_pbl</name>       <Snippet maxLines="1"><![CDATA[]]>       </Snippet>       <Folder><name><![CDATA[ahframe_legend]]></name><visibility>1</visibility><ScreenOverlay><visibility>1</visibility><overlayXY x="1" y="1" xunits="fraction" yunits="fraction" /><screenXY x="1" y="1" xunits="fraction" yunits="fraction" /><Icon><href>ahframe_legend.png</href></Icon></ScreenOverlay></Folder>     <Folder>     <name maxLines="1">ahframe_1: Image</name>       <Snippet maxLines="1"><![CDATA[]]>       </Snippet>       <GroundOverlay>         <TimeSpan>             <begin>2005-08-28T23:00:00z</begin>             <end>2005-08-28T23:30:00z</end>         </TimeSpan>         <name maxLines="1">ahframe_1</name>         <Icon>           <href>ahframe_1.png</href>           <viewBoundScale>1.0</viewBoundScale>         </Icon>         <LatLonBox>           <north>30.46</north>           <south>29.44</south>            <east>-88.3531</east>           <west>-89.6952</west>            <rotation>0</rotation>           </LatLonBox>        </GroundOverlay>       </Folder>     <Folder>     <name maxLines="1">ahframe_2: Image</name>       <Snippet maxLines="1"><![CDATA[]]>       </Snippet>       <GroundOverlay>         <TimeSpan>             <begin>2005-08-28T23:30:00z</begin>             <end>2005-08-29T00:00:00z</end>         </TimeSpan>         <name maxLines="1">ahframe_2</name>         <Icon>           <href>ahframe_2.png</href>           <viewBoundScale>1.0</viewBoundScale>         </Icon>         <LatLonBox>           <north>30.46</north>           <south>29.44</south>            <east>-88.3531</east>           <west>-89.6952</west>            <rotation>0</rotation>           </LatLonBox>        </GroundOverlay>       </Folder>     <Folder>      The KML file ends like this:               <name maxLines="1">ahframe_77: Image</name>       <Snippet maxLines="1"><![CDATA[]]>       </Snippet>       <GroundOverlay>         <TimeSpan>             <begin>2005-08-30T13:00:00z</begin>             <end>2005-08-30T13:30:00z</end>         </TimeSpan>         <name maxLines="1">ahframe_77</name>         <Icon>           <href>ahframe_77.png</href>           <viewBoundScale>1.0</viewBoundScale>         </Icon>         <LatLonBox>           <north>30.46</north>           <south>29.44</south>            <east>-88.3531</east>           <west>-89.6952</west>            <rotation>0</rotation>           </LatLonBox>        </GroundOverlay>       </Folder>      </Folder>      </kml>


GIS projection for non-geographic data

I am working on two different types of data. One is related to mapping of Genome structure and another is creating a layout of the inventories inside Internet Data Center. What I am confused about is what kind of projection do we use (if any) is such conditions. The reason using GIS APIs here is very helpful is that these projects also require the same layering of the information. So how do I create or structure the data? Should it also be shapefiles? What should their projections be? Can I use a shapefile to be hosted in Geoserver without projections? Please let me know if you need any more info.


Openlayers text layer is not working

I am trying to load markers from a text file using openlayers text layer, but no marker is shown, text file and icons are in same directory. However I am able to show markers using marker layer. My code is here and text file is also attached, kindly help me out.               function init()     {         /*     Create a new Map with Basic controls which are passed as     arguments     */     var map= new OpenLayers.Map('map_element',     {         controls:[         new OpenLayers.Control.Navigation(),         new OpenLayers.Control.PanZoomBar(),         new OpenLayers.Control.LayerSwitcher(),         //new OpenLayers.Control.Attribution()         ],         numZoomLevels:19,         units:'m'     }     );           // default lan/lat projection in which points will be provided      var epsg4326 = new OpenLayers.Projection("EPSG:4326");         /*      Create Basic Layers to show on map     */     // openstreetmap layer     var osm_map_layer = new OpenLayers.Layer.OSM (     'Open Street Maps'     );     // google map layer     var google_map_layer = new OpenLayers.Layer.Google(     'Google Street Maps',     {sphericalMercator: true,     maxExtent: new OpenLayers.Bounds(     -20037508.34,-20037508.34, 20037508.34, 20037508.34)}     );          /*     vector layer to draw custom shapes on map     */     var vectors = new OpenLayers.Layer.Vector("Vectors");     /*     markers layer will be used to insert markers on map     */     var markers = new OpenLayers.Layer.Markers( "Markers");         /*      layers are added to map     */     pois = new OpenLayers.Layer.Text( "My points", { location:"./pois.txt", projection:     map.displayProjection});     map.addLayer(pois);     map.addLayers(     [     osm_map_layer,     //google_map_layer,     //vectors,     markers,     pois     ]     );       //          var lonlat = new OpenLayers.LonLat(48.9459301,9.6075669);     lonlat.transform(epsg4326, map.getProjectionObject());     map.setCenter(lonlat, 15);     markers.addMarker(new OpenLayers.Marker(lonlat));                    } // last closing bracket      and text file lat lon title description icon iconSize iconOffset   48.9459301 9.6075669 Title One Description one   Second line.      (click again to close) Ol_icon_blue_example.png 24,24 0,-24   48.9899851 9.5382032 Title Two Description two. Ol_icon_red_example.png 16,16 -8,-8


Geoserver create SqlView Layer with Geoserver Manager

I would like to register a new sql view layer to geoserver through the rest api. I am using geoserver-manager. The registration is ok, the layer is working fine, except wms getFeatureInfo, which returns: "Operation on mixed SRID geometries". If i manually set the sql view's geometry column's srid in the geoserver administration page, it works fine. But i cannot find any way to set it in the xml request. I'm sending the geometry info:               <geometry><name>geom</name><type>Point</type><srid>4326</srid></geometry>      And the geometry attribute:               <attribute><name>geom</name><minOccurs>0</minOccurs><maxOccurs>1</maxOccurs><nillable>true</nillable><binding>com.vividsolutions.jts.geom.Point</binding></attribute>      But i cannot set the attributes srid and the geometry info is not enough. The geometry attribute will be registered as srid -1. Any thoughts i can overcome this? Is there an api call to refresh the layer fields? thx.


QGIS attribute values are changing when I save and stop editing a layer

I'm working with QGIS 2.0.1 on Windows XP. I'm creating a shapefile of points with one attribute column for a 10 digit phone number. I've tried setting the type as both string and integer, but I'm getting the same problem. Once I save the shapefile and reload it all of my 10 digit phone numbers have been replaced with " -2147483648 ". This keeps happening even when I create a brand new shapefile and start from scratch. It doesn't happen to any of my other values, just my phone numbers.. I'm about at my wit's end. -Thanks


Why does QGIS's Clipper tell me "Computed -srcwin falls outside raster size" and how do I address it?

I'm trying to clip a heightmap to a small area that I'm interested in. When I attempt to use Raster > Extraction > Clipper I get an error dialog with the message ""Computed -srcwin falls outside raster size of..." with the dimensions. I tried to select a smaller area but continue to get the error message and am not sure what it's complaining about and how to resolve the issue so I can clip the heightmap. What am I doing wrong or need to adjust? ![enter image description here](http://i.stack.imgur.com/4pIaa.png)


How to apply a graduated renderer in pyQGIS?

Just trying to run the following code already given in the pyqgis cookbook to create graduated colors symbology (as in example with 2 classes) I define the source info for the shapefile but when I run execute the code within my test-plugin, it just adds the layer without classifiying. Just adds as usual, all polylines appear same. Any solution or working code/method? Thank you link to code in cookbook http://www.qgis.org/pyqgis- cookbook/vector.html#graduated-symbol-renderer               from qgis.core import  (QgsVectorLayer, QgsMapLayerRegistry, QgsGraduatedSymbolRendererV2, QgsSymbolV2,QgsRendererRangeV2)          myVectorLayer = QgsVectorLayer('C:/my_test_shape_file.shp', 'test_shp_file', 'ogr')          myTargetField = 'target_field'     myRangeList = []     myOpacity = 1          # Make our first symbol and range...     myMin = 0.0     myMax = 50.0     myLabel = 'Group 1'     myColour = QtGui.QColor('#ffee00')     mySymbol1 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType())     mySymbol1.setColor(myColour)     mySymbol1.setAlpha(myOpacity)     myRange1 = QgsRendererRangeV2(myMin, myMax, mySymbol1, myLabel)     myRangeList.append(myRange1)          #now make another symbol and range...     myMin = 50.1     myMax = 100     myLabel = 'Group 2'     myColour = QtGui.QColor('#00eeff')     mySymbol2 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType())     mySymbol2.setColor(myColour)     mySymbol2.setAlpha(myOpacity)     myRange2 = QgsRendererRangeV2( myMin, myMax, mySymbol2, myLabel)     myRangeList.append(myRange2)          myRenderer = QgsGraduatedSymbolRendererV2('', myRangeList)     myRenderer.setMode(QgsGraduatedSymbolRendererV2.EqualInterval)     myRenderer.setClassAttribute(myTargetField)     myVectorLayer.setRendererV2(myRenderer)     QgsMapLayerRegistry.instance().addMapLayer(myVectorLayer)       * * * Thank you so much Kelly. Your code works perfect. However I noticed that both the code (one I have typed in my first message and yours in the 2nd message) DO NOT work in QGIS v1.7.3 but WORKS in QGIS v1.8.0. I think this was a bug(?) that already resolved in v1.8.0 And one more question; Do you have any sample code for (natural breaks, Jenks) classification of the "numeric_attribute_field" based on given number of classes (i.e. no of classes will be a variable in the code, say "n", and I will pass that from the plugin GUI i.e. n = spinBox.value() ) Thanks.


Is it possible to install GeoServer on a web server?

Is it possible to install and use GeoServer with PostgreSQL on a website which is hosted by a web server provider? I am using a web server for my website. I want to add mapping feature on my website. I know PostgreSQL for storing my data like shp files (postgres db is provided by the webhoster) but I do not know how can I install GeoServer and use to fetch data from postgreSQL and display on my website using Openlayers / Leaflet.


Is anyone else working on PostGIS rasters for Ruby?

This is more of an answer looking for a question, really. If you're writing Ruby (and especially ActiveRecord) code and want to use those tasty pixels from PostGIS rasters, you've probably had to deal with eleventeen gazillion ST_Value() queries to get the values for the band, or squirt it into WKT and parse that, or to a TIFF on the disk. PostGIS 2.1.0 brings some new functions, in particular ST_DumpValues(), which allows you to get the whole 2D array of values for a raster band with one query. But AFAIK no one has an ActiveRecord adapter that allows that to be returned, much less a column of "raster" type. But there's a dodge: Using ActiveRecord's connection select_value method (good discussion here), you can code up a query as a string, and return the results -- that 2D array -- as a string. For a 2-row, 3-column raster, the string (if you specified a single band in your ST_DumpValues call) will look something like:               "{{1.0,2.0,3.0},{4.0,5.0,6.0}}"      A simple, fast pair of gsub! operations swaps the PostgreSQL "{" delimiters for Ruby's "[" ones, call eval() on the string, and Bob's your uncle: You now have the entire raster as a 2D array. It may not be elegant, but it certainly works! So my question: Is anyone doing something more sophisticated of which I should be aware? Here's the (admittedly simple-minded) Ruby code:               # Get and set raster band values out of PostGIS 2.1 rasters as Ruby arrays.     # This example assumes that the raster column is 'rast' and that the primary     # key for the table is 'rid'. Also, NULL pixels will probably tank the getter.     # Fixing those is left as an exercise :-)          class PostGisRaster < ActiveRecord::Base       self.primary_key = 'rid'       # Grab a band of a raster out of the database and convert it to a 2D array. Defaults to first band (1)       def self.to_a(tablename,id,band=1)         id = id.to_i         str = connection.select_value("select st_dumpvalues(rast,#{band}) from #{tablename} where #{primary_key}=#{id}")         str.gsub!('{','[')         str.gsub!('}',']')         eval(str)       end            # Update a raster band (default: first band) in the database with values from arr. Note that arr can be any       # subset of the size of the full raster. Corner is X,Y (or long,lat), with the upper left corner as [1,1].       def self.update_raster(tablename,id,arr,band=1,corner=[1,1])         update_str = <<-END         select st_setvalues(           (select rast from #{tablename} where rid=#{id}),           #{band},#{corner[0]},#{corner[1]},           array#{arr.to_s}::double precision[][]         )         END         update_str = "update #{tablename} set rast=(#{update_str}) where rid=#{id}"         puts "update_str: '#{update_str}'"         connection.update(update_str)       end     end


How to use POST method with Overpass QL and OpenLayers?

I am using OpenLayers and Overpass QL with GET method to retrieve data from the Overpass server. Some URLs tend to be very long and hence get rejected by the Overpass server. To get around this, I am thinking of using POST method to query the Overpass server using OpenLayers. Is there a way to use POST method with Overpass QL (not XML) in OpenLayers? And if yes, what (syntax) goes into the **url** property of OpenLayers.Layer.Vector?


Problems using the 'Split' tool with ArcGIS

I'm running into difficulty when using the `split` tool with ArcGIS 10. ![enter image description here](http://i.stack.imgur.com/a4J99.png) I am trying to split lines using a grid that I generated using the Fishnet command. Each gridcell has a unique text value as a name (FID converted to a string), which is my `Split Field`. However, I can't tell whether it is the size of my grid (300000 cells), or if it is due to no line being within a cell that causes the error. ![enter image description here](http://i.stack.imgur.com/CYgJE.png) I tried breaking my grid cell into smaller pieces of ~50000 cells, but I still got an error occuring. Then I tried selecting only cells that were intersected by the lines, and just splitting using those cells, and still got an error. The strange part about the error messages, were that the analysis would run for about 30 minutes or so, producing output, and then an error message would appear on screen, but no explanation - no error number or no further details. What I have no resorted to doing is splitting the grid into 500 smaller grids, and then splitting each subgrid on itself. Then I will loop through every cell, and clip the lines to each cell. The problem with this approach is that it is taking a long time (~20 hours so far). Are there any ways I can improve this process?


How to create Concentric Circles in QGIS?

I'm trying to build a planning tool for center pivot irrigation system. It involves selecting a field (polygon), a center point, and then an outer circle to set the outer limits of the system. From there you select the inner rings based on fixed length sections. to optimize the coverage area. Anyone have an idea where I can start?


Why isn't View>View Settings working in ArcGIS 10 ArcScene?

I am running ArcGIS 10 desktop verison with the 3d Analyst extension to view DEMs in ArcScene. I want to view the DEM from a specific xyz location, which should be achievable using the View Settings dialogue box in the View menu. When I click on View>View Settings nothing happens except the menu closes. I can't find any hint of why this isn't working in the ArcGIS help, forums or blogs. Does anyone know where I'm going wrong?


How do I use actions from ArcGIS SDK for WPF in the latest version of WPF?

I understand how to use the `Actions` and `Behaviors` but there is a problem I'm not sure is solvable other than to downgrade the version of .net and WPF I'm using. I installed the latest ArcGIS SDK for WPF, version 10.2 and saw one of their examples illustrating how to use the `MeasureAction`. When I try to implement this in my own WPF program it won't compile and tells me that the version of Blend that MeasureAction was compiled with is different than the one I'm using. I am using the most recent `Microsoft.Expression.Interactions` and `System.Windows.Interactivity` (file version says 4.0; NOT assembly version) but in their examples they are using version 2.0 (again, file version not assembly version). Why would Esri release a new SDK (fairly recently) and not compile it with the most current version of those assemblies? Is there a way to make this work in my project? I can't roll back to a different version of .net because I'm using `Caliburn.Micro` which requires the version I'm using now.


How does ModelBuilder compare with Vensim and Stella for environmental modeling?

Does anyone have any advice or has anyone experienced any limitations in ArcGIS software when trying to use model builder for any type of environmental phenomenon? I know that Vensim and Stella can be used with more detail for just about anything when modeling an environmental phenomenon. What kind of limitations might there be with ArcGIS software?


How to Add North Arrow, Scale to ArcIMS Map JAVA?

I am new to ArcIMS , currently i am working on integrating maps to Existing java application. I got a requirement from my lead , He asked me to add NorthArrow, Map Scale to the map. I am using ArcIMS 9.2 which has com.esri.aims.mtier package. I am using java . I was able to add North Arrow using Acetate layer and add to a map. Now my concern is about scale bar. My requirement is to get a bar, But i am getting "0|6241" miles when used Scale Bar class


Merge two rasters with no data value

I have two rasters: Raster A and B. Raster A has has only values of 0. The white area in Raster B are No Data values. I want to merge them to one raster (Raster C). So basically I want all pixels in Raster B with a No Data value to have a value of 0. I tried to do this with the raster calculator in QGIS by adding Raster A to Raster B, but it only returns again Raster B. I am looking for solutions with QGIS, GDAL, or Grass GIS. ![enter image description here](http://i.stack.imgur.com/a5W9R.png)


QGIS 2.0.1 linking table issue, MSSQL 2008 database

I'm trying to link tables in QGIS 2.0.1 and MSSQL 2008 database. I can link them but when I try to open the attribute table QGIS throws an error and shuts down creating a *.dmp file. I saw that table joining when using databases that QGIS does not support MSSQL but the funny think is that QGIS 1.8 allows the join and attribute tables to work. Anyone have any information regarding this? I haven't been able to find anyone else having this problem online.


How to join data in postgis tables to form layer with subset of attributes

In QGIS I am trying to join data from two postgis tables. I can not figure out how to do this at sql because add layer tools seem to allow one to select just one table to filter on. Instead I loaded all tables as separate layers and then used the join layers in the properties of one of the layers. That worked but I end up with a lot of attributes that I don't need or want. How do people handle this? One solution that occurs to me is to construct a view in postgres.


The red box that refers to other dataframes will only show part of the box (only show over land but not water, see image)

![the red box refers to other dataframes but it's only showing over land and not over the ocea, ie, the box is an incomplete square](http://i.stack.imgur.com/BEAyd.jpg) the red box refers to other dataframes but it's only showing over land and not over the ocea, ie, the box is an incomplete square


Integrated viewshed analysis

I need to do integrated viewshed analysis of a target with several observer locations. I am going to use r.viewshed analysis function in GRASS. With this function, it is possible to perform analysis based on single observer location. My aim is to add output of each single observer location into integrated viewshed output. Each output, i am going to flag with -b where o denotes non-visible while 1 denotes visible. Through a loop of observer locations, output of viewshed of each location can be integrated with r.mapcalc function. After integration, values = 0 in the rater map dentoes non-visible areas and value >= 1 denotes visible areas. Python code in GRASS for r.viewshed is ok. Under the loop of observer locations how to use r.mapcalc function with each viewshed adding? After getting the integrated viewshed raster, i need to extract its boundary depicting visible area in vector format. How to do that in GRASS? Any idea for this integrated analysis is highly appreciated. If the integrated output is intoutput, can i use a code like this. in the loop if i=0 -> r.mapcalc 'intoutput = viewshedoutput' if i > 1 -> r.mapcalc 'intoutput = viewshedoutput + intoutput'


How to determine the centroid of polygons?

I have a polygon vector and I want to quickly attain the centroid of this polygon for insertion in a text document. I am working with QGIS. I searched through other questions and although some are somewhat close they don't quite answer my question. Ideally, the centroid coordinates would be in the attribute table of the polygon and I could just copy and paste the coordinates. I don't want to have to create a separate point vector file that represents the centroid and then find these coordinates and copy and paste them.


Describing weather data in ArcMap area solar radiation analysis

I am writing up the methodology of the analysis I did on solar radiation availability for a city. I used the tool 'area solar radiation' with ArcMap 10, using the time configuration 'TimeWholeYear(2008)' and latitude 51. Now I want to write a short paragraph about the weather data used in this analysis (i.e. type of data, data source, etc.) but I cannot find anything about it on the GIS help. Does anyone have any ideas of where to find a description of the weather data used in ArcMap? Thanks and happy new year!


how to create CF-compliant NetCDF from ESRI Grid?

been trying to make a CF-compliant netCDF file from an ESRI Grid. I want to serve it w/the THREDDS server. Been using `gdal_translate`. I know the `netcdf` output option is definitely not CF compliant, so I've been using the `GMT` output option. This doesn't seem to be functioning properly w/in THREDDS, so I'm guessing that's not CF-compliant either. As an aside, I'm trying to validate the CF-compliance of my GMT-type netcdf. Been waiting for a really long time for it to load up to http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl. In the meantime, trying to set up the cf-checker.py script but dependencies on deprecated CDAT libraries is making that a pain. Anybody got a cleaner way to do this? \---EDIT--- ncdump of my GMT-conforming NetCDF file. Seems odd that I have "x_range" and "y_range" but no "x" or "y". Also seems like I'm providing almost no metadata via this process--making CF compliance seem unlikely to me...               netcdf E:/software/apache-tomcat-6.0.39/content/thredds/public/wk_gmt/wk_awc/al.nc {       dimensions:         side = 2;         xysize = 1902411900;       variables:         double x_range(side=2);           :units = "meters";              double y_range(side=2);           :units = "meters";              double z_range(side=2);           :units = "meters";              double spacing(side=2);              int dimension(side=2);              float z(xysize=1902411900);           :scale_factor = 1.0; // double           :add_offset = 0.0; // double           :node_offset = 1; // int            // global attributes:       :title = "";       :source = "";     }      \---EDIT # 2--- Just a little more content to show the difference in the NetCDF files produced by gdal vs. ESRI based on comment from @mdsumner. I totally agree that gdal should be doing it right. Quite possible I'm not using the tool correctly (`gdal_translate -ot Float32 -of NetCDF ${in} ${out}` in my shell script, fwiw). As @signell notes below, the ESRI output ain't perfect, but it seems closer to CF compliance...the following is the ncdump of the file created from a *.nc from the same ESRI Grid. This file was created using ESRI's `Raster to NetCDF`.               netcdf E:/software/apache-tomcat-6.0.39/content/thredds/public/wk_esri/wk_awc/al.nc {       dimensions:         x = 11334;         y = 18650;       variables:         double x(x=11334);           :long_name = "x coordinate of projection";           :standard_name = "projection_x_coordinate";           :units = "Meter";              double y(y=18650);           :long_name = "y coordinate of projection";           :standard_name = "projection_y_coordinate";           :units = "Meter";              float awc(y=18650, x=11334);           :long_name = "awc";           :esri_pe_string = "PROJCS[\"NAD_1983_Albers\",GEOGCS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Albers\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-96.0],PARAMETER[\"Standard_Parallel_1\",29.5],PARAMETER[\"Standard_Parallel_2\",45.5],PARAMETER[\"Latitude_Of_Origin\",23.0],UNIT[\"Meter\",1.0]]";           :coordinates = "x y";           :grid_mapping = "albers_conical_equal_area";           :units = "Meter";           :missing_value = -3.4028235E38f; // float              int albers_conical_equal_area;           :grid_mapping_name = "albers_conical_equal_area";           :longitude_of_central_meridian = -96.0; // double           :latitude_of_projection_origin = 23.0; // double           :false_easting = 0.0; // double           :false_northing = 0.0; // double           :standard_parallel = 29.5, 45.5; // double            // global attributes:       :Conventions = "CF-1.0";       :Source_Software = "Esri ArcGIS";     }


How to Split a vector file into several different files using a Grid in QGIS?

I have a shapefile containing contour for a large area, and I want to split it into different shapefiles each covering a 1KM X 1KM area. I have already created the required Grid shapefile in QGIS. How do I now split the contours using the created Grid? I am searching for something equivalent to the Split Tool in ArcGIS.


Extract city boundary from TIGER data

I'm trying to find the bounding box of US cities but I just can't seem to figure out what to do with the TIGER data I download (not to mention, which data to download!). Could someone experienced with TIGER data (or shapefile) help me with this? How do I read/extract TIGER data to grab bounding box of cities? Trying to find lat/lon points that bound the city. Thanks in advance! EDIT: Sorry for the ambiguous question. Basically, what I want to extract are coordinates of each bounding box for ALL US cities. For example: New York (12.123,34.345),(12.456,34.678),..etc Boston (11.111,22.222),(11.123,22.234),..etc ...etc (for all cities in the US) I'm asking for this because I have a lot of coordinates that needs to be categorized (or reverse-geocoded) into cities, like (A,B) -> City A; (C,D) -> City B; etc. I can't use Google's geocoding feature because they only allow up to 5000ish requests per day per IP address, and I have millions of coordinates. I've tried installing OpenStreetMap data and running reverse- geocoding on my machine, but was turned off by the inaccuracy of results. Hopefully this made sense!


What are some ways to put points on a map and information about those points in a sidebar?

I'm trying to figure out the best way to have a sidebar that will have information about points on a map (like you see in something like yelp). I can get the points on the map but I'm struggling to figure out the best way to get information about those points on a sidebar. The idea being that the user would click on a point or a sidebar item and the corresponding point/item would light up or open. This is basically along the lines of what I'm thinking: http://mick.github.io/jekyllmap/ (this uses a ruby framework and I'm trying to do this with just JS) Like I said I'm able to get the leaflet map up. Just trying to get the sidebar items to also append.               // Trying sidebar stuff          /*     var sidebarList = $('div.list-group-container')     $.each(hikes.features, function(i, feature)     {         var li = $('<button>')             .addClass('list-group-item')             .append("Location: " + feature.properties.Location + "
")             .appendTo(sidebarList);              // experiment              var details = $('
')             .addClass('details')             .append("Date: " + feature.properties.Date + "
" +                       "Location: " + feature.properties.Location + "
" +                       "Terrain: " + feature.properties.Terrain + "
" +                        "Difficulty: " + feature.properties.Difficulty + "

")             .appendTo(sidebarList);          });     */               var hikes = L.geoJson(null, {              onEachFeature: function (feature, layer) {             var myLayer = layer;                  myLayer.bindPopup("
Date:
" + feature.properties.Date + "
Location:
" +              feature.properties.Location + "
Terrain:
" + feature.properties.Terrain +              "
Difficulty:
" + feature.properties.Difficulty,             {maxWidth: 300, minWidth: 100, maxHeight: 160, closeButton: true,showOnMouseOver: true});                  return myLayer;         }     });     $.getJSON("data/hikes.geojson", function (data) {         hikes.addData(data);     });           map = L.map("map", {         zoom: 9,         center: new L.LatLng(17.059417, -96.721622),         layers: [mapquestOSM,hikes] //[mapquestOSM, boroughs, subwayLines, churchs]     });      Relevant HTML (just in case):

 Layers

 Help

                                     Hikes

                                             <input checked id="hikes" name=                                             "overlayLayers" type="checkbox">                                             Hikes

                                     Map Type

                                             <input checked id="mapquestOSM"                                             name="basemapLayers" type="radio">                                             Political

                                             <input id="mapquestOAM" name=                                             "basemapLayers" type="radio">                                             Satellite

                                             <input id="mapquestHYB" name=                                             "basemapLayers" type="radio"> Híbrido                                             (Ruas + Satélite)


How can I add grid lines to a print composition using pyqgis?

I'm writing a qgis plugin to create an image in the print composer of the current map. I can get the map rendered in the proper place with a frame of the right width, and I can get grid annotations rendered in the proper places and orientation, but I can't get the actual grid lines to render. Here is the code I'm using:               def createImage(self):         # Initialize the composition object.         mapRenderer = self.iface.mapCanvas().mapRenderer()         composition = QgsComposition(mapRenderer)         composition.setPlotStyle(QgsComposition.Print)         composition.setPaperSize(483, 330)         composition.setPrintResolution(300)              # Initialize the map object.  Allow a top margin of 10mm, a bottom         # margin of 50mm, a left margin of 10mm, and a right margin of 10mm.         mapOriginXMm = 10         mapOriginYMm = 10         mapWidthMm = 483 - 10 -10         mapHeightMm = 330 - 10 - 50         composerMap = QgsComposerMap(composition, \                                          mapOriginXMm, \                                          mapOriginYMm, \                                          mapWidthMm, \                                          mapHeightMm)         composition.addItem(composerMap)              # Create the frame around the map.         composerMap.setFrameEnabled(1)         pen = QPen()         pen.setWidth(0.2)         pen.setJoinStyle(Qt.MiterJoin)         composerMap.setPen(pen)              # Initialize the image object.         dpi = 300         dpmm = dpi / 25.4         paperWidthPixels = int(dpmm * composition.paperWidth())         paperHeightPixels = int(dpmm * composition.paperHeight())         image = QImage(QSize(paperWidthPixels, paperHeightPixels), \                            QImage.Format_ARGB32)         image.setDotsPerMeterX(dpmm * 1000)         image.setDotsPerMeterY(dpmm * 1000)         image.fill(0)              # Create the map grid.         composerMap.setGridEnabled(True)         composerMap.setGridIntervalX(500)         composerMap.setGridIntervalY(500)         composerMap.setShowGridAnnotation(True)         composerMap.setGridAnnotationPrecision(0)         composerMap.setGridStyle(QgsComposerMap.Solid)              # Top         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Top)         composerMap.setGridAnnotationDirection(QgsComposerMap.Horizontal, \                                                    QgsComposerMap.Top)         # Bottom         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Bottom)         composerMap.setGridAnnotationDirection(QgsComposerMap.Horizontal, \                                                    QgsComposerMap.Bottom)              # Left         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Left)         composerMap.setGridAnnotationDirection(QgsComposerMap.Vertical, \                                                    QgsComposerMap.Left)              # Right         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Right)         composerMap.setGridAnnotationDirection(QgsComposerMap.Vertical, \                                                    QgsComposerMap.Right)              composerMap.setAnnotationFrameDistance(1)         composerMap.setGridPenWidth(5.0)         composerMap.setGridPenColor(QColor(0, 0, 0))         composerMap.setAnnotationFontColor(QColor(0, 0, 0))         composerMap.setGridBlendMode(QPainter.CompositionMode_DestinationOver)              # Do the rendering.         imagePainter = QPainter(image)         paperRectMm = QRectF(0, \                                  0, \                                  composition.paperWidth(), \                                  composition.paperHeight())         paperRectPixels = QRectF(0, 0, paperWidthPixels, paperHeightPixels)         composition.render(imagePainter, paperRectPixels, paperRectMm)         imagePainter.end()              image.save("/opt/tmpPhotos/test.tif", "tif")      Can anyone tell me what I'm missing?


PostGIS interpolation / triangulation options

I'm looking for an open source workflow to automate DEM construction. We have a series of sites that fall within a LIDAR dataset. We want to create site specific DEM's for each site, and we're looking to automate the process. So far, we have automated:   * data loading into PostGIS (LIDAR and site points)   * creation of site boundaries (combination of st_buffer and st_envelope) Now we're looking for options to interpolate the data subsets at each site and export them to Surfer7 grid files. Currently, we're querying the data in the PostGIS database using QuantumGIS, exporting to csv files, then manually importing and gridding the data in Surfer7. Hopefully we can automate this as well. So for this use case, we'd like to triangulate our lidar data to a DEM. Other potential cases we can think of involve different interpolation methods - so if there are options for inverse distance and kriging - we're interested! This is very much a learning exercise for us - we're working in baby steps!


Openlayers layer hide javascript menu

I have java-script menu that is getting behind openlayers OSM layer (only after it loads). I've tried giving z-index:9999 to the menu div but it didn't work. Any idea ? ![enter image description here](http://i.stack.imgur.com/5mmUE.png)


Geometry Transformation in Spatialite 4.1.1

I am trying to transform a geometry (geo referenced to Australia) > POLYGON((-33.917172 151.110971,-33.916443 151.112495,-33.917637 > 151.113276,-33.917783 151.111512,-33.917253 151.111577,-33.917172 > 151.110971)) from SRID 4326 to 3112 using the following query:               SELECT AsText(Transform(PolygonFromText('POLYGON((-33.917172 151.110971,-33.916443 151.112495,-33.917637 151.113276,-33.917783 151.111512,-33.917253 151.111577,-33.917172 151.110971))',4326),3112)) as result      in SpatiaLite GUI 1.7.1 with SpatiaLite 4.1.1 with all GEOS,PROJ extensions enabled but the resulting geometry is > POLYGON((Inf Inf, Inf Inf, Inf Inf, Inf Inf, Inf Inf, Inf Inf)) Why is this happening?


Tool for converting .shp file to .tab file?

I am searching for any free tool which can convert ShapeFile (.shp) to MapInfo (.tab) file.


Qgis analysis on polygon

I have a data table mapped and the table also contains further information of interest, beyond the lat/long of the specific data points.   1. I want to be able to draw a polygon and then simply have a count of records included in the area and also the sum of one of the other columns. This is likely a trivial task, but I'm very new with little time for this project.   2. if get the above figure out, what is the best way to save a 'scenario' (the polygon area drawn and the results) so that I can experiment with differ scenarios?


How to add multiple shapefiles with VB.Net

I have created a toolbar add in for arc with a button that opens a form with 3 selections that are shapefiles, once the shapefile is selected I click the Add Layer button. Currently I can only get one shapefile at a time, unless I duplicate the code for each shp and once I do add the one shapefile it keeps on adding it. Here's the code I have so far:               Public Function AddLayers()             Dim pMxDoc As IMxDocument             Dim pMap As IMap             Dim pWorkspaceFactory As IWorkspaceFactory             Dim pFeatureWorkspace As IFeatureWorkspace             Dim pFeatureLayer As IFeatureLayer             Dim pFeatureClass As IFeatureClass             ' Specify the workspace and the feature class.             pWorkspaceFactory = New ShapefileWorkspaceFactory             pFeatureWorkspace = pWorkspaceFactory.OpenFromFile("E:\Customization\Data\Cities", 0)             pFeatureClass = pFeatureWorkspace.OpenFeatureClass("Cities")             ' Prepare a feature layer.             pFeatureLayer = New FeatureLayer             pFeatureLayer.FeatureClass = pFeatureClass             pFeatureLayer.Name = pFeatureLayer.FeatureClass.AliasName             ' Add the feature layer to the active map.             pMxDoc = My.ArcMap.Application.Document             pMap = pMxDoc.FocusMap             pMap.AddLayer(pFeatureLayer)             ' Refresh the active view.             pMxDoc.ActiveView.Refresh()             Return AddLayers()     End Function


CartoDB Density View

Is the Density View for CartoDB no longer working? I have looked at three datasets on multiple accounts, and none of them are working correctly. They show only 1 bucket color, no matter the density. The CSS is only generating one grouping for the point density, so obviously it is not generating the correct CSS. I can manually manipulate it (the CSS), but requires a lot of fine tuning to find the right grouping! If anyone knows something I could be doing wrong, please tell me!


overview map with sharpmap

I'm using Sharpmap to create a GIS application. I'm trying to get a small overview map on top of my map so it gives an idea what part of the map is being viewed. Is there a simple/implemented way of doing this? Or do I need to add another map and interact with this map on every change? Just need a push in the right direction. Thank you in advanced!


Select by Attributes based on SQL wildcard range

I want to select all the records from a geodatabase table where the string starts with a letter, so I tried               SELECT *     FROM tbl_names     WHERE "name" LIKE '[A-Z]%'      This returned no records. After some searching, I found that this is SQL Server syntax. I didn't think this would be a problem though, as far as I know all versions of SQL support `%`. After going through the help file on building a query expression, I saw that the correct syntax is               SELECT *     FROM tbl_names     WHERE "name" >= 'A'      As the names are all strings, my first instinct was to try `LIKE`. Why is the `>=` operator used instead of `LIKE`? Are wildcard ranges not supported in ArcMap?


Help with ArcObjects language to open or access a shapefile?

I am writing a program with a dialog box that when they click on the map button a shapefile will open. I wrote a program that opened a map document is it the same language as that is. Which is the following : Dim pDoc As IDocument Dim pApp As IApplication Set pDoc = New MxDocument Set pApp = pDoc.Parent Please help!


WebMap that automatically links to Google Drive Spreadsheet

I would like to create a webmap from a contacts spreadsheet stored in Google Drive that will update the map automatically when new data is added to the spreadsheet. I know I can do this with an ArcGIS Online Organisation subscription, but are there any other ways?? Any help, much appreciated! Regards


AddJoin_management crashes ArcMap

I am going to be using an AddJoin_management command in a python script at the end of several loops. To test, I used the AddJoin tool and use the below command in the Python window and made the parameters identical to what the code is(the parameters are correct for what I want to accomplish). When I run the AddJoin it crunches numbers for a while and then the whole program crashes and asks if I would like to send an error report.               arcpy.AddJoin_management("SignsToFinish", "SignID", "NewSigns", "sid", "KEEP_ALL")      That is the statement that is being used in both the script and in the AddJoin tool. Why does this cause ArcMap to crash? Any ideas?


Append operation in ArcGIS

I have 250 road shape files, I have to append all the 250 shape file into one single file. I have used ArcGIS append tool for combine layers (if number of shape files are minimum), but these 250 shapes files take time as well as confuse me while selecting in ArcGIS append window, is there any other method in which I can append these 250 shape files easily.


Data loads with preset symbology in ArcMap

I have a set of points in a file gdb. When I load them in ArcMap or ArcCatalog, the data displays with unique value symbology based on a field rather than "single symbol". How do I get the data to load with single symbol by default?


Where did the polygons go after projecting a map in QGIS?

I'm fairly new at GIS know-how, but I've run into a problem with a projection of a world map. I have a shapefile of all countries I downloaded from Natural Earth. After projecting it into a orthographic as suggested in this other question, I changed the lat/long so that the Atlantic would be somewhat in the center. However, after changing it, the United States, Mexico and Canada disappear from the map, as you can see here: ![enter image description here](http://i.stack.imgur.com/goqtM.png) When I reproject the map to a long over the US, the polygons appear again. Any suggestions?


Python ogr: why is GetFeatureCount() so slow?

I did some profiling for a program I wrote and discovered that ogr's layer.GetFeatureCount() is significantly slower than just using python's BIF `len()`. Here are my test results               def test():             import ogr             b_path = r'/../...'             bounds =  r'%s/bounds' % b_path             province =  glob.glob(r'%s/*.shp' % (bounds,))[0]             driver = ogr.GetDriverByName('ESRI Shapefile')             admin_shp = driver.Open(province,0)             l = admin_shp.GetLayer(0)             lc = l.GetFeatureCount() # first round             lc = len(l)              # second round                    if __name__ == '__main__':         import timeit         print(timeit.timeit("test()", setup="from __main__ import test"))      first round               228.255430937      second round               124.03532505      Can somebody explain why this is?


How to register onclick handler for *all* KML feaures in OpenLayers?

I'm a newbie using OpenLayers with JQuery to display vector data from KML files. I'm creating the layer like this:               newlayer = new OpenLayers.Layer.Vector( layerid, {         projection: MAPVAR.displayProjection,         strategies: [new OpenLayers.Strategy.Fixed()],         protocol: new OpenLayers.Protocol.HTTP({             url: layerurl,             format: new OpenLayers.Format.KML({                 extractStyles: true,                  extractAttributes: true,                 maxDepth: 2             })           })          });      I want to avoid using these vector features with the OpenLayers.Control.SelectFeature control. Instead i would like to have each svg feature respond to a click event and pop open their own individual windows with the attributes. I'm having trouble figuring out how to add the onclick function to **ALL** the vector features loaded. For example, I can attache a function to the KML layer's "loadend" event and add the onclick function doing the following:               $('g[id$=vroot] > *').css("cursor", "pointer")     $('g[id$=vroot] > *').click(function(evt){ $w = $.WM_open(); $w.find('.windowcontent').append("SUCKER"); });      But this will only apply the handler to those vector elements in the view extent and not the ones that are waiting to be rendered in the HTML. I'm not sure how to access the unrendered ones -- they are in the DOM. I've come up with really stupid stupid work around to this problem, but I know there has to be a better way. Is there some way I can dynamically create the "onclick" handler for each svg feature when they are getting parsed? Would that require me to subclass OpenLayers.Layers.Vector or OpenLayers.Formats.KML? Does anyone have an example? Or recommendation on other ways? thx mazery * * * I still have not solved adding the onclick handler to the features. But i was able to override OpenLayers.Format.KML parseData() to add a pointer cursor to the feature styles before the loadend runs on the KML layer (additions demarcated with *** EDITS *** ).               var FormatErmaKml = OpenLayers.Class(OpenLayers.Format.KML, {      parseData: function (data, b) {          typeof data == "string" && (data = OpenLayers.Format.XML.prototype.read.apply(this, [data]));         for (var c = ["Link", "NetworkLink", "Style", "StyleMap", "Placemark"], d = 0, e = c.length; d < e; ++d) {             var f = c[d];             var g = this.getElementsByTagNameNS(data, "*", f);               if (g.length != 0) switch (f.toLowerCase()) {             case "link":             case "networklink":                 this.parseLinks(g, b);                   break;             case "style":                 this.extractStyles && this.parseStyles(g, b);                   break;             case "stylemap":                 this.extractStyles && this.parseStyleMaps(g, b);                   break;             case "placemark":                 this.parseFeatures(g, b)             }                  }             **** EDITS BEGIN ****         for(var count = 0; count < this.features.length; ++count){                 f = this.features[count];                 f.style.cursor = "pointer";         }         **** END EDITS ****         return this.features     },});      Any ideas on adding the onclick handler for each feature are welcomed. thx mazery


With ArcObjects, distinguish between Save Edits with and without closing the current edit session

Is it possible with ArcObjects to distinguish between the user selecting the Save Edits button and the users selecting the Stop Editing button and then saving edits? The reason for this is that in the IEditEvents.OnStartEditing event I am acquiring references to certain tables based on the current editor workspace. These tables are used to acquire configuration parameters for an ArcMap extension and for other purposes throughout the edit session. When the edit session is closed, I clear the references to those tables and arrays generated from those tables. The issue this has created is that when the user selects "Save Edits", IEditEvents.OnStopEditing is called followed by IEditEvents.OnStartEditing. Essentially, ArcMap is starting a new edit session. Thus, the work done during the OnStartEditing event is rerun, even though the user hasn't ended the current edit session. There is some overhead to that work that I would like to avoid if possible. I have a workaround involving setting a shared property to the current edit workspace on the StopEditing event, and comparing that property to the new edit workspace on the StartEdting event. If they are the same then I know the edit workspace hasn't changed and I don't need to rerun the work to get table references and so forth. It seems a little messy though. I recall reading something about this at one point but can find no discussion regarding it on this forum or ESRI's.


How do I install Orfeo toolbox and Qgis 1.9?

I'm having a lot of trouble getting Orfeo toolbox and Qgis 2.0 working. I followed the qgis wiki instructios, added the ppa, installed qgis 1.9 (it's beautiful, great work!). But when i tried to install the otblib from the ubuntugis repositories, it forces an uninstall of Qgis. Any ideas ? My system is linux mint 15. Thanks


ArcGIS JSAPI - web workers CORS issue

In my JS web-application, I'm trying to store the tiles in my localstorage using web workers.   I'm using the code from this Esri sample. I just deleted line 20 in the ioWorker.js file:                url = "/arcgisserver/apis/javascript/proxy/proxy.ashx?" + url;      But when the web worker requests a tile, I get those three errors: ![Error](http://i.stack.imgur.com/Kfm5Y.jpg)   On my side, CORS should be working fine. Is this a problem on Esri's side or have i got something wrong?      edit: Or is it not possible only with CORS, do I need a proxy-page?


Understanding the polygon handler function in Openlayers

Using openlayers, I want to be able to draw one polygon on a map. After one polygon is drawn, I want an event to fire that stops any more from being drawn until a button is pressed. My current code allows the user to draw more than one polygon and I'm trying to figure out how to limit it. This is my current code:               // Add drawing layer      analysisLayer = new OpenLayers.Layer.Vector("analysisLayer");        map.addLayer(analysisLayer);          // add polygon drawing control     polygon = new OpenLayers.Control.DrawFeature(analysisLayer, OpenLayers.Handler.Polygon);     map.addControl(polygon);      What I tried doing was adding a callback to the `Control.DrawFeature` function as follows:               // add polygon drawing control     polygon = new OpenLayers.Control.DrawFeature(         analysisLayer,          OpenLayers.Handler.Polygon, {callbacks: { "finalize" : function(){alert('poly made')} } } );         map.addControl(polygon);      This does not work, but it does not give me an error. I'm not sure how exactly to structure this function. I did find the function finalize in the documentation which is what I thought I needed, but I'm also not sure how to structure the `callback`. **EDIT:** I'm starting to understand how these callbacks work. For example this detects that a feature has been added (using @Vadim's advice):               // detect polygon events      function newPolygonAdded (evt) {             alert('Polygon completed');             polygon.deactivate(); //stops the drawing         }             // add polygon drawing control     polygon = new OpenLayers.Control.DrawFeature(analysisLayer, OpenLayers.Handler.Polygon,                                  {eventListeners:{"featureadded": newPolygonAdded}});                                                 map.addControl(polygon);      What I still don't understand is how to limit the drawing layer from allowing more polygons to be drawn.


How to find and replace all null values in multiple columns?

To find and replace all null values in a specific column I am using:               case when "myColumn" is NULL then '99999999' else "myColumn" end      But how can I use the QGIS calculator to find and replace all null values in the multiple columns?


How to get a slippy map from OziExplorer .map and .png tiles?

I have a bunch of topographic maps in the format of .map files and 4000x4000px png files.I would like to view them as a slippy map and be able to select an area and export that as one big image. I am wondering what my options are. QGis would be nice, or Mobile Atlas Creator, which supports local tiles as source for the following formats: OSMTracker, AndNav, BackCountry Navigator, Maverick and OSMAND. It would be nice if at some time I could convert them to something more standard, like 256px tiles under a coordinate dir structure, or mbtiles so I could view it with tilemill or their server or map on a stick software. So what are my options to getting these files to open in some slippy map way and being able to export specific areas as images. I don't care what formats I have to convert to or which software/servers I have to install.


Get coordinates from polygon outline with greatest distance

I'm looking into a task in ArcGIS 10.2 of which I need to discover the two points on a polygon outline where they would be at the greatest distance from each other. I have looked at ET Geowizards center-line (then extract end nodes) but it doesn't work as the polygon being so narrow seems to confuse ET so the centerline doesn't reach the "tips". See the image below, the orange dots indicate the points I need. The polygons are always this shape, i.e. long, slim geomtries ![enter image description here](http://i.stack.imgur.com/qGvGP.png) I would need to do this for 500 or so polygons so I need something fairly quick. I looked at using the near tool to loop through a point set for each polygon but it takes too long due to multiple calls of the GP tool. My other thought is, using Python, use the geometery object to go through a point set for each polygon looping through all the possible pairings of vertices to find the pair that are the furthest distance. Any thoughts? I have full licenses of ET, ArcGIS Advanced and Spatial Analyst. Also can do a Python or .NET solution. Many thanks


DBF write support in Ruby

this is repost of the same question on Stackoverflow where I got no answers so far http://stackoverflow.com/questions/5687130/how-to-write-into-dbase-tables- using-ruby-on-osx So, from OSX(Lion) using Ruby(1.9.x), I am trying to update data from an ESRI Shapefile. I didn't find any gem with dbf write support or at least some ODBC driver that I can use on OSX.


Math module VS PostGIS

I have a simple (and maybe stupid) question for you today. I have to compute intersection points between GIS polygons and imaginary lines I draw thanks to a script of mine... And I wonder if it would be relevant to use PostGIS instead of a Math module to catch intersection points. Thank you. EDIT: by math module (or library) I think about a mathematic module as I work on a Python script. So that is a "python math module".


ArcSDE installation with PostgreSQL (error - 1015)

I am trying to install ArcSDE for Postgresql on CentOS 5.5 in i686 architecture. I have successfully installed and configured Postgresql. I did SDE pre-installation and as ArcSDE user, run the ArcSDE 10 installation script that went well without any error. During post-installation, while running $SDEHOME/bin/sdesetup, I am getting error 1015. The log file is showing SDE DBMS Error and is unable to install ST_GEOMETRY. I can see that st_geometry.so is created in /sdeexe100/pg841_st_lib/ directory. I am confused if I missed something during installation/configuration process or if I have to copy st_geometry.so file somewhere else for the installation. I have attached my log file. Any help is highly appreciated! Mukesh


.Net Solution Structure for ArcObjects and Geodatabase programming

OK - I understand that this is a bit subjective - but you're the best community forum I've got! So, we are talking about starting a fresh customisation for ArcGIS or a Windows app using Engine. I often become a little perplexed when trying to create nice clean layers of abstraction between my GUI, business objects and data access layer (geodatabase access). It often works out like something below: ![enter image description here](http://i.stack.imgur.com/o9fbs.png)   * The **PresentationLayer** makes calls in BusinessLayer to get data from database and give back wrapped up in some form of business object - it is never a ValueObject straight fresh from the database.   * In **BusinessLayer** \- I have all my business logic that accesses DataLayer for data from the geodatabase (it gets back data from the geodatabase via ValueObjects - DataLayer also uses this assembly).   * In **ValueObjects** assembly, this is just a set of objects that map directly to SDE tables and do nothing else.   * **Core** is where the program starts and shows forms etc.   * **Common** is just a place to put things that are useful to use here and there, usually static methods etc. Does this look sane? How do you structure your solutions?


Is it possible to retrieve thematic layer information for a Layer in Mapbasic?

I found this code                windowinfo(FrontWindow(), WIN_INFO_CLONEWINDOW)      This function gives information (mapbasic) about the front Map window which can be used to regenerate the map. > Is there any function in mapbasic 10.0 function that gives code that can be > used to generate a thematic layer.


How to retrieve the value of a cell in RasterLite?

Just wanting to know the SQL statement needed to find out the pixel value for a location, when the raster is loaded into SpatialLite as a Raster? I loaded the Raster using rasterlite_load -d db.sqlite -T myRaster -f c:\mytest.tif All seems fine... but how would I find the value for a cell at say (100,400)? Thanks Phil


Generating Tiles for Non Geographic Datasets

Excuse my ignorance if this exists. I don't think I've seen a website ever using something like this. Have tools been developed that use general tiling methodology to implement non-geographical data sets? A line graph for instance - say, stock price, climate, or, seismographs? If the measurement frequency is high, these data sets can become extremely dense. Which can be bandwidth intensive when transferring to the client. Tools like Mapnik and Tile Map Services have solved this for cartographers. You feed these programs data & styles, and they render and serve thousands (millions) of PNGs, which eventually get stitched together on a web slippy map. This would effectively be a replacement for something like HighCharts, or DyGraphs. What I'd love is a command line tool that I feed SQL, colors, fonts, zoom levels, etc, and it generates all graph tiles at all desired zoom levels.


Creating Store in GeoServer using ImageMosaic Plugin gives Error?

I am creating a GeoServer 2.4.1 store with GeoTiffs using the Image Mosaic Plugin and I get the following error when pressing the button               Could not list layers for this store, an error occurred retrieving them:      Failed to create reader from file://C:\Geoserver Rasters\GeoTiffs\ and hints null      The Shape File describing the GeoTiffs IS Created in the directory. I have tied with a single GeoTiff as well as multile files, same error. I CAN create a store with the single tif file using the GEOTIFF Raster Data Store successfully but when using the ImageMosaic Plugin, it fails Is there a problem with the file? How to I get these GeoTiff Files to display? GDALINFO Reports the following on the single test file:                       Driver: GTiff/GeoTIFF             Files: originals\200k--e51-32_clip.tif                originals\200k--e51-32_clip.aux                originals\200k--e51-32_Clip.rrd                originals\200k--e51-32_clip.tif.aux.xml             Size is 4203, 2906             Coordinate System is:             GEOGCS["WGS 84",             DATUM["WGS_1984",                 SPHEROID["WGS 84",6378137,298.257223563,                     AUTHORITY["EPSG","7030"]],                 AUTHORITY["EPSG","6326"]],             PRIMEM["Greenwich",0],             UNIT["degree",0.0174532925199433],             AUTHORITY["EPSG","4326"]]             Origin = (120.999860000000000,16.666795000000000)             Pixel Size = (0.000237994587000,-0.000229480662000)             Metadata:              AREA_OR_POINT=Area              TIFFTAG_RESOLUTIONUNIT=1 (unitless)              TIFFTAG_SOFTWARE=IMAGINE TIFF Support             Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved             @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01             EDT $              TIFFTAG_XRESOLUTION=1              TIFFTAG_YRESOLUTION=1              Image Structure Metadata:              INTERLEAVE=BAND              Corner Coordinates:             Upper Left  ( 120.9998600,  16.6667950) (120d59'59.50"E, 16d40' 0.46"N)             Lower Left  ( 120.9998600,  15.9999242) (120d59'59.50"E, 15d59'59.73"N)             Upper Right ( 122.0001512,  16.6667950) (122d 0' 0.54"E, 16d40' 0.46"N)             Lower Right ( 122.0001512,  15.9999242) (122d 0' 0.54"E, 15d59'59.73"N)             Center      ( 121.5000056,  16.3333596) (121d30' 0.02"E, 16d20' 0.09"N)             Band 1 Block=64x64 Type=Byte, ColorInterp=Palette               Overviews: 1051x727, 526x364, 263x182, 132x91, 66x46               Color Table (RGB with 256 entries)             0: 212,215,170,255             1: 208,210,150,255             2: 215,181,155,255             3: 185,207,146,255             4: 150,150,153,255             5: 38,102,155,255             6: 113,108,44,255             7: 243,220,212,255             8: 112,78,41,255             9: 143,78,43,255             10: 138,103,44,255             11: 175,112,77,255             12: 240,215,181,255             13: 112,108,74,255             14: 171,136,80,255             15: 28,87,93,255             16: 111,112,111,255             17: 182,211,178,255             18: 187,255,185,255             19: 112,216,248,255             20: 76,77,75,255             21: 110,43,7,255             22: 109,75,13,255             23: 185,251,207,255             24: 177,255,254,255             25: 2,1,0,255             26: 181,153,143,255             27: 90,179,223,255             28: 43,43,41,255             29: 210,112,92,255             30: 151,170,109,255             31: 209,146,116,255             32: 78,43,5,255            33: 32,73,43,255            34: 146,173,145,255            35: 207,172,116,255            36: 248,81,11,255            37: 78,75,43,255            38: 143,119,110,255            39: 157,184,214,255            40: 180,212,209,255            41: 109,6,0,255            42: 79,74,9,255            43: 142,43,9,255            44: 177,116,106,255            45: 77,6,0,255            46: 112,139,111,255            47: 110,83,73,255            48: 177,77,45,255            49: 144,83,71,255            50: 145,178,178,255            51: 148,209,179,255            52: 116,136,74,255            53: 112,142,143,255            54: 77,107,77,255            55: 164,110,144,255            56: 141,73,14,255            57: 142,7,0,255            58: 11,45,91,255            59: 43,39,9,255            60: 113,176,145,255            61: 44,6,0,255            62: 175,107,49,255            63: 77,111,114,255            64: 178,82,72,255            65: 34,134,167,255            66: 139,219,251,255            67: 78,142,111,255            68: 143,48,37,255            69: 111,49,37,255            70: 144,210,214,255            71: 215,221,239,255            72: 241,210,152,255            73: 74,49,40,255            74: 114,178,182,255            75: 43,146,211,255            76: 141,136,50,255            77: 225,44,6,255            78: 180,216,242,255            79: 110,145,180,255            80: 79,141,145,255            81: 146,152,174,255            82: 175,42,9,255            83: 224,186,191,255            84: 80,104,42,255            85: 77,143,184,255            86: 211,238,153,255            87: 41,126,100,255            88: 11,38,10,255            89: 219,206,133,255            90: 109,103,16,255            91: 177,48,39,255            92: 207,141,82,255            93: 10,41,41,255            94: 72,82,109,255            95: 181,204,119,255            96: 146,206,148,255            97: 115,136,50,255            98: 177,7,0,255            99: 112,205,184,255           100: 242,221,239,255           101: 148,170,84,255           102: 178,72,13,255           103: 75,174,186,255           104: 111,172,116,255           105: 175,170,84,255           106: 76,138,81,255           107: 60,51,70,255           108: 241,146,132,255           109: 79,172,145,255           110: 174,152,172,255           111: 13,16,22,255           112: 252,128,26,255           113: 246,238,143,255           114: 82,103,15,255           115: 169,19,116,255           116: 104,85,103,255           117: 245,177,137,255           118: 140,103,16,255           119: 160,238,218,255           120: 185,238,167,255           121: 80,171,114,255           122: 248,134,78,255           123: 34,17,23,255           124: 166,238,186,255           125: 144,83,106,255           126: 207,172,83,255           127: 188,104,20,255           128: 197,82,103,255           129: 255,255,255,255           130: 251,175,74,255           131: 215,51,97,255           132: 143,16,20,255           133: 111,17,19,255           134: 117,170,83,255           135: 178,17,21,255           136: 77,17,19,255           137: 37,121,64,255           138: 221,255,204,255           139: 204,255,187,255           140: 204,255,204,255           141: 238,255,221,255           142: 255,255,238,255           143: 221,255,187,255           144: 238,255,204,255           145: 255,255,221,255           146: 62,171,90,255           147: 111,204,136,255           148: 69,192,236,255           149: 135,238,255,255           150: 221,255,221,255           151: 150,238,151,255           152: 153,238,255,255           153: 238,255,238,255           154: 255,255,204,255           155: 153,255,255,255           156: 44,198,174,255           157: 221,238,187,255           158: 238,255,255,255           159: 238,255,187,255           160: 221,255,238,255           161: 204,255,221,255           162: 194,187,136,255           163: 238,238,238,255           164: 238,238,204,255           165: 238,238,187,255           166: 170,170,119,255           167: 170,153,97,255           168: 187,170,119,255           169: 153,136,85,255           170: 221,238,170,255           171: 136,119,61,255           172: 221,221,221,255           173: 204,238,170,255           174: 153,153,102,255           175: 153,119,64,255           176: 193,170,136,255           177: 170,170,170,255           178: 221,238,204,255           179: 190,187,189,255           180: 204,255,170,255           181: 204,204,198,255           182: 255,238,238,255           183: 238,238,221,255           184: 136,136,68,255           185: 153,153,85,255           186: 202,238,187,255           187: 221,255,255,255           188: 170,170,102,255           189: 170,153,119,255           190: 170,136,102,255           191: 187,187,153,255           192: 153,119,85,255           193: 136,102,68,255           194: 191,187,118,255           195: 192,153,124,255           196: 136,136,85,255           197: 153,102,60,255           198: 187,153,99,255           199: 153,136,102,255           200: 168,187,119,255           201: 154,136,67,255           202: 130,119,85,255           203: 170,170,136,255           204: 168,187,136,255           205: 221,221,192,255           206: 255,238,221,255           207: 187,136,95,255           208: 255,255,0,255           209: 153,153,126,255           210: 134,153,85,255           211: 221,255,170,255           212: 204,255,238,255           213: 136,136,102,255           214: 187,170,102,255           215: 221,238,221,255           216: 255,238,204,255           217: 196,187,170,255           218: 136,102,89,255           219: 153,102,89,255           220: 255,255,186,255           221: 187,170,153,255           222: 238,238,170,255           223: 135,255,255,255           224: 170,170,153,255           225: 170,136,123,255           226: 136,136,131,255           227: 190,136,126,255           228: 225,204,196,255           229: 204,221,193,255           230: 153,136,125,255           231: 204,255,255,255           232: 165,187,153,255           233: 204,238,204,255           234: 133,153,102,255           235: 255,238,184,255           236: 170,187,170,255           237: 221,238,238,255           238: 195,170,170,255           239: 133,153,126,255           240: 199,221,221,255           241: 238,238,255,255           242: 197,238,221,255           243: 204,204,222,255           244: 165,187,187,255           245: 132,153,67,255           246: 170,170,189,255           247: 158,153,67,255           248: 255,238,255,255           249: 221,238,255,255           250: 198,238,238,255           251: 165,187,101,255           252: 238,255,169,255           253: 225,204,222,255           254: 190,169,188,255           255: 198,238,255,255


Calculate distance between two coordinates to use in variogram calculations in ordinary kriging

I need to calculate distance between two stations in a map in order to calculate empirical variogram in ordinary kriging to interpolate temperature data. Calculating distance in kriging using Euclidean distance formula between two points on XY axes, and I found that not sufficient because I specified Lag_units and Lag_distance in meters when I programmed kriging. Can I use the haversine formula to calculate distance between real coordinates instead of Euclidean distance?


Add new value combination to unique values, many fields symbology in Arc

We have a zoning layer symbolized with unique values, many fields. We use three layers and get a combination of 50 - 60 symbols, at a guess. How can I add a new symbol for a new combination of values in the three fields without undoing all the existing symbology and starting from scratch. Thanks. ArcGIS 10.0 sp1


How to Calculate Field to six digit number from another field concatenated with State Plane code in ArcPy?

I'm trying to calculate a field (Unique_ID) in arcpy that will bring in a six digit number from another field (Point_ID) in the table. I want to add the state plane code to the end of the Point_ID and have it calculate in the Unique_ID code. I tried copying it from a python snipped to get what I want and this is what it gave me.                arcpy.CalculateField_management("SMON","Unique_ID","!PointID!","PYTHON","")      I also have a string of all the state plane codes. I need to get the end of the state plane code added to the end of the PointID. ![enter image description here](http://i.stack.imgur.com/saAdl.png) New Code just trying the "!PointID!" ![enter image description here](http://i.stack.imgur.com/sac5a.png) Giving me this error: ERROR 000732: Input Table: Dataset SMON does not exist or is not supported Failed to execute (CalculateField). I set the environment to the database doing the calcs and ended up working for just the !PointID! part of the script. When I try to add ,+ "PointID!" + Con , it kicks back: ExecuteError: ERROR 000539: SyntaxError: unexpected EOF while parsing (, line 1)


Escaping spaces in paths for use in batch file

I am making a MapInfo program in MapBasic. I am calling OGR2OGR in order to convert some files. To do this I am generating a batch file and then running it. My code looks something like this:               RunStr = "OGR2OGR -f ""ESRI Shapefile"" """ & ExportFolder & "SHP\"" """ & TableFileName & """ -overwrite -skiperrors"     SHPMaker = ExportFolder & "SHPMaker.bat"          Open File SHPMaker       For Output       Access Write       As #1     Print #1, RunStr     Close File #1          Run Program SHPMaker      My problem is that ExportFolder and TableFileName can potentially include spaces. My questions is **how should I go about escaping spaces?** I have tried both adding carets (^) before the spaces and putting double quotes around the paths -neither works. The error I am getting is "Unable to open datasource 'GIS' with the following drivers", followed by a list of available drivers. Obviously it is picking up the "GIS" part from mid-way through the paths and treating it as the data source as you can see below. The generated BAT file looks something like this:               OGR2OGR -f "ESRI Shapefile" "S:\000 GIS Files\TEST WORKSPACE 2\convert test\Converted\SHP\" "S:\000 GIS Files\TEST WORKSPACE\SiteForm.TAB" -overwrite -skiperrors


Arcpy's replaceDataSource Error

I've checked the other answers here and none of the answers worked for me... It's a "simple" matter of finding a layer by name in a map and changing it's datasource. Here's my script:                   #-- New Source         newSource = os.path.join(currDir, lyrZones + "_Dep" + dirNum + ".shp")              #-- Validation         if arcpy.Exists(newSource):             print "The new source exists!"         else:             print "Not found!"              #-- Find the layer and change its source                     for lyr in arcpy.mapping.ListLayers(mxd):             if lyr.name == lyrZones:                 print "Layer found!"                 print layers.dataSource                 print "  Replacing source..."                 lyr.replaceDataSource(currDir, "SHAPEFILE_WORKSPACE", newSource)                 print lyr.dataSource      I run it from a python script outside ArcGIS. ![enter image description here](http://i.stack.imgur.com/d4LjO.png) You can see that the source exists, the layer is found, I can access it's datasource by printing it, but the lyr.replaceDataSource causes an error (Unexpected error... doesn't help much...) I've been working at it for 4-5 hours now and I'm short of solutions to try. Any idea what can cause the crash? Thanks!!


How to create text labels with background boxes?

I'm trying to create some custom labels for point features in a QGIS point vector layer, and I want to write a python plugin to do it. We need our labels to be presented with color tinted rectangles behind them (or else!). The labels are long strings, and are created using labeling engine expressions and conditionals. I thought the easiest way would be to let the user set up labels for the active layer the way they want, and then let my plugin can grab the label text from the features in the layer and use the text strings to create boxes. My problem is I can't find a way to access those text strings in the QGIS API. How are label strings generated by the labeling engine stored in QGIS and how can I get to them?


Django client install postgresql/postgis on Ubuntu 12.04

Does anyone know what apt packages one should install for a postgres(8.4)/postgis(1.5) django (1.4) **client** on ubuntu 12.04? All recipes seem to assume that I want to install the full postgres/postgis database server on the machine, but I have a external database server so I only want the packages that can connect to that. For a full server I use:               apt-get install binutils gdal-bin libproj-dev postgresql-8.4-postgis postgresql-server-dev-8.4 python-psycopg2 python-setuptools


Select By Attribute: Between Two Numbers

I am trying to select house numbers that are between 200 and 499. I've been using: `"HOUSE_" >= '200' AND "HOUSE_" <= '499'` ... and it's coming up with almost everything else. The numbers it does grab don't make sense at all either. I tried using a BETWEEN operator but that just gives me an error.


Why all WFS and WPS are CGI based?

Even though we have a lot of web technologies now, why are all WFS and WPS still cgi based? PHP allows tp read from postgres or other db's and HTML5Canvas or SVG can render the maps on the web. C++/Java Web Toolkits are available now which can talk to GDAL. But still, if we need a WPS, it uses cgi. Can anyone answer why?