Printing/exporting WMTS tile layer with desired resolution / zoom level in QGIS

I have a project which uses WMTS and some vector layers in QGIS. I can freely zoom in and out, and tiles are refreshed with appropriate zoom level, just as expected. Now I would like to export part of this map (a given bounding box) with the tiles at a fixed zoom level, so that I can better match the printer resolution when map is printed in the desired physical size. How should I tell QGIS to use that given zoom level, and which file format is best suited to do what I want?


ArcPy loops/cursors faster without background processing?

I am running loops via cursors and raw Python in Arcpy. Within the loop several processes take place, selecting shapefiles and converting to raster, clipping, running euclidean distances, extracting by mask etc. When I would run with background processing enabled things would often crash and background server would throw an error. Now that I have disabled background processing, things seem to be faster and not throwing errors. Is it fundamentally better to run long, complex loops without background processing enabled?


Data Feed for Space Weather / Aurora

I am building a map application for a northerly area and would love to bring in a feed of northern lights prediction/probability (like below). http://www.gi.alaska.edu/AuroraForecast Does anyone know of a service for space weather that I could digest into leaflet or something?


How to register dll extension with RegAsm.exe on Windows 7 64bit ArcGIS 10 SP1?

I am having some issues with registering a dll:   1. run DOS as Administrator   2. CD "C:\Program Files (x86)\Common Files\ArcGIS\bin\" (where the ESRIRegAsm.exe is)   3. I attempt to register the dll as follows: Syntax: ESRIRegAsm.exe assembly_name /p:product_name ESRIRegAsm.exe "C:\Program Files (x86)\MyExtension\myextension.dll" /p:desktop I get a warning raised by the registration utility that says: Specified path not found. However, the path is positively correct. What am I doing wrong?


Why is my XY Event Source layer only displaying at full extent?

My XY Event Source layer is only displaying at full extent and when I zoom in, the features disappear. If I select a feature in the attribute table, the feature is highlighted. When I see this for a normal featureclass, it usually is a problem with spatial index. I first experienced this issue in early Oct. and I did open a ticket with ESRI Tech Support. While on the phone with the analyst, I fired up my MXD and no longer had the problem. I've since created several of these XY layers and all have worked perfectly. Some details: the X,Y theme is created from a query layer (new to ArcGIS 10), which is a SQL Server query to an external SQL Server 2005 database (not SDE and a DB that I'm only a read-only user on). The X,Y values are character values casted to numeric ( _not efficient, but this will only be used occasionally by a few key users_ ). Is anyone else having this issue? I had this problem once and I did unknowingly fix it, but I have no clue as to how. My current workaround is to export to a local file/personal geodatabase--the exported featureclass displays just fine. But I would rather have live access to the data. * * * **Update:** I found a layer file from back in Oct which is working (I must have saved one out). When I add the layer to the map, it works. I'm thinking that there's something in the query that ArcMap isn't liking. However, I'm not sure how to access that query. When I add the layer They query layer, from which the x,y event theme was originally created, isn't in the new MXD. I'll have to dig into this further, but I'm in meetings this afternoon. * * * **Update #2:** On a hunch, I thought the issue might have something to do with the number of rows (71847). So in the query layer, I added `TOP 5` my select statement. I do a `Display X, Y Data...` and I can zoom in or out with no trouble--everything works as expected. So I kept increasing the `TOP N` and each time it worked. Then I put in a `TOP 71847` (the total number of records) into my Select statement. And that works!! That still doesn't answer my question, but it does me get where I want to be (I have to put a `SELECT TOP (SELECT COUNT(*) FROM TABLE) field1,field2,... FROM TABLE` which is messy.


Blank extensions box in ArcMap 9.3

After a reinstall of ArcInfo 9.3 (which works fine for mapping etc), the box for all of my extensions is blank. I've checked, and they're all licensed in Desktop Administrator, but not showing at all in ArcMap. Does anyone know how I can fix this please?


Error in polygonising raster data with QGIS on Mac

I'm using QGis Chugiak on a Mac and I'm trying to converting a raster layer in a vector data by: Raster/Conversion/Polygonize. So, I select the layer needed from the drop-down menu, I give a name to the output, layer but every time an error heppens. Probably there's something that doesn't work in GDAL. I leave there the error informations: ![Error in polygonising a raster](http://i.stack.imgur.com/Xk78i.png) Thank you!


problem with viewing ASCII data files in ArcGIS

I have some problem viewing an ASCII file in a structured way in arcGIS. I have tried running this code but it seems problematic at least with me. I am unable to run this. I think the code needs modification. Can you please tell me the requirements to run this code... and some other help. the link contains the file as well as the IDL source file https://drive.google.com/?authuser=0#folders/0B8iAKVklcaMUVU5qY2NNVFBRbDQ


How to share *.sql files between ArcGIS and MapInfo?

In Denmark many municipalities have the same provider of public data. These data are pushed to a local database – often a SQL Server. The DBMS layout is the same for all municipalities. When I create a linked table from the SQL Server, I can save (or load) a .sql file in the MapInfo dialog. This .sql-file is portable and I can share it with municipalities with the same setup – but only with MapInfo-municipalities. Recently I had a post at a conference on this item and I urged my colleagues to use my .sql-files and/or my source code. I was however unable to guide my colleagues from the ArcGis-municipalities. Can anyone give me some heads up on this matter? Is it possible to do In ArcGis? The .sql file from MapInfo contains the plain SQL query which is sent to the SQL Server: I.e. :               Select      "JY72000V"."VEJ_NAVN"+ ' '+ "JY72000V"."HUS_NR" As Adresse,      "JY70100V"."KOMMUNENUMMER" AS Kommunenummer,      "JY70100V"."EJENDOMSNR" AS Ejendomsnummer,      Cast("JY72000V"."KOMMUNENUMMER" As varchar(3)) + Cast("JY72000V"."VEJKODE" as varchar(4)) + "JY72000V"."HUS_NR" As ADRESSE_ID     From "ql5020pd"."dbo"."JY70100V", "ql5020pd"."dbo"."JY72000V"     Where "JY70100V"."ADG_ID"="JY72000V"."ADG_ID"      Thanks for any help Søren Breddam, Stevns Kommune


It is possible to use different fields for symbology and legend labeling in QGIS?

[Edit : working with Quantum GIS version 2.0.1-Dufour] I wonder if it is possible to use some field to set the symbology and some other to label the map. [ **Edit 1 :** I mean labeling the legend in the map designer tool to output as JPG or PDF, not labeling objects in the canvas for working purpose.] [ **Edit 2 :** The purpose of my question is to get an automatical process so I could save time and not manually change all the labels of the legend.] My problem is : I have to make a map of natural habitats, based on european "CORINE biotopes" typology which uses entities with number and names, e.g. : "37 hygrophilous meadows", "38 mesophilous meadows", "41 deciduous forests", "42 coniferous forests", "51 active bogs", etc. So I would like to use shemes of the same color for habitats which are similar : all meadows in different tons of yellow, all forest in different tons of green, mires and bogs in some brown scale etc. To do this I need to base my styling work on the NUMBERS, since following numbers identify similar habitats (meadows are 3X, forests are 4X, etc). But for reading and understanding purpose, the printed map should be labelled with the NAMES. And the labelling should not get "noised" by the numbers, so I separated NAMES and NUMBER of the same entities in 2 different fields. Is there some way to say QGIS to let me do the symbology on the basis of the "NUMBER"-field, but then to label the map on the basis of the "NAME"-field ? I would like to set the "label" (like here from the Layer > Properties > Symbology) ![Layer - Properties - Symbology](http://i.stack.imgur.com/hAKCO.png) To set the label of the legend in the Map Designer Tool : Here I would like to get the names of the habitats, and not the numbers. ![Map designer - Legend](http://i.stack.imgur.com/FzYF2.png) Thanks for all kind of help.


QGIS radius buffer question, can it be more circular?

Conundrum for the day, When I request a radius buffer in QGIS (Dufor). my buffer comes out as a 20-sided polygon rather than a true "circle". This has lead to some missed blocks when clipping underlying vector layers for population density analyses (e.g., they would be within a circle, but this 20-sided polygon's straight sides preclude fringe blocks from being included in the radius). is there a way I can go into the radius buffer command lines and either increase the number if sides to make the area more circular, or make it truly a "radius" buffer? Clear as mud? I'm trying not to ramble. Thanks. AY


How to get Drainage Divide and Streams from DTM

Does anyone know how you can get a map like this attached, having the digital terrain model?      I'm sorry, but I do not know what is the exact technical term in English for them.   **I hope you understand from the images.**      (maybe drainage divide, water divide, divide, ridgeline, watershed, water parting) My professor called it _compluvium and impluvium_. But another professor colled it _articulation of the morphological type of the soil_. _(in the Italian language: Carta dei compluvi e displuvi / Articolazione morfologica terreno )_   Thanks in advance for the answers ![enter image description here](http://i.stack.imgur.com/TZ4cR.jpg) ![carta compluvi e displuvi](http://i.stack.imgur.com/hw4tX.jpg) ![carta morfologica del terreno](http://i.stack.imgur.com/65Osh.jpg)


MemoryLeak - http://help.arcgis.com/en/webapi/javascript/arcgis/samples/fl_any_projection/index.html

Attention ESRI - Loading http://help.arcgis.com/en/webapi/javascript/arcgis/samples/fl_any_projection/index.html inside of sIEve shows a significant amount of memory loss each time the page loads (+10MB). Any workarounds?


How do I create a network from connected links

I have a bundle of links in 'some' networks. I need to find out which ones are connected to each other i.e. I need to find out which links are not connected to the 'main' network. I have been working on a flood fill recursive method, which effectively goes from link to link, finding out which ones are connected, and recursively doing the same. But the numbers are quite high, and my machine just bailed, so I wondered if there were other, better, or more efficient, ways of doing this. Using arcpy Thanks in advance


Wind Farm Viewshed/ZTV

I've created an ArcGIS tool using ModelBuilder and **Viewshed** to create a wind farm ZTV and whilst each raster cell tells me whether there's visibility or not it doesn't tell me what the vertical angle of visibiliy is. Does anyone have any ideas how to do this ?


Optimize openlayers / Geoserver 2.5 with GeoWebCache - reprojection necessary?

I have an openlayers map setup with several base layer options (some served by my own GeoServer) and many optional layers served by my own GeoServer. I've selected Google's EPSG:900913 as the map's projection. And I've specified specific resolutions to optimize use of the GeoWebCache (see below for explanation). Here are the relevant portions of the map's options when created in OpenLayers:                    options = {             projection: new OpenLayers.Projection("EPSG:900913"),             displayProjection: new OpenLayers.Projection("EPSG:4326"),             numZoomLevels: 12,             resolutions: [152.8740566, 76.43702829, 38.21851414, 19.10925707, 9.554628536, 4.777314268, 2.388657134, 1.194328567, 0.597164283, 0.29858214, 0.14929107, 0.07564554],      ...      These resolutions come from looking at the Tile Matrix Set for GridSet EPSG:900913 in GeoServer. These correspond to zoom levels 10 through 22. I did this to optimize the tile requests to match the seeded cached tiles in GeoWebCache. Turns out that many of my layers, served by my GeoServer, have native projection of EPSG:2234 (NAD83 / Connecticut (ftUS)). I see that I can, if I wish, create a new GridSet for caching tiles in this projection. If I just let it create default Tile Matrix resolutions, they will be different from the resolutions for EPSG:900913 GridSet. At least I believe so - these will be in feet rather than in meters, so I'm comparing apples to oranges anyway. But now I'm thinking this whole step is completely uneccessary... Can I still simply seed my native EPSG:2234 layers with the EPSG:900913 Tile GridSet, and then expect tiles requested by OpenLayers to the GWC service using srs:'EPSG:900913' will get created and cached properly? Or should I force reprojection at the layer level, so it is both published and cached at the same projections? I don't want to go through this step if it is completely unnecessary... Thanks for any advice you can provide.


Help with ArcGIS10 Python and SearchCursor reading Null values in field

I'm using a Phython script to count the number of unique string values in a feature class. My script works if there are values in the field but if there are any NUll values in the field it crashes. Any Ideas?               import arcpy     import operator          inTable = arcpy.GetParameterAsText(0)     stringField = arcpy.GetParameterAsText(1)               stringList = [row.getValue(stringField) for row in arcpy.SearchCursor                                            (inTable, "", "",stringField)]


Interaction with two variables as parameters, saving the raster properties output into a table (.dbf)

The draft of the model below **TASK** : I need to calculate the percentage of river channel that is covered with shadow in each timestep **RESOURCS:** I have values for azimuth and elevation of the sun (hourly timestep for daylight hours within a year – over 3000 values) **INPUTS:** 1. A table (.dbf) with azimuth and elevation values 2. A river chanel mask (single polygon) 3. A DSM **PROBLEMS** **How to make an interaction with two lists as parameters** The elevation value and azimuth value are assingned to a certain time and date, .I don’t want to calculate hillshade for e.g elevation row 2 and azimuth row 6 –I want only elevation row 1 + azimuth row 1, elevation row 2 + azimuth row 2, elevation row 3 + azimuth row 3… etc… **How to save an output – all the means - back to the input table** – I had an idea to use a calculate field tool, but I don’t know how to “import” the values to the expression field. * * * I've figured out the solution to my first problem. It was easier than I thought. I Do not need to iterate. The simple for of input variable as a list and specifying the table to derive the values. But there is still the other problem - how to write the output back to the input table as a next column![model](http://i.stack.imgur.com/zKRia.jpg)


XY data in sketch properties

Does anyone know if there is a way to export the xy data from sketch properties in the editor to a .txt file?


Extract individual land cover classes from NLCD dataset in ENVI

I have a National Land Cover Dataset with 16 different classes. Is there a way to extract the pixels from each individual class and save it as a GeoTiff using ENVI (either Classic or 5.0) so that in the end i'd have 16 GeoTiffs, one for each class?


What are the areas, relating to database or server, that should be viewed while making map based webapplication?

This question is relating to GIS web application that are based on relational database. I have database that is not indexed with spatial column and I use geoserver to display these data as layers. But for a single layer that is displayed zooming in and out takes time(Intranet or localhost). Are there anything that can be done so that the application can respond faster? I have used:               1.Geoserver     2.SQl-SERVER 2008     3.Openlayers and geoExt     4.No of rows nearly 3000 only for each layers or less (200)


Passing parameters to PostGIS SQL queries in Python: weird behaviour

The following code always goes to the except section and I do not understand why..Any help would be much appreciated.               l = None     c = conn.cursor()     try:       s = "SELECT ST_NPoints(ST_GeomFromText(%s))"       d = (line,)       c.execute(s,d)       l = c.fetchall()     except:       print "could not get the line vertices"          print line           MULTILINESTRING((-3.16420835153456 55.9269166007097,-3.164222 55.926918),     (-3.1642070167833 55.9269296196706,-3.16421351659546 55.9268662214904),     (-3.16421351659546 55.9268662214904,-3.16421636372824 55.9268384509897),     (-3.16421636372824 55.9268384509897,-3.16422182573761 55.9267851753802),     (-3.16422182573761 55.9267851753802,-3.16422870102352 55.926718114886),     (-3.16422870102352 55.926718114886,-3.16423309121073 55.926675293667),     (-3.16423309121073 55.926675293667,-3.16423565148822 55.9266503211093))      If I execute this in psql, it works fine. I also have the impression that I am following documentation perfectly regardging passign parameters to sql queries etc. When I call the function, I pass the argument as a string like this `'MULTILINESTRING((-3.164....565148822 55.9266503211093))'`


How to convert excel csv file to filled contour Google Earth Map?

I have a csv file http://www.geocities.ws/radar/data2.csv.   The first column is latitude.   The second column is lonitude.   The third column is precipitation type.   5 represents freezing rain. 15 represents sleet. 25 represents rain. 35 represents snow. 45 represents hail.   How would I translate that into a filled contour plot like the following?   (http://www.mathworks.com/help/examples/graphics/CreateAFilledContourPlotExample_01.png)   I would like this on a Google **Earth** kml file. How would I edit the spacing between the contours?


C# library for converting geom field of SQLServer into set of google latlng

Is there any C# library which can convert the geometry field into set of google latlngs? I have stored a shapefile into SQLserver table. From Sqlserver i want to read the geometry field data and want to convert this geom data into set of google latlngs in my C# application. Finally i want to save these google latlngs into another table in SQLServer.


Python script fails on stand alone but works in ArcMap as a toolbox

I have a fresh install of ArcGIS Server and ArcGIS for Desktop both 10.2, latest patches applied. The data is served in this application from a PostgresSQL enterprise geodatabase. The problem is that I can connect to the database using ArcMap, on the ArcGIS Server (the maps that have their data source set in the database) and I can run python scripts that interact with the database in the python console in ArcMap. Yet, the same scripts, or even the smallest interactions (e.g. listing the feature classes with `arcpy.ListFeatureClasses()`) does not work stand alone in python command line. I have tried both the 32 bit and 64 bit Python installations that came with the server and desktop and none run any smallest interactions with the geodatabase. Any thoughts? For reference, a small snippet of code that fails:               import arcpy     arcpy.env.workspace = 'path/connection.sde'     arcpy.ListFeatureClasses()      returns:               []


Is the QGIS API suitable for my application

I am working on an Linux/QT application that includes a real-time map based display of multiple robotic vehicle positions, where the positions are derived from a variety of sources--some are GPS, others are custom positioning systems that do not produce NMEA type strings. I need to be able to display both custom icons and vehicle track histories. The rest of my application is very domain specific, but it seems that the map display portion ought to be doable using a relatively generic mapping API. I need to be able to interactively zoom and pan, and refresh whenever I get new data. I also need to support geographically based raster underlays. My number of vehicles and history points is relatively small--say several thousand I do this now using a custom C++/Open GL QT application, but will soon be embarking upon a rewrite. Is the QGIS API suitable for this application? Is it fast enough to be interactive?


Split lines into non-overlapping subsets based on points

Given a table with line geometry, and one or more points that are snapped to this line in a separate table, I would like to split each line with one or more intersecting points at each of the locations where the line intersects a point. For example, there is a line, L, with three intersecting points, A, B, and C in order along the line geometry. I would like to return L as four distinct geometries: from the beginning of L to A, from A to B along L, from B to C along L, and from C to the end of L. In the past I have used shapely for this task, which is a linear referencing problem (http://sgillies.net/blog/1040/shapely-recipes/). However, this would not be practicable in this case, which has many millions of lines and points. Instead, I'm looking for a solution using PostgreSQL/PostGIS. Note that points are constrained to be on a line. Further, a point can validly be on the start or end of a line, in which case the line need not be split (unless there are other points which are not coincident with the same line's start or end points). The subset lines need to retain their direction and their attributes, but the attributes of the point features do not matter.


Can a custom add-in execute code upon install of the .esriaddin

I have made a custom add-in using C#.NET(a toolbar that contains buttons) and I was wondering if it is possible to have some code execute upon the install of the .esriaddin file. Basically I want to create a directory with some map templates on the users computer. I can just add the               DirectoryInfo di = Directory.CreateDirectory(@"Path"); etc....      to the on click event of the buttons and have it only execute if the folder doesn't exist but I was wondering if there was a way to execute it on install so I don't have to include it within the buttons. Edit: I have looked at this and it is similar though I'm not using a custom installer.


directional line symbol ArcGIS vs ArcView 3

Is this possible in ArcGIS to have variable number of arrows on the line to show direction? This is an ArcGIS example, where I can have fixed (1, **2,3** ,4,5...) number of arrows and it stays the same doesn't matter what the line length is. First and last always stick to the end, doesn't help with network mapping, where there is usually the node to show. Having just one in the middle is never enough, check line at the right... ![enter image description here](http://i.stack.imgur.com/BzV92.png) No such issues with ArcView 3: ![enter image description here](http://i.stack.imgur.com/g6wu9.png)


GML - Multi-geometry validation

I'm doing the test to introduce multiple geometry in a WFS service using GML. For now the simple geometry is functional, but I still have some bugs with multiple geometry. I think it may come from my GML and XSD which are not valid in multiple geometry. (validation with this site : http://cite.opengeospatial.org/test_engine/gml/2.1.2 ) The two errors reported : http://www.hostingpics.net/viewer.php?id=329637Sanstitre1.png Here is the code of my two test files. The GML :               <?xml version="1.0" encoding="UTF-8"?>     <gml2:FeatureCollection xmlns:gml2="http://www.safe.com/gml2"  xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.safe.com/gml2 Test_creche_multi_geometry.xsd">     <gml:boundedBy>         <gml:Box srsName="EPSG:31370">             <gml:coordinates>184929.649440012,128365.014231805 184946.357440016,128378.548198801</gml:coordinates>         </gml:Box>     </gml:boundedBy>     <gml:featureMember>         <gml2:Test_creche_multi_geometry>                     <gml2:CODEPICC>xxxxx</gml2:CODEPICC>                     <gml2:CLE>xxxxx</gml2:CLE>                     <gml2:RUE>xxxxx</gml2:RUE>                     <gml2:NUMERO>xxxxx</gml2:NUMERO>                     <gml2:CODEPOSTAL>xxxxx</gml2:CODEPOSTAL>                     <gml2:LOCALITE>xxxxx</gml2:LOCALITE>                     <gml2:COMMUNE>xxxxx</gml2:COMMUNE>                     <gml2:ITINERAIRE>xxxxx</gml2:ITINERAIRE>                     <gml2:FONCTION>xxxxx</gml2:FONCTION>             <MultiGeometry>                 <geometryMember>                     <gml:polygonProperty>                         <gml:Polygon srsName="EPSG:31370">                             <gml:outerBoundaryIs>                                 <gml:LinearRing>                                     <gml:coordinates>                         184945.971440009,128372.235198804,98.9550000000017 184945.033210008,128365.014231805,96.0626999999949 184929.649440012,128367.213198801,98.8849999999948 184931.385440006,128378.548198801,95.9250000000029 184943.227440013,128376.6961988,98.8410000000003 184946.357440016,128376.194198803,98.8380000000034 184945.971440009,128372.235198804,98.9550000000017                                     </gml:coordinates>                                 </gml:LinearRing>                             </gml:outerBoundaryIs>                         </gml:Polygon>                     </gml:polygonProperty>                 </geometryMember>                 <geometryMember>                     <gml:pointProperty>                         <gml:Point srsName="EPSG:31370">                                 <gml:coordinates>184938.100676204,128371.723142331</gml:coordinates>                         </gml:Point>                     </gml:pointProperty>                 </geometryMember>             </MultiGeometry>             </gml2:Test_creche_multi_geometry>     </gml:featureMember>     </gml2:FeatureCollection>      The XSD :               <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml"     xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml2="http://www.safe.com/gml2"     targetNamespace="http://www.safe.com/gml2" elementFormDefault="qualified">     <import namespace="http://www.opengis.net/gml"     schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>     <element name="FeatureCollection" type="gml2:FeatureCollectionType"     substitutionGroup="gml:_FeatureCollection"/>     <element name="Test_creche_multi_geometry" type="gml2:Test_creche_multi_geometryType" substitutionGroup="gml:_Feature"/>     <complexType name="FeatureCollectionType">     <complexContent>     <extension base="gml:AbstractFeatureCollectionType"></extension>     </complexContent>     </complexType>     <complexType name="MultiGeometryPropertyType">     <complexContent>     <extension base="gml:GeometryAssociationType"></extension>     </complexContent>     </complexType>     <complexType name="Test_creche_multi_geometryType">     <complexContent>     <extension base="gml:AbstractFeatureType">     <sequence>     <element name="CODEPICC" type="integer"/>     <element name="CLE">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="RUE">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="NUMERO">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="CODEPOSTAL">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="LOCALITE">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="COMMUNE">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="ITINERAIRE">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <element name="FONCTION">     <simpleType>     <restriction base="string">     <maxLength value="254"/>     </restriction>     </simpleType>     </element>     <choice>     <element ref="gml:MultiGeometry"/>     <element ref="gml:polygonProperty"/>     <element ref="gml:pointProperty"/>     </choice>     </sequence>     </extension>     </complexContent>     </complexType>     </schema>      Thx for your suggestions. :]


GIS Application for online map and journey planner

I am planning to implement an online map application with journey planner for a city. I don't have any experience in GIS development but I have a few years of experience in Java development. So could you guys suggest me how I could start off my implementation. Any recommendation for books or documentations? What kind of technology stack should I use? Thanks in advance. Regards, K.H


Is there a geocoding service that can return building or area type?

I'm about to shop around for a geocoding service that can return more details about geocoded addresses. For example, if a result is returned to a building rooftop, can the service tell me that the building is an 8-story apartment complex or a warehouse. If not rooftop level, can I found out if the result is in a residential suburb, or central business district? Can anyone give me a head start as to what's out there that can do the above? I'm interested in US only and international coverage. Thanks


Update query does not affect any rows, privileges are set to public and allow all actions

I've been trying to update a column of integers called level_dept in a table called adminboundaries within the sql query tool on pgadmin3 and the query runs and finishes with a lot of lag, but 0 rows are affected. I didn't receive any syntax errors and I've set the privileges to allows the user role to perform all actions, are there any other particular settings or things I should check that I should know about?               BEGIN;     EXPLAIN ANALYZE     UPDATE AdminBoundaries     SET "LEVEL_DEPT" = "LEVEL_DEPT" - 1     WHERE "NAME_3" = NULL AND "LEVEL_DEPT" = 3;      COMMIT;      Error Log:               2013-01-03 15:58:03 EST STATEMENT:  BEGIN;         EXPLAIN ANALYZE         UPDATE AdminBoundaries         SET "LEVEL_DEPT" = "LEVEL_DEPT" - 1         WHERE "NAME_3" = NULL AND "LEVEL_DEPT" = 3;          COMMIT;      Despite trying a few variations of syntax, I think it might be a pgadmin related issue? I'm not sure though. I'm considering changing the postgresql.conf file. I've already enabled seq_scan to be off. There are other parameters I'm considering changing. Is it necessary to look into the nuances of postgresql as far as dirty reads, commit delays, etc when processing in a table of only 250k rows?


Offline data and less space with Ruby

I have a very specific problem. I am trying to build an offline map on leaflet, rhomobile(based on ruby) and OSM data. The problem is that I am making now a offline layer images folder with the city data rendered and in average a big city is 200mb . In case that OSM data file is only 5mb . What is the optimal way to do it less? Maybe geojson or something else? I know for Tilemill you can export data to .mbtiles which is sqlite3 database, but the weight of the file is the same and even bigger ... What you would suggest?


Error code 500 at REST Endpoint of published geoprocessing service - Problem with output parameter type?

Using ArcGIS 10.1 (Server and Desktop) I've been trying to publish a geoprocessing service based on a python script I wrote. Of course, it all works flawlessly from ArcGIS Desktop but I run into all sorts of problems when publishing. I'm pretty sure the problem is related to the types of my output parameters or something to that effect. Here's the python script, minus comments and messages to GUI...               import arcpy     import json     import sys     import os          from arcpy import env          class Result(object): pass          out = Result();          arcpy.env.overwriteOutput = True          config = arcpy.GetParameterAsText(0)    # A string containing a path to a JSON config file     source = arcpy.GetParameter(1)          # A string containing the name of a layer     sWhere = arcpy.GetParameter(2)          # A String containig a where clause     distan = arcpy.GetParameter(3)          # A String containing a distance linear unit     target = arcpy.GetParameter(4)          # An Array containing multiple layer names          try:         f = open(config)              try:         jsonCfg = json.load(f)              finally:         f.close()          except:         pass          # jsonCfg['connection'] is a path to an SDE connection      fc = os.path.join(jsonCfg['connection'], source)     scratch = os.path.abspath(jsonCfg['scratch'])          arcpy.MakeFeatureLayer_management(fc,"source_lyr")     arcpy.SelectLayerByAttribute_management("source_lyr", "NEW_SELECTION", sWhere)     bufLyrNam = os.path.join(scratch, "source_buf")     arcpy.Buffer_analysis("source_lyr", bufLyrNam, distan)          buffer = arcpy.FeatureSet()     buffer.load(bufLyrNam)          nLayers = len(target)          selection = []          for i in range(0, nLayers):         lyrNam = "target_lyr_" + str(i);         tgtNam = os.path.join(jsonCfg['connection'], target[i])              arcpy.MakeFeatureLayer_management(tgtNam, lyrNam)         arcpy.SelectLayerByLocation_management(lyrNam, "INTERSECT", bufLyrNam)         cpyNam = os.path.join(scratch, target[i].replace(".",""))         arcpy.CopyFeatures_management(lyrNam, cpyNam)              fs = arcpy.FeatureSet()         fs.load(cpyNam)         selection.append(fs)          out.selection = selection          arcpy.SetParameter(5, out)      At first, I wanted to output the "out" object but apparently, this is not allowed in geoprocessing services. I can still publish the service but the output is converted to an unusable string. I then tried to output only the "buffer" variable (containing a featureset) using an output parameter of type Any Value, Feature Class, Feature Layer... etc. and tried to output the selection variable as a Multiple Value Feature Class with no success. In fact, something weird happens when I try to output the buffer. Once my service is published, I cannot access its REST endpoint, I always get a error code 500 page. This leaves me thinking that the arcpy.SetParameter must correspond to the output parameter type in order to even access the REST endpoint. I've been working on this for a couple of days and I'm out of ideas which is why I created an account and asked my question. Can anyone help me figure out the problem here? Thanks, Ggilmann


how to get a gridded raster surface from points?

I have set of points from aircraft, I used convert point to polygon option to convert them to raster, but it does not work...Do I need to creat a buffer and then interpolate?


Where can I get US snowfall data with day resolution?

I need to visualize the snowfall in the USA for a given time period and city. So you could pick a given day and get a heatmap showing the amount of snowfall at each place in the USA on that day. Monthly or seasonal snowfall isn't granular enough for this application. Does anyone know where I could get data like this? (Ideally it would already be hooked up to a map so I can explore the data before building the whole thing myself.)


tilecache problem with LABELMAXSCALEDENOM

I use tilecahce and mapserver and I have problem to showing labels. In mapfile when I use LABELMAXSCALEDENOM option the label layers not show in map. when I delete tis option the layer render without any problem. my tilecache setting is: ` [mun]   type=MapServerLayer mapfile=C:/label.map layers=m-line-ll-utf8,m3-line-ll,m3-text-alley-utf8,m3-text-main-utf8 levels=18 maxResolution=0.05574403515625001 bbox=39.378851,24.702109,67.919797,40.140041 srs=EPSG:4326 extension=png `


Convert multiple GeoTIFF to one KMZ

I am using GDAL to convert GeoTIFF to KMZ. I am using the following command:               gdal_translate.exe -of KMLSUPEROVERLAY *.tif out.kmz      If I have one TIF file in the folder, it works ok. If I have more than one, then I receive the following error:               FAILURE: Too many command options.      How can I run the `gdal_translate.exe` command to combine more than one `TIF` file into one `KMZ` file?


How to get data from the selected features and embed to a particular featura class

I am trying to write a Python script for ArcMap 10.2. When the user selects some features I want certain data to go to a certain point file. For example, I have a polygon that contains parcel data. If someone inserts an address point on top of that polygon I would like to get data from that polygon into the address point feature class. My parcel data is a shapefile and the point is a feature class. Could this be done? Has someone else have the similar question and found an answer? I hope people could lead me to the right location or guide me of what tools I need.


Leaflet Map Dropdown

I am attempting to create a simple basemap selector to use in a leaflet map to assist in selecting a basemap of interest. I've created a new Select control that works great in a computer browser but does not respond when accessed via mobile device. I am guessing the mouse events in the following line of code are causing the problem:               this._baseLayerDropDown.firstChild.onmousedown = this._baseLayerDropDown.firstChild.ondblclick = L.DomEvent.stopPropagation;      However, I have no idea how to reengineer this line to make the Select responsive in the mobile environment. Anyone have any ideas? Here is a larger sample of my code:               basemapControl = L.Control.extend({         options: {             position: 'bottomleft'         },              onAdd: function (map) {             // create the control container with a particular class name             this._initLayout();             return this._container;         },         _initLayout: function(){             var className = 'basemapControl'             var container = this._container = L.DomUtil.create('div', className);             // var form = this._form = L.DomUtil.create('form', className + '-list');             this._baseLayersList = L.DomUtil.create('div', className + '-base');             container.appendChild(this._baseLayersList);                  this._baseLayerDropDown = L.DomUtil.create('div', 'basemapDropDown', this._baseLayersList);             this._baseLayerDropDown.innerHTML = '<select id = "basemapSelect" style="width: 100px"><option value = "Streets">Streets</option><option value = "Aerials">Aerials</option><option value = "Zoning">Zoning</option></select>';             this._baseLayerDropDown.firstChild.onmousedown = this._baseLayerDropDown.firstChild.ondblclick = L.DomEvent.stopPropagation;             L.DomEvent.on(this._baseLayerDropDown, 'change', this._onBaseLayerChange,this);              },      Any hints would be greatly appreciated. Best Regards, Tyler


Longest route of a stream in ArcGIS?

![enter image description here](http://i.stack.imgur.com/QhDjn.jpg) I have a shapefile with polylines representing rivers all over a region. In the attached image, there is an example of one river. The longest route is marked by the two red dots on this river, but it is divided into many polylines especially along this route. I would like to find the total length of this river (and many many others) without having to manually delete all tributaries then merge the longest route. Is there an efficient method for accomplishing this task? Is it possible to do this task to many rivers at the same time? I'm using ArcGIS 10.1 with an ArcInfo license. I have access to VBA, but not Visual Studio.


ArcGIS Model Builder Copy Features tool fails with 10.2 fGDB as input

So far I cannot detect any difference between the two input feature classes other than that anything in pre 10.2 copy features will work. If I set the input to be a FC from a 10.2 file GDB, I get the 'ol 000210 error. Projections aren't an issue, both inputs reside in the same level of the file structure, no differences in OS permissions. I've created a fresh fGDB for testing, same behavior. I can even have both FC versions in the same MXD and just switching the input in the model decides success or failure. To be fair, when i say non-10.2 GDB, my older ones are almost all 9.3. I'll try to test with an intermediate version as well. I have tested with different output locations and no problems there. Its odd because the error raised is related to _output_...not input. I am currently writing to %scratchFolder% And to honor the Stack Exchange protocol, here is my question: Has anyone seen similar if not identical behavior from this? Again, it appears to only affect 10.2 fGDB using the copy features tool. ![ExportDatatoZip](http://i.stack.imgur.com/pBr0F.png)


Mapserver set no image available

I'm composing a map with aerial footage with mapserver and tilecache. I have tiffs with geo information, then I run gdaltindex to create the shapefiles and then I configure the map file with layers like this:               LAYER         NAME "viana"         STATUS default         TILEINDEX "viana.shp"         TILEITEM "location"         TYPE raster         OFFSITE 0 0 0          PROJECTION                                           "init=epsg:27492"                             END         PROCESSING "RESAMPLE=BILINEAR"         PROCESSING "DITHER=YES"         TRANSPARENCY ALPHA         MAXSCALEDENOM 54000         MINSCALEDENOM 423     END      How do I set a default image in mapserver for when I'm have no data for some specific area, like an "Image not available at this zoom"? Like http://12f.p8.sl.pt


Three Dimensional Routing Input Location Errors and Questions, ArcGIS10

I am having a bit of a problem with my three dimensional route solving. I am creating an interior building network, and ideally would be routing from room to room. I created a line feature class, with z values, implemented it into a network dataset. I built a model that was successfully routing in ArcScene, but something has broken. Whenever I click to interactively add a set of stops to find a route the first one returns as successful but the second one always is returned as an error. The routing does not function if the two stops are not placed on the same line segment, or across a break (simple vertex, or another adjoining segment). I was also wondering if there was a way to potentially add stops by defining it based on an attribute from a point class that is contained in the network, rather than clicking interactively? I do not wish to add an entire point feature class, just specific points from one. If anyone has any ideas, they would be much appreciated. Thanks. I am using ArcGIS 10.


replace data source for all layers that point to shapefile

Hi I'm trying to do something quite simple but its not working. I want my python script to change all of the layers that point to the same datasource (a point shapefile) to another point shapefile. replaceDataSource seems to be the methods but when I run this:               for lyr in arcpy.mapping.ListLayers(mxd):         #print lyr.name         if lyr.dataSource == r"X:\filepath\folder\points.shp":                 print lyr.dataSource                 lyr.replaceDataSource(r"\\main.glb.corp.local\E-GB$\Home\AB\4\J022414\Documents\ArcGIS", 'SHAPEFILE_WORKSPACE', "ismage_template_P.shp")                 print "data replaced"     mxd.saveACopy(mxd)      i get "Runtime error type 'exceptions.ValueError'>: Layer: Unexpected error" when I run this. It prints the data source but doesnt print "data replaced" so it looks like the problem is on the lyr.replacedatasource line Has anyone had this problem before, or should I be using a different method?


ArcGIS metadata creation scripts

I maintain metadata as I always have....inconsistently and sporadically.. I know...booh to me. Anyways, I know python can pull all kinds of info out of mxd in V10. Has anybody come up with some scripts to populate basic stuff like layers and paths to mxd metadata? Seems like this should be pretty easy, but I would really like to know if there is any reason this won't work and if anybody has written anything along these lines to get me started in the right direction.


How to calculate Topographic Ruggedness Index in Arcgis?

Does anyone know how to calculate **Topographic Ruggedness Index** in Arcgis without access to command line arcinfo workstation? _"The topographic ruggedness index (TRI) is a measurement developed by Riley, et al. (1999) to express the amount of elevation difference between adjacent cells of a digital elevation grid. The process essentially calculates the difference in elevation values from a center cell and the eight cells immediately surrounding it. Then it squares each of the eight elevation difference values to make them all positive and averages the squares. The topographic ruggedness index is then derived by taking the square root of this average, and corresponds to average elevation change between any point on a grid and it’s surrounding area."_ -- from an aml arcscript by Jeffrey Evans


Assign Z value to start & end of PostGIS line

I have a line table in my PostGIS database and a table with invert levels for the start and end of each line. My goal is to create create 3D lines in my table, from my invert data. I know I can use st_makeline to recreate the line with a 3D point at the start and end but I was hoping to be able to run a update just on the Z value for the start and end. Can this be done or is it easier to just recreate the line.


How to calculate the average velocity over the flowpath length?

I’m working on building a GIS based groundwater travel time distribution (TTD) model similar to the one developed by Schilling and Wolter (2007) http://lilt.ilstu.edu/ewpeter/GEO435/Readings/2012/Schilling_Kelly.pdf. The conceptual model of cell TTD is illustrated below (Schilling and Wolter, 2007). ![enter image description here](http://i.stack.imgur.com/NEzIL.jpg) As you know Velocity = -k (dh/dl)/n I have calculated the velocity using raster calculator. I used the permeability values from the soil map as a substitute for hydraulic conductivity, the slope from the DEM as substitute for hydraulic gradient (dh/dl) and porosity (n) one value only from literature. I calculated the distance till the nearest river using Euclidean Distance. After getting the velocity and the distance, I can easily calculate the time using raster calculator. However, it is not straightforward like this. Schilling & Wolter (2007) described how to calculate the time as follows “The time needed for groundwater in each 5-m cell to travel from the cell to the stream network was then determined by averaging all the individual cell velocities over the ﬂowpath length from the cell to the stream” ![enter image description here](http://i.stack.imgur.com/E5sKK.jpg) **So, in order to calculate the time, I have to calculate the average velocities over the flowpath length which I don’t know how to do.** It would be much appreciated if you can help me in this regard. Thanks in advance for your time and help. Regards, Ahmed


postgis linestring segmentation

How can I divide a single postgis linestring with SRID 4326 into segments (preferably an array of linestrings) with no segment longer than a given distance? I've tried st_segmentize(), but it spits out another single linstring.


Relate first point and last point of polyline to point feature(s)

I am working on a small script using ArcMap10/arcpy to generate a upstream- downstream uniqueid for a polyline feature class using point id's that fall on the starting point and ending point of a line. For example, if pt with an id of DEIRS00120 is located at the starting point of a line and if a pt with an id of DEIRS00125 is located at the end point of the line, I would like to assign the line the uniqueid of DEIRS00120-DEIRS00125. My problem is that I need some ideas on how to accomplish this. Here's what I thought would work: 1. Generate a python dictionary using the point id's as a value and the XY location as key: {'123456.765,827393.613737': 'DEIRS00120' } 2: Generate another python dictionary containing the XY Start Point location of the polyline as a key and the objectid as a field: {'123456.765,827393.613737': 1} Do the same for the XY End Point. 3: Call the ids of the points using the start and end location of the line. What flubbed this thinking up is that if line branches, the start points (or end points) are the same at the branch and cannot be used as a python key. Any ideas on how I could accomplish this? Thanks


How to resolve ArcGIS for Desktop Error (SDE has lost its connection with underlying DBMS[ORA-03114:not connected ORACLE])?

![ORACLE Error ](http://i.stack.imgur.com/qcGLM.png) How to resolve this issue when user leaves the system idle for one hour and again trying to connect Database, It encounters the Connection error message and then user should close the ArcGIS and restart it again. Is there any temporary solution to make the DBMS connection active for one user if needed to stay more than one hour idle and work again? Thanks


qgis html annotation - scale dependent rendering?

In the QGIS 2.2 map composer, I have a large map at a certain scale (let's say 1:25000) and an inset map that is an enlargement of part of the main map (let's say 1:12500). When adding html annotations to an area that is shown in both the 1:25k map and by the inset map, is there a way to make the html annotation only show up on the enlarged inset and not on the 1:25000 map? The html annotations in areas that are not part of the inset map would still need to show up on the main 1:25k map. In other words, is there a way to apply scale-dependent-rendering to html annotations at all, and specifically, apply it to some annotations but not others? * * * EDIT: the annotation objects are part of the layer that was active when they were added (even if that layer was not in edit mode), but, they do not seem to respond to 'Lock layers for map item' in the composer. [EDIT2: opening a separate question on this issue, potentially to become a qgis bug report; see that question qgis html annotation does not respect 'Lock layers for map item' in print composer] If they did, then there would be a good workaround for the initial question: just make a separate layer for each 'set' of annotations, and control which sets are visible in which map object using the 'Lock layers for map item' checkbox. Example: your project has two layers, A and B. Each layer has one polygon or other renderable object, so that it's obvious in the composer if that layer is being drawn or not. So, in the composer, add a map object. Initially it should show both layers' polygons (assuming you had them visible in the project when you made the composer). In qgis, make sure either layer is highlighted in the layers palette, but don't make it editable. Add an html annotation. Make that current layer invisible, and notice the annotation object becomes invisible too. Empirically, that's because the annotation is owned by that layer. Make that layer visible again. Go to the composer and you should see the annotation on the map. In the composer, under the Item properties for that map object, in the Main properties area, check the box for 'Lock layers for map item'. According to the docs, with this checked, it 'locks in' the current list of what layers are visible, so that if you then make a layer invisible in qgis, it will not affect what layers are visible in that map object in the composer. Now go to qgis and make that layer invisible. Then look in the composer again, notice the polygon or other 'real' object for that layer is still visible because you locked it, but, the annotation is not visible. Fiddle around with variations on this theme - basically it shows that the annotation objects don't respect the 'Lock layers for map item' setting.


How to georeference a scanned map in ArcMap 9.3?

I want to georeference a scanned map of Sudan (Africa) as .jpg file format,coordinate points are marked on scanned map in 4 degree intervals. I am not familiar to georeferencing in ArcMap. So looking for a detail guide line for georeferencing in ArcMap (using 4 control points) and also looking for a guide line to edit the spatial reference in base map with the suitable PCS information for the AOI. In my previous post in this forum I have mentioned the problem that I am facing at the time of georeferencing. Guide line will help me out. Thanks in advance, Simran.


Simple Spatial Join of Point Feature to Polygon Target Feature Not So Simple (Source Files Included)

I have what should be a simple task to perform: join ~47K census blocks from the PL redistricting files with pop and racial data joined to Chicago Public Schools High School boundaries to get an aggregate total of >18 population. I converted the blocks from polygon to point using centroids to avoid blocks from intersecting two boundary attributes in the target feature and thus being counted twice. However, when I run the spatial join tool with _Completely Contains_ , One_to_One aggregate, I still get an overcount of approximately 10k blocks and 700K people. I know there is a simple problem underlying this, so I'm hoping someone can spot the obvious and help me out here. I've attached a dropbox link here:Direct Dropbox URL of Files to the two files that need to be joined for further clarification. All Districts Merge refers to the target for the join, ...Centroids, the blocks to be joined to the Districts. As an added bonus, if anyone knows of any FOSS redistricting tools--my end goal is to create 12-13 amalgamated districts composed of these boundaries. ![Boundaries, with blocks as point feature underlaid--should have applied a transparency effect.](http://i.stack.imgur.com/JQqmt.png) Edit: I'm looking to summarize the pop total. That attribute is joined to the point file. It's a tabulation of pop over 18. Before spatial join it amounts to approx 2,100,000, which is correct for Chicago city. There should be~47 k blocks too. When joined to the districts file however I get a sum of all districts of 2,800,000 and a join count for all districts of 57k. This leads me to think that when joining blocks to districts I'm getting a double count of blocks that might slightly overlap two districts. Even after setting join to completely contains parameters I had the same overcount. Can you do a join where each feature is counted once and assigned to only one district?


Convert timeseries stack of GTiff raster to single NetCDF

Moving from gdal-dev mailing list: On Mon, Sep 2, 2013 at 7:09 PM, David Shean wrote: Hi list, I'm trying to package a timeseries of GTiff rasters with identical projection/extent/resolution as a single NetCDF file for distribution. I've spent the past hour consulting the online doc and playing with gdal_translate, gdalbuildvrt and gdalwarp without any success. Is there an easy way to do this using existing gdal command line utilities? I figured I'd ask before resorting to a custom solution using the NetCDF Python API. Thanks. -David On Tue, Sep 3, 2013 at 10:15 AM, Etienne Tourigny wrote: what you want is probably outside the scope of gdal. It would require some clever metadata management so that gdal_translate puts them in a single file... I would advise you convert them all to netcdf using gdal_translate and then use python-netcdf4 (not the one from numpy/scipy) to stack them in the temporal dimension. On Tue, Sep 3, 2013, at 7:55 AM, "Signell, Richard" wrote: David, If you post your question on the GIS stackexchange group http://gis.stackexchange.com/ I will provide an example code that should be helpful. -Rich ==================== Update 9/3/13 17:04 PDT Here is gdalinfo output for one of my input datasets:               gdalinfo 20120901T2024_align_x+22.19_y+3.68_z+14.97_warp.tif          Driver: GTiff/GeoTIFF     Files: 20120901T2024_align_x+22.19_y+3.68_z+14.97_warp.tif     Size is 10666, 13387     Coordinate System is:     PROJCS["unnamed",         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"]],         PROJECTION["Polar_Stereographic"],         PARAMETER["latitude_of_origin",70],         PARAMETER["central_meridian",-45],         PARAMETER["scale_factor",1],         PARAMETER["false_easting",0],         PARAMETER["false_northing",0],         UNIT["metre",1,             AUTHORITY["EPSG","9001"]]]     Origin = (-211346.063781524338992,-2245136.291794800199568)     Pixel Size = (5.000000000000000,-5.000000000000000)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       COMPRESSION=LZW       INTERLEAVE=BAND     Corner Coordinates:     Upper Left  ( -211346.064,-2245136.292) ( 50d22'39.70"W, 69d23'55.59"N)     Lower Left  ( -211346.064,-2312071.292) ( 50d13'22.38"W, 68d48'10.75"N)     Upper Right ( -158016.064,-2245136.292) ( 49d 1'33.33"W, 69d26'16.42"N)     Lower Right ( -158016.064,-2312071.292) ( 48d54'35.06"W, 68d50'27.28"N)     Center      ( -184681.064,-2278603.792) ( 49d38' 1.32"W, 69d 7'17.04"N)     Band 1 Block=256x256 Type=Float32, ColorInterp=Gray       NoData Value=-32767      Following up on Luke's suggested approach. The vrt generation works fine:               gdalbuildvrt -separate newtest.vrt *warp.tif          <VRTDataset rasterXSize="10666" rasterYSize="13387">       <SRS>PROJCS["unnamed",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"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]</SRS>       <GeoTransform> -2.1134606378152434e+05,  5.0000000000000000e+00,  0.0000000000000000e+00, -2.2451362917948002e+06,  0.0000000000000000e+00, -5.0000000000000000e+00</GeoTransform>       <VRTRasterBand dataType="Float32" band="1">         <NoDataValue>-3.27670000000000E+04</NoDataValue>         <ComplexSource>           <SourceFilename relativeToVRT="1">20110619T2024_align_x+15.51_y+1.15_z+12.10_warp.tif</SourceFilename>           <SourceBand>1</SourceBand>           <SourceProperties RasterXSize="10666" RasterYSize="13387" DataType="Float32" BlockXSize="256" BlockYSize="256" />           <SrcRect xOff="0" yOff="0" xSize="10666" ySize="13387" />           <DstRect xOff="0" yOff="0" xSize="10666" ySize="13387" />           <NODATA>-32767</NODATA>         </ComplexSource>       </VRTRasterBand>       <VRTRasterBand dataType="Float32" band="2">         <NoDataValue>-3.27670000000000E+04</NoDataValue>         <ComplexSource>           <SourceFilename relativeToVRT="1">20110802T2024_align_x+16.33_y+2.14_z+12.02_warp.tif</SourceFilename>           <SourceBand>1</SourceBand>           <SourceProperties RasterXSize="10666" RasterYSize="13387" DataType="Float32" BlockXSize="256" BlockYSize="256" />           <SrcRect xOff="0" yOff="0" xSize="10666" ySize="13387" />           <DstRect xOff="0" yOff="0" xSize="10666" ySize="13387" />           <NODATA>-32767</NODATA>         </ComplexSource>       </VRTRasterBand>     ...      But when I attempt to translate to nc, I get the following error:               gdal_translate -of netcdf newtest.vrt newtest.nc          Input file size is 10666, 13387     Warning 1: Variable has 0 dimension(s) - not supported.     0...10...20...30...40...50ERROR 1: netcdf error #-62 : NetCDF: One or more variable sizes violate format constraints .     at (netcdfdataset.cpp,SetDefineMode,1574)          ERROR 1: netcdf error #-39 : NetCDF: Operation not allowed in define mode .     at (netcdfdataset.cpp,IWriteBlock,1435)          ERROR 1: netCDF scanline write failed: NetCDF: Operation not allowed in define mode     ERROR 1: An error occured while writing a dirty block     ...ERROR 1: netcdf error #-39 : NetCDF: Operation not allowed in define mode .     at (netcdfdataset.cpp,IWriteBlock,1435)          ERROR 1: netCDF scanline write failed: NetCDF: Operation not allowed in define mode     ERROR 1: netcdf error #-62 : NetCDF: One or more variable sizes violate format constraints .     at (netcdfdataset.cpp,~netCDFDataset,1548)      So upon closer inspection, it appears that gdal is unhappy with the polar stereographic projection I'm using (EPSG:3413). See lines 1570-1582 of netcdfdataset.cpp: https://code.vpac.org/gitorious/gdal-netcdf-testing/gdal-netcdf- driver/blobs/8fa3582669969ad4d55e461f5846b3ed33727f63/gdal/frmts/netcdf/netcdfdataset.cpp My projection has a latitude_of_origin specified but no standard parallels as expected by the netcdf driver.


How to get access to layers without geometry?

I have a QGIS project with some layers without geometry. I develop a QGIS plugin. I want to get all my layers by:               iface.mapCanvas().layers()      but I get only layers with geometry. How I can get layers without geometry? My no-geometry layers are just tables in a database. I could connect to the database in order to access data but I would like to know whether it is possible to access them as QGIS layers (in analogous way to QgsVectorLayers).


Flatten GIS data to a schematic

I want to take a network of roads and lanes and reduce them to a schematic that shows their relationships but not their geographic shape. A similar concept has been used for the London Underground map where the distances between stations are not too scale, it simply shows their relationships by vertices. In my ideal world the roads would snap to a horizontal/vertical grid and the distances between them normalised. I am a Postgis/QuantumGIS user and want to know which tools or capabilities I should use to (for example) create a grid from Openstreetmap way data? I also have access to ArcGis but no experience in using it.


Is there tutorial available for PostGIS setup in ArcSDE 10.1 geodatabase on Linux?

Is there any tutorial for Set up PostGIS in an ArcSDE 10.1 geodatabase on Linux? There is one in tutorial arcgis 9 for ArcGIS version 9, but I couldn't find any for ArcGIS 10.1.


How to emulate the modulo operator in a style rule?

I have SHP layer loaded in QGIS. It consists of lines with attribute column `z`, containing integer value associated with line elevation in meters. Lines are drawn at 10 meter increment, and I want to apply style to lines on 50 meter increment. For that purpose in "Style" tab in "Layer Properties" dialog, I use "rule based" style and want to define above described rule. From available operators I can see only one possibility with this filter expression: `z/50 - toint(z/50) = 0` However it returns true for all lines, while I expected just those with 50 meter increment. There is also "Expression builder" dialog, but it does not return results from typed expression, for some reason, and I'm not able to determine what is the problem? Any ideas?


Why is result from gp tool not being created on JavaScript API?

Ok I am really confused. I can see the output of the result from geoprocessing tool. But why am I not able to add it to the map. As you can see the result returns all the attribute values. This is my application and you will see the job id in the console. If you are not able to view the link I have added for result change the job id with the new one (in the console) that you ran and you will see the results. What could be the reason? I am using ArcServer 10.


Can I publish a Bing map from OpenLayer Plugin in my thesis?

I have QuantumGIS 1.8.0. I made a map that I'd like to use in my thesis. I made it using Bing road layer map. I found it in open layers plugin. Do I have the rights to publish the map as a part of my thesis?


How to do a simple find and replace in QGIS field calculator?

I'm trying to replace selected string values in an attribute table, eg. "Text1" for "Text2" (QGIS 1.8.0), patriculary for those rows with NULL values. I have been trying to use the replace expression (and any other that I have found) with no luck. Are there any wildcard characters that I may be able to use in future?


Are ESRI Shapefiles and KML files two different ways of representing data?

I have a really basic newbie question. I have following data with me:   * Esri Shapefiles (.shp, .shx, .dbf, .prj, .sbn and .sbx)   * KML/KMZ files Are Esri Shapefiles and KML files two different ways of representing data? I am suspecting that the data provider has given me the same data in two formats: Shapefiles and KML files. Is there a way I can verify that both of them are representing same data and that there is no loss of information when using one over the other?


What resampling technique should be used when projecting aerial photos?

I'm doing some time-intensive projecting of aerial photos, and I'm curious - what resampling technique is best to use on aerial photos? In ArcMap, my options are NEAREST, BILINEAR, CUBIC, and MAJORITY. Nearest Neighbor and Majority are recommended for categorical data, whereas Cubic Convolution and Bilinear Interpolation are for continuous data. **I'm curious to know if there's any commonly-used algorithm for projecting aerial photos**. I've just finished projecting one image using Nearest Neighbor and it seems to look good, but an aerial photo is not categorical data, so I'm going to try Bilinear next. **EDIT**   I wasn't thinking of aerial photos as the same kind of continuous data as DEMs or precipitation data, but whuber pointed out that they are continuous and should be handled as such. Thanks again.


Error getting ESRI Shapefile driver OGR in C++

I am unable to create an OGR Layer using the C++ API. I have followed the documentation at this link exactly http://www.gdal.org/ogr_apitut.html I get an error trying to get the shapefile driver. Any suggestions? const char *driverName = "ESRI Shapefile"; GDALDriver *pDriver;               GDALAllRegister();          pDriver = GetGDALDriverManager()->GetDriverByName(driverName);     if (pDriver == NULL)     {         qDebug()<<"Error loading driver"; // this error happens     }


landsat 7 images

i want to work with landsat 7 images for land cover and NDVI evaluation. i find strips in landsat images, and i don't know how to remote it. i have learn methods of gapfill but i don't know how to work with. i used also Erdas 2011 (focal analysis)for the processing but i see no result. i have also a sort of gap mask download with my landsat 7 images but i don't know how to use it. please i need your help!


Import of NAS-data, (norm-based data exchange interface)

Is there any possibility to import nas-data in QGIS. NAS (norm-based data exchange interface) is a XML-based format. German cadastral-data is only available in this format.


How to set lower limit to interpolation?

I have rainfall data that I want to interpolate using spline. I have done Spline Interpolation, only that the values produce negative predicted values which is basically wrong. There should be no negative rainfall value. How can I set lower limit to zero? Or set a true value limit? If you can suggest other method, I would gladly appreciate. I'm using ArcGIS 10.0. Thanks.


Exporting data from Oracle to Esri File Geodatabase grid size error

My specs: ArcInfo 10.1, Oracle 11g I have a line dataset which is sat in Oracle 11g. I can read/query/symbolise this in ArcDesktop without any problems. I now want to export a selection into a file geodatabsae, but I keep getting this error: ![](http://i.stack.imgur.com/Z1Mti.jpg) The name it gives in the error (U1BLine) is the name I am trying to give my exported dataset. I have tried exporting only the selection and the whole dataset. I get the same error with both. I have also tried to export it to a shapefile. This works. I know I could export to shapefile and then move that into a geodatabsae, but I'd like to be able to do it in a single step. Other datasets from the same Oracle database have exported without a problem. Both the dataset and the dataframe are set to British National Grid. Anybody know how to fix this error?


how to list table rows of a layer in a listbox?

I'm new in using c# and Arcengine . i would like to list table rows of a feature in a Listbox like select by attribute in ArcGIS such that when i click a button, table rows list in a listbox . i use two combobox to select layers and fields . how can i write this code in C# using Arc engine? i don't know how do i write loop for this purpose. i only know i want to run the application in ArcGIS then i use Ihookhelper and Itable.


Moved labels in QGIS 1.8 disappear on saving vector file

From other posts I worked out how to activate the "move label" icon and was successfully able to move a number of labels into the positions I wanted. However when I untoggle the "edit" function for the vector file concerned the labels that I have just moved all disappear - leaving me with only the unmoved labels. I cannot find anyway to bring them back. How do I stop the moved labels from disappearing?


Create a Minimum Spanning Tree based on a street network (ArcView)

I hope you can help me with my network analyse problem (ArcGIS 10.0 SP2 - ArcView License) Background: I try to create a network of fiber optic cables to specific points along a street network. Here is what I want to do: I want to create a Minimum Spanning Tree based on a street network to give me the shortest path between a couple of fiber optic access points. The MST should start at a fiber optic distribution point and "span out" to the access points. What I tried so far: I tried to manage it with the Network Analyst and the 'Closest Facility' analysis. The problem is that it handles each connection between a distribution point and a access point as a independent solution (end up in a single route) - so its not the MST. I am not sure if something like that is possible with a geometric network (with sinks and sources) and a flow direction. Thank you all for your support in advance, Daniel


Right raster zonal statistics for NDVI at county scale?

I am currently doing a modeling project at county scale in which I have disease rate as dependent variable and environment variables (such as temperature, NDVI and evapo-transpiration) as the independent variables. In order to tell how good my model is, I need to do regression analysis for which I need a particular value of each variable at county level. For this purpose I used zonal statistics tool in ArcGIS and took the mean value of NDVI, temperature and evapo-transpiration.   1. As a county scale is too coarse, so taking 'Mean' is the right statistics or not?   2. Also in case of counties having a lot of cloud cover, zonal statistics only considers available pixels (may be too few) to compute. What is the right way to deal with such an issue? I will really appreciate your solutions and if you have any links/research papers to support this.


How do I group layers in Mapnik?

I might be thinking about this all wrong, but right now I'm using Mapnik's OGC Server, and using that WMS with OpenLayers. How would I group multiple layers (say country, water, state borders) into one layer, so that all of those combined show up as a Base Layer in OpenLayers? I'm trying to do this through the Python API.


ArcGIS: Can I modify an existing edit tool to make a new tool?

I want to create versions of the edit tools that will add a parallel, offset segment each time I add a segment regularly. Is it possible to put a wrapper around the existing tools? Or otherwise add to their functionality? e.g. Using the sketch tool I click twice on the screen. Code that I write would add a perpendicular segment on the front of a specified length and a parallel segment. I add another segment and it adds another parallel segment. I add a curve and it adds a parallel curve. Do I have to make the tools from scratch or can I use the existing ones to add the segments and just tack on code to add the extra segments? Recreating the sketch tool wouldn't be so bad but the other tools are more complicated.


Problems merging DEMs or other raster datasets? Clipping Raster dataset to vector line?

I have two DEMs that I am going create a hillshade from, and ultimately want one hillshade clipped to a county boundary. I am running into a couple problems, though. When I try to merge the two hillshades created from the DEMs, ArcMap crashes. When I try to merge the two DEMs, ArcMap crashes. I am assuming that if I managed to get the DEMs merged, the hillshade created would cause ArcMap to crash, too. I am using the PLTS Merge Raster Datasets tool, because for some reason the Spatial Analyst tool Raster Calculator does not appear as selectable. Once I am able to do this and get a hillshade of the two DEMs, is there a specific function for using the county line (which is a vector fc) to clip the raster data set to?


Improve Export PDF export speed

I have an ArcObjects vba code that exports a series of group layers listed in a table (also listed in the table of contents) to pdf. For each group layer/export the legend also changes to represnet the specific group layer that is exporting out. When I added the legend refresh portion of the code each group layer export took about 10X slower to export (before it took about 3-4 sec to export each group layer, now it takes well over 40 sec). I'm curious if anybody has any suggestions on how I may change the code around to increase the speed again. Here is the code. Thank you               'Export to pdfs     Dim pFSO2 As FileSystemObject     Dim pNewFolderc As folder          Set pFSO2 = New FileSystemObject          If (pFSO2.FolderExists("C:\TMP") = False) Then         Set pNewFolderc = pFSO2.CreateFolder("C:\TMP")     Else         Set pNewFolderc = pFSO2.GetFolder("C:\TMP")     End If          Dim pAV As IActiveView     Dim pPageLayout As IPageLayout          Dim pEnum As IEnumLayer     Dim pLayer As ILayer     Dim pGLayer As IGroupLayer          Dim pFLayer As IFeatureLayer     Dim pFClass As IFeatureClass          Dim pGxLayer As IGxLayer, pGxNewLayer As IGxLayer, pGxFile As IGxFile     Dim pGrpLayer As IGroupLayer          Dim pStdTableColl As IStandaloneTableCollection     Dim pStdTable As IStandaloneTable     Dim pTable As ITable     Dim pTableSort As ITableSort     Dim pTblSortLyrs As ITableSort     Dim pRow As IRow     Dim pRowLyrs As IRow     Dim pDataStat As IDataStatistics     Dim pCursor As ICursor     Dim pLyrCursor As ICursor     Dim pQf As IQueryFilter          Dim lngFldLayerName As Long     Dim lngFldPath As Long     Dim lngFldGroupOrder As Long     Dim lngFldGroupName As Long     Dim lngFldGroupTOCOrder As Long     Dim lngFldGroupVis As Long     Dim i As Integer          Dim strLayerName As String          Dim strPath As String     Dim lngGroupOrder As Long     Dim strGroupName As String     Dim lngGroupTOCOrder As Long     Dim blnGroupVis As Boolean          Dim pEnumVar As IEnumVariantSimple, value As Variant          Dim pODGSLyr As ODGSLayer          Dim pGrphcon As IGraphicsContainer     Dim pElem As IElement     Dim pTxtElem As ITextElement          strOMSIUAComplaintNo = txtfoldername.Text          If cboAPPNO.Text = "" Or txtfoldername.Text = "" Then      MsgBox "Please select APPNO well feature"      Exit Sub     Else           Dim intresponse2 As Integer           intresponse2 = MsgBox("Export pdfs?", vbYesNo)        If intresponse2 = vbNo Then         UserForm1.Hide         cboAPPNO.Text = ""         txtfoldername = ""         Exit Sub        ElseIf intresponse2 = vbYes Then         UserForm1.Caption = "Exporting, please wait..."          'Goto Page layout     Set pPageLayout = m_pMxDoc.PageLayout     Set m_pMxDoc.ActiveView = pPageLayout          'Find Basemap Group and DRG layers and turn both of them on     Set m_pMap = m_pMxDoc.FocusMap     Set pEnum = m_pMap.Layers          Set pLayer = pEnum.Next          Do Until pLayer Is Nothing         If pLayer.Name = "Basemaps" Then pLayer.Visible = True         If pLayer.Name Like "DRG*" Then pLayer.Visible = True         Set pLayer = pEnum.Next     Loop          'Turn off all the group layers     Set pStdTableColl = m_pMap     For i = 0 To pStdTableColl.StandaloneTableCount - 1         Set pStdTable = pStdTableColl.StandaloneTable(i)         If pStdTable.Name = "ODGSLAYERS" Then             Set pTable = pStdTable             lngFldLayerName = pTable.FindField("LAYERNAME")             lngFldPath = pTable.FindField("PATH")             lngFldGroupOrder = pTable.FindField("GROUPORDER")             lngFldGroupName = pTable.FindField("GROUPNAME")             lngFldGroupTOCOrder = pTable.FindField("GROUPTOCORDER")             lngFldGroupVis = pTable.FindField("GROUPVISABLE")         End If     Next i          If pStdTable Is Nothing Then         Exit Sub     End If          'Sort the Table     Set pTableSort = New TableSort     With pTableSort         .Fields = "GROUPTOCORDER, GROUPNAME"         .Ascending("GROUPTOCORDER") = True         .Ascending("GROUPNAME") = True         Set .QueryFilter = Nothing         Set .Table = pTable     End With     pTableSort.Sort Nothing          Set pCursor = pTableSort.Rows          'Find Unique Values in the Table     Set pDataStat = New DataStatistics     pDataStat.field = "GROUPNAME"     Set pDataStat.Cursor = pCursor          Set pEnumVar = pDataStat.UniqueValues     value = pEnumVar.Next          Do Until IsEmpty(value)         pEnum.Reset         Set pLayer = pEnum.Next         Do Until pLayer Is Nothing             If pLayer.Name = value Then pLayer.Visible = False             Set pLayer = pEnum.Next         Loop         strLayerName = value         value = pEnumVar.Next     Loop          'Now cycle through the group layers, turn them on one by one and export the PDF file     'First find the Title on the map          Set pGrphcon = pPageLayout     pGrphcon.Reset     Set pElem = pGrphcon.Next          Do Until pElem Is Nothing         If TypeOf pElem Is ITextElement Then             Set pTxtElem = pElem             If pTxtElem.Text = "OMSIUA Layers" Then Exit Do         End If         Set pElem = pGrphcon.Next     Loop          Set pStdTableColl = m_pMap     For i = 0 To pStdTableColl.StandaloneTableCount - 1         Set pStdTable = pStdTableColl.StandaloneTable(i)         If pStdTable.Name = "ODGSLAYERS" Then             Set pTable = pStdTable             lngFldLayerName = pTable.FindField("LAYERNAME")             lngFldPath = pTable.FindField("PATH")             lngFldGroupOrder = pTable.FindField("GROUPORDER")             lngFldGroupName = pTable.FindField("GROUPNAME")             lngFldGroupTOCOrder = pTable.FindField("GROUPTOCORDER")             lngFldGroupVis = pTable.FindField("GROUPVISABLE")         End If     Next i          If pStdTable Is Nothing Then         Exit Sub     End If          'Sort the Table     Set pTableSort = New TableSort     With pTableSort         .Fields = "GROUPTOCORDER, GROUPNAME"         .Ascending("GROUPTOCORDER") = True         .Ascending("GROUPNAME") = True         Set .QueryFilter = Nothing         Set .Table = pTable     End With          pTableSort.Sort Nothing          Set pCursor = pTableSort.Rows          'Find Unique Values in the Table     Set pDataStat = New DataStatistics     pDataStat.field = "GROUPNAME"     Set pDataStat.Cursor = pCursor     Set pEnumVar = pDataStat.UniqueValues          value = pEnumVar.Next     Do Until IsEmpty(value)         pEnum.Reset         Set pLayer = pEnum.Next         Do Until pLayer Is Nothing             If pLayer.Name = value Then                 pLayer.Visible = True                 strLayerName = value                 pTxtElem.Text = strLayerName          ''''''''''''Cal to ExportActiveView, Module''''''''''''''''                 Call ExportActiveView.ExportActiveView(strOMSIUAComplaintNo & "_" & _     strLayerName)          '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''                      pLayer.Visible = False             End If                  'Refresh legend  '<<<<<<<<<<<<< Refresh legend portion             Dim pMxDoc2 As IMxDocument             Dim pPageLayout2 As IPageLayout             Dim pGC2 As IGraphicsContainer             Dim pElem2 As IElement             Dim pMSF2 As IMapSurroundFrame             Dim pMS2 As IMapSurround                  Set pMxDoc2 = ThisDocument             Set pPageLayout2 = pMxDoc2.PageLayout             Set pGC2 = pPageLayout2             pGC2.Reset                  Set pElem2 = pGC2.Next                 Do Until pElem2 Is Nothing                 If TypeOf pElem2 Is IMapSurroundFrame Then                     Set pMSF2 = pElem2                     Set pMS2 = pMSF2.MapSurround                 pMS2.Refresh                 pMxDoc2.ActiveView.Refresh                      End If                 Set pElem2 = pGC2.Next                      Loop                  Set pLayer = pEnum.Next              Loop         value = pEnumVar.Next     Loop          pTxtElem.Text = "OMSIUA Layers"          Set m_pMxDoc.ActiveView = m_pMap          m_pMxDoc.UpdateContents     m_pMxDoc.ActiveView.Refresh          End If     End If


Can I use google app engine to work as a WMS or some sort of geoserver that I can use to connect openlayers?

Has anybody ever heard or tried doing anything like this?


Kriging with Raster Data in ArcGIS

I have MODIS satellite imagery that depicts a range of surface temperatures. However, many of the cells are missing values. I think I need to perform Kriging in order to obtain an average value for the empty cells based on the values of the surrounding cells. I'm not sure how to do this because I'm working with raster data.


How to run "sdetable register" command in SQL Server?

I was planning to run "sdetable register" command to register a particular field as OID for an non-spatial table already created in a SDE database. I am with SQL Server 2008 R2. I tried to run the command `USE [{database}] GO sdetable -o register -t {table} -c {column} -C {database} -u {user} -p {password}` from on a query window in SQL Server Management Studio. But it logged "Incorrect syntax near 'o'." error. Is there anything wrong with what I was doing?


ogr2ogr update failing to update shapefile int PostGIS

I have a bunch of shapefiles that I am looping in with a bash script to load and update files but the ogr2ogr fails. I am running gdal 1.92 on ubuntu 14.04.               for file in `ls *.shp`;do ogr2ogr -progress -append -update -skipfailures -a_srs "EPSG:4326" -nlt MULTIPOLYGON -f "PostgreSQL" PG:"dbname=data_test" $file -sql "SELECT gid,name,id from ${file%.*}" -lco SCHEMA=test;done      > ERROR 1: Layer test.boundary already exists, CreateLayer failed.Use the > layer creation option OVERWRITE=YES to replace it.


How can I display this polygon in Google Maps, properly

_NOTE: this question is sorta like a follow-on question tothis original GIS Question I asked. In that question, the main suggestion was that I was trying to show two polys. Now, I'm asking about a SINGLE poly._ I have the following `GEOGRPAHY` of Los Angeles in my Sql Server 2008 :- ![enter image description here](http://i.stack.imgur.com/xXp2r.png) Sql script to repo it (or in RAW sql format) It's bascially ..               -- Shape of Los Angeles.          DECLARE @WKT VARCHAR(MAX) = 'POLYGON ((-118.66815700000011 34.181235000000029, ... ))     SELECT GEOGRAPHY::STGeomFromText(@WKT, 4326)      Now when I just try and render this out, It now looks like this (NOTE: this is different, but still not correct .. compared to my previous GIS Question). ![enter image description here](http://i.stack.imgur.com/BczVm.png) Now, in the previous question people were suggesting that the previous data was a `MULTIPOLYGON` so there was some bad stuff I must have been doing, trying to render out holes in polys. This time, this is a single polygon. So i'm assuming the hole theory still doesn't work. Now, I understand that by looking at this image, there's a number of holes ... but the `Well Known Text` data which Sql Server gives me is a `POLYGON` which to me means .. one single shape. So i'm not sure how I can fix this :( This is why i'm asking the a similar question to my previous one. Can anyone help? Can they see the data I've posted and see what happens in other systems? (I don't have any other software besides Sql Server 2008). Maybe I need to extract all my data from Sql Server 2008 .. and clean it up (whatever that means) through another system. For example. If Sql Server is saying that the shape of Los Angeles is a single Polygon .. but when cleaned up .. it's actually 7 Polygons .. and then those shapes then get rendered correctly .. then we have a solution! Any suggestions? Can -anyone- render this shape onto a Google map?


First attempt using ArcObjects: ESRI's Add-ins example unclear

I've come to realize that scripting ArcGIS 10.0 with Python imposes too many limitations for my goals with ArcGIS, so I've decided to bite the bullet and delve into ArcObjects. Apparently, using ArcObjects in ArcGIS 10.0 has gotten somewhat easier because there is a new framework that avoids having to deal with COM objects. This seems good, but also means less examples for those starting at 10.0 The only detailed ESRI example of beginning with ArcObjects is a walkthrough of how to build an add-in. The instructions get somewhat vague in step 2a) and 3 of the section **Adding ZoomToLayer functionality to the custom button** : **< 2 >** To implement ZoomToLayer functionality in your button, use the ArcGIS Snippet Finder tool.   * **a.** Right-click the Visual Studio code editor window at the desired insertion point.    * b, c, d  **< 3 >** Invoke the ZoomToLayer method upon OnClick() method implementation. This is what my ZoomToLayerButton.cs file looks like before step 2:               using System;     using System.Collections.Generic;     using System.Text;     using System.IO;          namespace CustomUIElements     {         public class ZoomToLayerButton : ESRI.ArcGIS.Desktop.AddIns.Button         {             public ZoomToLayerButton()             {                  }                       protected override void OnClick()             {                 ArcMap.Application.CurrentTool = null;             }             protected override void OnUpdate()             {                 Enabled = ArcMap.Application != null;             }         }          }      and here is the snippet I grabbed:                #region"Zoom to Active Layer in TOC"             // ArcGIS Snippet Title:             // Zoom to Active Layer in TOC             //              // Long Description:             // Zooms to the selected layer in the Table of Contents (TOC) associated with the active view.             //              // Add the following references to the project:             // ESRI.ArcGIS.ArcMapUI             // ESRI.ArcGIS.Carto             // ESRI.ArcGIS.Geometry             //              // Intended ArcGIS Products for this snippet:             // ArcGIS Desktop (ArcEditor, ArcInfo, ArcView)             //              // Applicable ArcGIS Product Versions:             // 9.2             // 9.3             // 9.3.1             // 10.0             //              // Required ArcGIS Extensions:             // (NONE)             //              // Notes:             // This snippet is intended to be inserted at the base level of a Class.             // It is not intended to be nested within an existing Method.             //                   ///<summary>Zooms to the selected layer in the TOC associated with the active view.</summary>             ///              ///<param name="mxDocument">An IMxDocument interface</param>             ///               ///<remarks></remarks>             public void ZoomToActiveLayerInTOC(ESRI.ArcGIS.ArcMapUI.IMxDocument mxDocument)             {                 if (mxDocument == null)                 {                     return;                 }                 ESRI.ArcGIS.Carto.IActiveView activeView = mxDocument.ActiveView;                      // Get the TOC                 ESRI.ArcGIS.ArcMapUI.IContentsView IContentsView = mxDocument.CurrentContentsView;                      // Get the selected layer                 System.Object selectedItem = IContentsView.SelectedItem;                 if (!(selectedItem is ESRI.ArcGIS.Carto.ILayer))                 {                     return;                 }                 ESRI.ArcGIS.Carto.ILayer layer = selectedItem as ESRI.ArcGIS.Carto.ILayer;                           // Zoom to the extent of the layer and refresh the map                 activeView.Extent = layer.AreaOfInterest;                 activeView.Refresh();             }             #endregion      Regarding step 2.a)"Right-click the Visual Studio code editor window at the desired insertion point" where I should insert the snippet? Reading the comments in the snippet, I assume it should go after the first method:               public ZoomToLayerButton()     {          }               //here??          protected override void OnClick()     {         ArcMap.Application.CurrentTool = null;     }      Also, the comments in the snippet also say I should:               // Add the following references to the project:     // ESRI.ArcGIS.ArcMapUI     // ESRI.ArcGIS.Carto     // ESRI.ArcGIS.Geometry       Where do I add these? At the top of the ZoomTo LayerButton.cs file or my Config.Designer.cs file? (I have tried both of these locations and I get the same error: 'Carto' does not exist in the namespace ESRI.ArcGIS) Regarding step 3, "Invoke the ZoomToLayer method upon OnClick() method implementation." I assume that the code shown later on after those instructions is what invokes the method:               protected override void OnClick()     {         ZoomToActiveLayerInTOC(ArcMap.Application.Document as IMxDocument);     }      I assume this also means I should erase the line that was in there before?               ArcMap.Application.CurrentTool = null;      I have not yet gone on to the next step of the walkthrough - **Installing the custom button and tool** - since I have not got the code so far to build. I knew I was in for a steep learning curve with ArcObjects, and this intro example certainly confirms this! Hopefully, with these clarifications, I will have my first ArcObjects code running soon enough.


Does an openlayers vector layer work across browsers?

I was under the impression that it was. Here is my example:               <html lang='en'>     <head>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <title>GeoRSS</title>     <script src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script>     <script src="http://openlayers.org/api/OpenLayers.js"></script>     <script src="google-v3.js"></script>          <script type="text/javascript">          var map;          function init() {         var restrictedExtent = new OpenLayers.Bounds(-180, -90, 180, 90);              map = new OpenLayers.Map("map_element"         );         map.addControl(new OpenLayers.Control.MousePosition());         map.addControl(new OpenLayers.Control.LayerSwitcher());              var layer = new OpenLayers.Layer.Google("Google", {"sphericalMercator": true});              var usgs = new OpenLayers.Layer.Vector("Earthquakes", {             projection: new OpenLayers.Projection("EPSG:4326"),             strategies: [new OpenLayers.Strategy.Fixed()],             protocol: new OpenLayers.Protocol.HTTP({                 url: "http://earthquake.usgs.gov/earthquakes/catalogs/7day-M2.5.xml",                 format: new OpenLayers.Format.GeoRSS()             })         });         map.addLayers([layer, usgs]);         map.setCenter(new OpenLayers.LonLat(-11682133.90525, 4676768.13795), 4);     }          </script>          </head>     <body onload="init()">         <div id="map_element">         </div>     </body>     </html>      For me this is only working on IE. I would like to keep this xml file on the USGS server and call it dynamically rather than save it locally. Is there anyway to get this to work, on other browsers (besides IE) without using a proxy script? Thanks!


Why is an XML file with the same name being created when I save an MXD?

In the last couple of days, everytime I save an mxd file an xml file is created with an identical file name (obviously with .xml rather than .mxd at the end) in the same folder that I've saved the mxd into. Please see below for my test save to see an example, apologies for the really appalling resolution. Anyway I don't know whether there is a simply an option I've selected without realising, however I've checked all the options I can within ArcMap and can't seem to find a solution. Anyway it's very annoying as I have to trawl through folders of ArcMap documents to find all these unnecessary mxds. Also if I delete them it seems to have no effect on the functionality of the mxd file. Any help is much appreciated. Edit: I forgot to mention I'm using ArcGIS 10 on an ArcView license mostly. However, it also occurs if I am using an ArcInfo license. Another edit: I opened the xml file in notepad and it contained the following text:                 <FrameworkConfig TagName="FrameworkConfig" Name="FrameworkConfig"      <AliasName="FrameworkConfig">           <DefaultConfig>             <TemplateView TagName="TemplateView">               <ApLayers TagName="ApLayers" />             </TemplateView>             <ProgParams>               <RasterLocation />               <VectorLocation />               <SchemaDatabaseLocation />               <DllPath>C:\WINDOWS\assembly\GAC_MSIL\ESRI.APWR.ApFramework\1.0.0.0__0e46c6306d55f57a\</DllPath>               <HelpFileName />               <Debug>31</Debug>               <LoadedDateTime>13/12/2011 8:17:07 AM</LoadedDateTime>             </ProgParams>           </DefaultConfig>         </FrameworkConfig>      ![enter image description here](http://i.stack.imgur.com/RhRjU.png)


Spatial Analyst Cell Statistics tool in Python gives inaccurate results

My question is similar to the Cell Statistics gives Wrong Answer question. In Python, I'm using the MINIMUM parameter to execute the cell statistics tool on several reclassified rasters ('0's and '1's) and I'm not getting accurate results. However, when I use the tool in ArcMap I get what I'm looking for. It seems as if it's only using two rasters (don't know which ones). Here's the code I'm using.               arcpy.env.workspace = ("F:\\hdf\\hdf_test\\reclass")     outh10v03 = ("F:\\hdf\\hdf_test\\h10v03\\")          h10v03 = arcpy.ListRasters("*2000*h10v03*", "tif")          for reclass in h10v03:         print reclass          arcpy.gp.CellStatistics_sa(h10v03, outh10v03 + "h10v03_2000" + ".tif", "MINIMUM", "DATA")      Any ideas as to why it's not using all rasters (I believe that's the case)?


CartoD3 chart not displaying - CartoDB

I have tornados table with columns damage,date,month . I used the following code to create a barchart . > >           <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >              >              >             <meta http-equiv="content-type" content="text/html; > charset=utf-8" /> >             <title>D3 Visualization API Sample</title> >              >             script type="text/javascript" > src="libs/underscore-1.1.6.js"></script> >              >              >              >              >             <link href='css/cartodb.d3.default.css' rel='stylesheet' > type='text/css' /> >              >

                               But When I run it, the chart is not displayed, instead I am getting the below as result. ![enter image description here](http://i.stack.imgur.com/yysEW.png) Please let me know where I went wrong.


Problem with OpenLayers.Size and OpenLayers.Bound

When I change OpenLayers.Bound values, the view changes irrespective of size I had defined. In addition to this, I also would like to know why a layer disappears when the OpenLayers.Size is below (50,50). Can anyone clarify me regarding this?


How do you get access to a Network Analyst layer item in ArcPy?

I have a Python script that I'm working on. I have created a Closest Facility layer (in memory). I add facilities. I add incidents. I perform the Solve. These all complete. The only problem is, there doesn't appear to be a way to access any of the results. I have gotten a describe object off the Network Analysis layer. I got the children of the network analysis layer. I can get the name of each child, but that is the extent. Each child is supposed to be a feature layer, but no layer operations work on any of them: "Error in executing tool". I can get the dataset object for each layer. Each dataset object calls itself a Feature Class. I cannot get any Feature Class operations to work on these "Feature Classes" either. I get the same stupid error. The documentation on implementing Network Analysis work in Python is woefully incomplete. How can I gain access to the results of a solve? I just need something I can feed into the arcpy.GetCount tool, nothing else.