title: why I can not run hibernate-spatial (in eclipse)

text: I have a problem with Hibernate Spatial.   I followed the tutorial 4.x, and I created my project using maven. after correcting some minor errors in pom.xml and in persistence.xml, executing the project (via mave) works perfectly. my **pom.xml** :               <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"              xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">         <modelVersion>4.0.0</modelVersion>         <groupId>org.hibernatespatial.tutorials</groupId>         <artifactId>event-tutorial</artifactId>         <packaging>jar</packaging>         <version>1.0-SNAPSHOT</version>         <name>event-tutorial</name>         <url>http://maven.apache.org</url>              <properties>             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>             <hibernate.version>4.0.0.Final</hibernate.version>         </properties>              <build>              <!-- we dont want the version to be part of the generated war file name -->              <finalName>${artifactId}</finalName>              <plugins>                    <plugin>                         <artifactId>maven-compiler-plugin</artifactId>                         <configuration>                             <source>1.6</source>                             <target>1.6</target>                             <encoding>UTF-8</encoding>                         </configuration>                     </plugin>                  <plugin>             <groupId>org.apache.maven.plugins</groupId>             <artifactId>maven-dependency-plugin</artifactId>             <version>2.5.1</version>             <executions>               <execution>                 <id>copy-dependencies</id>                 <phase>package</phase>                 <goals>                     <goal>copy-dependencies</goal>                 </goals>                 <configuration>                     <includeGroupIds>org.hibernate</includeGroupIds>                     <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>                          <includeGroupIds>org.postgis</includeGroupIds>                     <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>                          <includeGroupIds>postgresql</includeGroupIds>                     <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>                          <includeGroupIds>org.slf4j</includeGroupIds>                     <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>                 </configuration>               </execution>              </executions>             </plugin>              </plugins>         </build>                   <dependencies>                  <!-- Hibernate Spatial for postgis. This will include Hibernate Spatial Core and JTS -->             <!--<dependency>                 <groupId>org.hibernatespatial</groupId>                 <artifactId>hibernate-spatial-postgis</artifactId>                 <version>1.1</version>             </dependency>         -->               <dependency>                 <groupId>org.hibernate</groupId>                 <artifactId>hibernate-spatial</artifactId>                 <version>4.0-M1</version>             </dependency>          <dependency>                 <groupId>org.hibernate</groupId>                 <artifactId>hibernate-entitymanager</artifactId>                 <version>${hibernate.version}</version>             </dependency>             <!-- the Postgis JDBC driver -->             <dependency>                 <groupId>org.postgis</groupId>                 <artifactId>postgis-jdbc</artifactId>                 <version>1.3.3</version>             </dependency>                  <!-- the postgresql driver -->             <dependency>                 <groupId>postgresql</groupId>                 <artifactId>postgresql</artifactId>                 <version>8.4-701.jdbc3</version>             </dependency>                  <!-- Hibernate uses slf4j for logging, for our purposes here use the simple backend -->                    <dependency>                        <groupId>org.slf4j</groupId>                        <artifactId>slf4j-simple</artifactId>                        <version>1.5.11</version>                    </dependency>              </dependencies>                   <!-- add repositories for JTS and Hibernate Spatial and Hibernate (JBoss) -->         <repositories>             <repository>                 <id>OSGEO GeoTools repo</id>                 <url>http://download.osgeo.org/webdav/geotools</url>             </repository>             <repository>                 <id>Hibernate Spatial repo</id>                 <url>http://www.hibernatespatial.org/repository</url>             </repository>             <!-- add JBOSS repository for easy access to Hibernate libraries -->             <repository>                 <id>JBOSS</id>                 <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>             </repository>         </repositories>     </project>      and my **persistence.xml**               <persistence xmlns="http://java.sun.com/xml/ns/persistence"             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"             version="2.0">         <persistence-unit name="org.hibernate.events.jpa" transaction-type="RESOURCE_LOCAL">            <properties>                <property name="hibernate.dialect" value="org.hibernate.spatial.dialect.postgis.PostgisDialect"/>                     <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>            <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5433/mydb"/> <!-- my port is 5433 -->                <property name="hibernate.connection.username" value="myusername"/>                <property name="hibernate.connection.password" value="mypassword"/>                <property name="hibernate.connection.pool_size" value="5"/>                     <property name="hibernate.show_sql" value="true"/>                <property name="hibernate.format_sql" value="true"/>                     <property name="hibernate.max_fetch_depth" value="5"/>                     <property name="hibernate.hbm2ddl.auto" value="update"/>                 </properties>         </persistence-unit>     </persistence>      Regarding the java classes, they are exactly the same of the tutorial. Esecution and uotput:               $ mvn exec:java -Dexec.mainClass="event.EventManager" -Dexec.args="store POINT(10 5)"      PostGres shell:               WGis=# select * from event;                             id |          date           |                  location                  |  title                    ----+-------------------------+--------------------------------------------+----------                   1 | 2013-12-07 15:44:21.653 | 010100000000000000000024400000000000001440 | My Event     (1 row)     WGis=#      At this point, after bringing the project into eclipse, I load the following libraries:   ![enter image description here](http://i.stack.imgur.com/MaSc8.png) but as I run the project gives me this error.               dic 07, 2013 4:40:24 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>     INFO: HCANN000001: Hibernate Commons Annotations {4.0.4.Final}     dic 07, 2013 4:40:24 PM org.hibernate.Version logVersion     INFO: HHH000412: Hibernate Core {4.2.6.Final}     dic 07, 2013 4:40:24 PM org.hibernate.cfg.Environment <clinit>     INFO: HHH000206: hibernate.properties not found     dic 07, 2013 4:40:24 PM org.hibernate.cfg.Environment buildBytecodeProvider     INFO: HHH000021: Bytecode provider name : javassist     dic 07, 2013 4:40:24 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure     INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)     dic 07, 2013 4:40:24 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure     INFO: HHH000115: Hibernate connection pool size: 5     dic 07, 2013 4:40:24 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure     INFO: HHH000006: Autocommit mode: true     dic 07, 2013 4:40:24 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure     INFO: HHH000401: using driver [org.postgresql.Driver] at URL [jdbc:postgresql://localhost:5433/WGis]     dic 07, 2013 4:40:24 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure     INFO: HHH000046: Connection properties: {user=pierfrancesco, password=****, autocommit=true, release_mode=auto}     dic 07, 2013 4:40:25 PM org.hibernate.dialect.Dialect <init>     INFO: HHH000400: Using dialect: org.hibernate.spatial.dialect.postgis.PostgisDialect     dic 07, 2013 4:40:25 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation     INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException     dic 07, 2013 4:40:25 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService     INFO: HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory     dic 07, 2013 4:40:25 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>     INFO: HHH000397: Using ASTQueryTranslatorFactory     dic 07, 2013 4:40:25 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute     INFO: HHH000228: Running hbm2ddl schema update     dic 07, 2013 4:40:25 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute     INFO: HHH000102: Fetching database metadata     dic 07, 2013 4:40:25 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute     INFO: HHH000396: Updating schema     dic 07, 2013 4:40:25 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute     INFO: HHH000232: Schema update complete     Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: event.Event         at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878)         at event.EventManager.createAndStoreEvent(EventManager.java:45)         at event.EventManager.main(EventManager.java:24)      how can I solve it? thank you in advance


title: Postgis 2: Polygon/MultiPolygon in a single column

text: Storing MultiPolygon and Polygon features in a single column used to be as simple as not creating or removing the geometry type check constraint. Is there a similar simple fix in PostGIS 2?


title: QuantumGIS EPSG:3857 doesn't match with leaflet

text: Leaflet documentation said that they has EPSG:3857 as default projection. Using QGIS with open layer plugin, I point to a location to find it's coordinate. I used EPSG:3857 in QGIS as well. The problem is, the location doesn't match. I know that the location in leaflet using "lat-long" format, while location in QGIS is using "long-lat" format. Leaflet documentation said that it used "degree", while (I don't quite sure) I think QGIS use decimal. Does anybody has experience with this? How is the solution? Thanks in advance


Are there strategies for dealing with TopologyException errors in PostGIS 2? Nearly every function I run against two geometries results in a TopologyException (e.g. ST_Intersection, ST_SymDifference). I always try ST_Buffer(the_geom, 0) first, then ST_MakeValid(), then (ST_Dump(the_geom).geom and repeat ST_Buffer. Sometimes a combination of one or more fixes it, sometimes not. Perhaps my data is just not clean enough for PostGIS 2? I feel like I rarely had this issue on Postgres 9.0 with PostGIS 1.5, but now it is almost every dataset.


title: trouble with UpdateCursor where clause in arcgis 10.1

text: I'm trying to use UpdateCursor in arcpy, but the where clause I'm using seems to be causing trouble. However, when I open up the table in ArcMap and use Select By Attributes with the exact same clause that causes an error in the Python script, it works fine. The name of a feature class and a dictionary containing strings is passed into a function with the following code:               rows = arcpy.da.UpdateCursor(featureClass, "{0} = {1}".format("PropCode", "'"+hotelDict["hotelId"]+"'"))     for row in rows:         print "stuff" #I just wanted to see if it was making it here      I get the following error: `RuntimeError: Cannot find field 'PropCode = 'FR066''` More info that may or may not be helpful: I'm using ArcGIS 10.1, the field that is being searched in contains text, and using `arcpy.AddFiedlDelimiters(featureClass, "PropCode")` instead of just `"PropCode"` did not fix the problem. There are no results from Googling "RuntimeError: Cannot find field", and `PropCode = 'FR066'` is correct when using Select By Attributes in ArcMap, so I'm kind of stumped. Any thoughts would be appreciated...


title: ImagePyramid tuning in Geoserver

text: I am running several WMS layers from a _GeoServer_ (2.2 RC3 at the moment of writing). All layers are _ImagePyramids_ with sizes ranging from 100GB to 1TB in size. I have read the _GeoServer on Steroids_ several times and I'm probably missing half of it still. But there's a few things I'm wondering about. My pyramids consists of 9-10 levels of GeoTIFF files, each level having 1/2 resolution of the previous. Each GeoTIFF has a file size with an average at around 8MB, a defined CRS and a size aspect ratio of 1:1.   1. Is my TIFF file size inefficient?   2. Will I get a performance boots by adding overview to my TIFF's?    3. Will _inner tiling_ increase performance?   4. What could help me increase performance?   5. What have you guys learned from your experiments with ImagePyramids in GeoServer? _1,3) In my view these two comes down to how a TIFF file is being handled in general and especially by GeoServer and I'm clueless here._ _2) If I added overviews to my TIFF files my guess is that it corresponds to jump a level in the pyramid and thus I would only waste disk space?_ **Edit** : _Changed pyramid resolution from (the wrong) 1/4 to (the correct) 1/2. The pyramids are following the powers of 2 guidelines._


title: What kind of AWS configuration is needed for running a low-to-medium bandwidth Web map app?

text: Does anyone have experience with running Web maps (tile server + client JS scripting) on Amazon Web Services (S3, EC2 etc...)? What kind of AWS configuration is needed for running a low-to-medium bandwidth Web map app, covering a small(-ish) area (city to small-country size)? All of the tiles would be pre-rendered and uploaded to S3. Ideally I would need a tile serving app on the web server that could serve MBTiles (instead of uploading hundreds of thousands of tile bitmaps individually). So some kind of EC2 instance would be needed, but what kind? Thanks for any hints. **UPDATE:** just to elaborate on my question. What I'm basically looking for is some feedback about how viable AWS is for hosting your own web maps as an individual (which means it shouldn't cost too much, say up to $30/month). I've been hosting my web maps for some time through "ordinary" hosting providers, but these have their own limitations (upload bandwidth is one, speed is another). I'm also looking for any good alternatives to AWS and anything to watch out for when using cloud services for web maps.


title: How to Average neighboring county data and store in original?

text: I have data for several rain stations, i have averaged the data and given each county a value. Some counties have null values and I would like to pull the data from the all the bordering counties and use that to create an average for the null data county. here is what i have so far               #Make Feature layer of counties that have 'NULL' for TCPT MNTM     #Select all counties that touch the boundaries of a single NULL county     #Average TCPT and MNTM values for selected counties     #Store average back in original counties layer          arcpy.MakeFeatureLayer_management(countyData,"badRows","\"MNTM\" = 'NULL'")     arcpy.MakeFeatureLayer_management(countyData,"goodRows","\"MNTM\" >= 0")          # a snippet i pulled from model builder and exported python code snippet          arcpy.SpatialJoin_analysis("Dissolved_Counties",climateData,"Average_Temperature_For_Texas_Counties","JOIN_ONE_TO_ONE","KEEP_ALL","""FIPS "FIPS" true true false 5 Text 0 0 ,First,#,Dissolved_Counties,FIPS,-1,-1;Shape_Length "Shape_Length" false true true 8 Double 0 0 ,First,#,Dissolved_Counties,Shape_Length,-1,-1;Shape_Area "Shape_Area" false true true 8 Double 0 0 ,First,#,Dissolved_Counties,Shape_Area,-1,-1;TPCP "TPCP" true true false 4 Long 0 0 ,Mean,#,Climate_Data_for_Texas,TPCP,-1,-1;MNTM "MNTM" true true false 4 Long 0 0 ,Mean,#,Climate_Data_for_Texas,MNTM,-1,-1""","INTERSECT","#","#")               ###      i guess i am stuck here, i had before used the arcpy.GenerateNearTable_analysis to generate the values for the 4 nearest counties (but they werent always bordering and it needs to be bordering counties) anyway if anyone would give me a little help i would much appreciate it


title: How to import datasets into OpenStreetMap?

text: A coworker of mine was recently given permission to import our local county government's GIS data into OpenStreetMap. I've made single edits on the OpenStreetMap site before, but I have never imported entire datasets. **Where do we start?** Also, are there any tools that help automate a task like this? I'm assuming there should be a decent amount of custom scripting involved to handle the local GIS's schema. I would like to see how other people have handled this problem. It's also likely that we could get data from other local governments in the future, so if there is anything that would help relieve the burden of building a custom import system multiple times, I would be interested.


title: Cordenadas 2d transformacion a postgis desde QGIS

text: This is a three-dimensional shape file, I checked in ARCGIS, where the shape attribute indicates POINT ZM, This is the table               fid        0      shape*     point ZM     atribut1   A     atribut2      B     ESTE      500     NORTE      1000       and when exporting to postgis from QGIS indicated in the item "CLASS OF SPACE" NULL and the following error : "Problemas al insertar objetos espaciales del archivo: D:/gegrafo/BORRARç/COTACACHIa_Merge.shp La base de datos dio un error mientras ejecutaba esta SQL:               SELECT AddGeometryColumn('public','COTACACHIa_Merge','the_geom',-1,'NULL',2)     El error fue:     ERROR:  Invalid type name - valid ones are:         POINT, MULTIPOINT,         LINESTRING, MULTILINESTRING,         POLYGON, MULTIPOLYGON,         CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,         CURVEPOLYGON, MULTISURFACE,         GEOMETRY, GEOMETRYCOLLECTION,         POINTM, MULTIPOINTM,         LINESTRINGM, MULTILINESTRINGM,         POLYGONM, MULTIPOLYGONM,         CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM         CURVEPOLYGONM, MULTISURFACEM,         or GEOMETRYCOLLECTIONM     CONTEXT:  SQL statement "SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6)"     funciÃ³n PL/pgSQL Â«addgeometrycolumnÂ» en la lÃnea 4 en sentencia SQL"


title: Converting Raster Data to Polygon data

text: I am trying to convert a raster data to polygon data. Previously I was using the shapefile.py to create point data on individual lat/lon on the raster. But that will create a Huge data and querying it will be a Big issue. So, it would be better if I am able to convert the raster data into a polygon data. I was able to find SAGA, but it seems that it can only convert the .grd files. Is there a way to convert GeoTIFF format or raster datasets in general to Polygon? **UPDATE: Using gdal_polygonize.py** I am executing the following line of code,               gdal_polygonize.py ~/development/Biodiversity/biodiversity/GeoTIFF/bio11.tif -f "ESRI Shapefile" bio11.shp      But I am getting the following error. My gdal version is 1.9.0.               Traceback (most recent call last):       File "/usr/bin/gdal_polygonize.py", line 34, in <module>         import gdal, ogr, osr       File "/usr/lib/python2.7/dist-packages/gdal.py", line 2, in <module>         from osgeo.gdal import deprecation_warn       File "/usr/lib/python2.7/dist-packages/osgeo/__init__.py", line 21, in <module>         _gdal = swig_import_helper()       File "/usr/lib/python2.7/dist-packages/osgeo/__init__.py", line 17, in swig_import_helper         _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: libjvm.so: cannot open shared object file: No such file or directory


title: Field Calculator Runs In IDLE (2.6.5) but not ArcGIS 10 SP3

text: just wondering if anyone else is having issues with the field calculator in ArcGIS 10 SP3. In the following code I do a pretty simple field calculation with a variable (an array) as one of the parameters in the expression.               exp1 = "Feature = 16"     rows = arcpy.SearchCursor("ObservationMaster", exp1)     li = []     for row in rows:         ObsID = int(row.getValue("ObsID"))         li.insert(len(li), ObsID)     if li != []:         codeblock = """def chStat(stat, ID, li):         if int(ID) in li:             return 5         else:             return int(stat)"""          exp = """chStat(str(!ManagementStatus!), str(!ObsID!), li)"""          arcpy.CalculateField_management("ObservationDetail", "ManagementStatus", exp, "PYTHON", codeblock)      When I run it through IDLE (Python 2.6.5), there are no problems and it runs successfully. However, if I create a script in a toolbox in ArcCatalog/ArcMap using this same code, I get the following error:               <class 'arcgisscripting.ExecuteError'>: ERROR 000539: Error running expression: chStat(str(1), str(1), li) <type 'exceptions.NameError'>: name 'li' is not defined     Failed to execute (CalculateField).      I know this is because it is not treating "li" as a variable, but it does when I run it in IDLE. Has anyone had this same problem and does anyone know a solution to get this working. I really need this script to run via ArcMap. Thanks in advance


Given a line on the earth's surface, how do I plot a line perpendicular to it? Apologies if this is a very simple question. I thought this would be a straightforward task, but it is proving counter-intuitive. I start with the blue line in the figure below (see link -- I'm unable to upload figures yet). I found a perpendicular line by calculating the gradient of the blue line (m), then plotting another line (green) with gradient -1/m. When I plot the lines in Matlab (using 'plot' and 'axis equal'), they look perpendicular, as expected. http://imgur.com/7qMkx However, when I export these lines to Google Earth (using the KML Toolbox), they no longer look perpendicular (see link below; the shorter line is the blue line from the previous figure). http://imgur.com/ncJQ7 I understand that strange things happen on curved surfaces, but I thought the lines should at least look perpendicular locally. I suspect this has something to do with the projection in Google Earth -- in particular, the fact that the grid cells appear to have roughly similar side lengths, yet the longitudinal edge has length = 1 degree, whereas the latitudinal edge has length = 0.5 degree. So, in summary:   * is my method of finding a perpendicular line valid on a curved surface? (i.e., plotting a line with gradient -1/m)   * in the Google Earth image, do the perpendicular lines look as expected, or is something strange going on?  UPDATE: To provide more context: I am looking at radar data taken from a plane. The multi-colored area is the 'swath', where observations have been recorded. The blue line I started with in the explanation above is parallel to the swath: this is the aircraft's flight line (the plane was moving in the roughly south- west direction). The radar looks in the direction orthogonal to the flight line, on the left. I am trying to draw a line perpendicular to the flight line; this should be the direction the radar is looking, and should cut the swath neatly. As you can see, this is not the case. ![enter image description here](http://i.stack.imgur.com/nsGaq.jpg)


title: How do I create a shapefile showing footprints of Rasters?

text: I have around 1,000 satellite images in tiff format, and I want to create a shapefile which will serve as an index to the rasters. This is something similar to a raster catalog, but I do not want to build a raster catalog. Some obstacles I can forsee, is that the image are georefrenced, so they are not rectangular in shape (I am talking about the data area). **Update** To clarify, I require the polygon to cover only the non-zero (or non nodata) pixels of the raster, and not the entire rectangular raster. Most of the answers so far, give a rectangular polygon, which covers the data, as well as the non-data pixels. My Image ![A sample Satellite Image](http://i.stack.imgur.com/OTs4r.png) * * * Result given by tools I have examined (like raster catlog, various Arcscripts, custom Python script given in one of the answers): ![Result](http://i.stack.imgur.com/S1DP6.jpg) * * * Result that I want: ![enter image description here](http://i.stack.imgur.com/431El.jpg)


title: Trouble with Hot Spot Analysis (Getis-Ord Gi*) tool in ArcGIS

text: I am trying to locate areas with a high rate of accidents involving bicyclists or pedestrians per car accident of any kind. I have a point file of accidents and a point file of all those with bike/ped involvement. I want to use the Hot Spot Analysis tool, but all I can figure out is using it on each point file to tell me the overall crash hotspots and the bike/ped crash hotspots. Is there a way to normalize one by the other? Is there a good way to compare the two hotspot output files? is there a different tool or approach I should look into?


title: arcpy.Exists not working within standalone script

text: I have the following code. I want to see if a layer name exists within a map document, not if the shapefile exists in the directory. If I copy paste into the python window within ArcMap works fine. IE. Prints: True If I run the program as a stand-alone script it does not work? Prints False when should print True I have code the sets up the mxd and dataframe.               if arcpy.Exists("project_aoa") == True:         print("TRUE")     elif arcpy.Exists("project_aoa") == False:         print("FALSE")      These layers are withing a group layer should this matter? project_aoa is a shapefile. EDITED: I ended up doing this:               for item in mxds:         mxd = arcpy.mapping.MapDocument(r"{0}".format(item))         df=arcpy.mapping.ListDataFrames(mxd,"Project Area")[0]              for lyr in arcpy.mapping.ListLayers(mxd, "project_aoa", df):             if lyr.name == "project_aoa":                 print("True")             else:                 print ("False")


title: Labeling text with special characters in ArcMap?

text: I am trying to display some bird data in ArcMap in the format/notation that it is recorded in the field. The notation is made up of the one/two letter species code followed by a description of the activity underneath (see image below). ![Bird labeling/field notation](http://i.stack.imgur.com/25qPN.jpg)   I do not want to create symbology because I have 500+ species and six possible activities, so I have decided to use labelling in ArcMap rather than symbology. I am able to present data with a circle and underlined but I am struggling with displaying the data that has a double underline or asterix underneath. Therefore, I was wondering if anybody would be able to offer me any help - how do I include these characters in a label? I am running ArcMap 9.3. Many thanks Mark


title: How do you import simple xyz in QGIS

text: I have found out how to get tab-delimited X,Y data into a layer but the Z field value is not given as an option on import? I tried to edit the attributes to add and define a new field but it keeps crashing? Any idea Cheers


title: ArcGIS Displays Wrong Date

text: I have a postgres database with a series of fields that includes a date field in MM/DD/YYYY format. Through ArcSDE it displays in Arc in a weird format with the wrong date and some made up time. When viewed via PGAdmin or QGIS the date displays correctly. Does anyone have an idea of why Arc is jumbling the date and how it can be corrected? The screenshot below shows the attribute table for identical rows in QGIS and Arc. Notice how Arc includes a random time and the wrong date (everything is year 2000). ![enter image description here](http://i.stack.imgur.com/ScujO.png)


title: How to replace null values in attribute table ArcGIS 10.2

text: I have a string field 'Oneway' with three values '+' '-' and Null showing a street accessibility, I would like to replace them with values 'F' 'T' and null as the script for Network dataset expect these values.However it seems that it is not possible to replace values if Null values are present. I tried also changing the field type to double or text but the field properties are not editable somehow (I tried this in arc catalog). I am only able to replace value '+' and '-' with numbers using the field calculator but need to replace them with letters.


title: What does ‘Response Cache Headers’ and ‘Cache Time (seconds)’ in Geoserver really do?

text: I am trying to understand what these two settings do and how they can be used to influence how the user’s browser caches a tile. From the Geoserver documentation: “HTTP Settings—Cache parameters that apply to the HTTP response from client requests. If Response Cache Headers is selected, GeoServer will not request the same tile twice within the time specified in Cache Time. One hour measured in seconds (3600), is the default value for Cache Time.” From this I infer that either ‘Expires’ or ‘Cache-Control’ HTTP headers will be added to the response and, if Cache-Control is added, then the value that goes into ‘max-age’ will be ‘Cache Time’. Is this what is meant to happen? However when I turn on ‘Response Cache Headers’ and look at the HTTP response header on the client I see no difference from the case when the ‘Response Cache Headers’ is not on. Cheers Mark


title: Error using "r.los" in QGIS

text: I am not a "computer person". So -- I don't know what this error message means. I found this question and answer for this same problem, but the solution did _not_ work for me, dammit. GRASS algorithm r.los does not produce raster I am using QGIS 2.0 (or maybe 2.0.1?). The computer is running Windows 7. I activated the menu **Processing > Commander** and got the command entry line above the map-area window -- no problem there. (The QGIS project I'm using has an elevation raster.) The computer program picks up just fine that I want to use the loaded raster. I copy and paste my coordinates for viewer location just fine. I tried leaving the default, temporary output file, and I also tried creating and entering into the GUI form a new file for this process. Each time, the following error message resulted.               Oooops! The following output layers could not be open     Output raster layer: C:/Users/Cogreg/Documents/GIS, QGiS/Files_Greg_created_via_GIS/300_CountyRd_41_viewshed.tif     The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm     Checking the log information might help you see why those layers were not created as expected     This algorithm requires GRASS to be run. A test to check if GRASS is correctly installed and configured in your system has been performed, with the following result:     GRASS seems to be correctly installed and configured


title: Cant see WFS-T layer with OpenLayers and GeoServer (Windows)

text: I am trying to implement a simple test of a OpenLayers + WFS-T + GeoServer -setup. I have followed the instructions by populating PostGIS and configuring GeoServer, and can see the WFS-T layer data in GeoServer's preview fine. I am following these steps: http://www.gistutor.com/openlayers/22-advanced- openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis- layer.html When I view the test page in browser, WSF-T layer is not displayed. I have not defined proxypass to GeoServer (I have not done this: http://www.gistutor.com/geoserver/21-intermediate-geoserver- tutorials/38-configuring-geoserver-proxy-for-public-and-remote-data- access.html)! This is because   * I think this should not be necessary since I am testing my page only using file://somefolder/mytestpage.html URLs    * My setup does not have Apache web server at all - GeoServer Windows installer did not install it   * The symptoms do not sound like the problems are due to not using proxypass - there are no failed requests when I look at Firebug, and no "XMLHttpRequest cannot load http://www.yourdomain.com/geoserver/wfs. Origin localhost is not allowed by Access-Control-Allow-Origin." errors What I am weirded about it that when the page loads, the only request to localhost is OPTIONS request to /geoserver/wfs. There's no POST messages to localhost at all. ![enter image description here](http://i.stack.imgur.com/0mHCY.png) I have installed GeoServer in port 28080, and this is how I modified the source code from http://www.gistutor.com/openlayers/22-advanced-openlayers- tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html   * disabled proxypass (just commented the whole row - is this how you do it?)   * changed some parameters to reflect my environment: url: "http://localhost:28080/geoserver/wfs", geometryName: "geom", schema: "http://localhost:28080/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=cite:wfst_test" .               // disabled proxypass     // OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";          // wfs-t editable overlay     var wfs_layer = new OpenLayers.Layer.Vector("Editable Features", {     strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],     //projection: new OpenLayers.Projection("EPSG:26910"),     protocol: new OpenLayers.Protocol.WFS({     version: "1.1.0",     // loading data through localhost url path - jannem: use port 28080 as we have no apache proxy     url: "http://localhost:28080/geoserver/wfs",     featureNS :  "http://www.opengeospatial.net/cite",     maxExtent: mapextent,     // layer name     featureType: "wfst_test",     // geometry column name     geometryName: "geom",     schema: "http://localhost:28080/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=cite:wfst_test"     })     });      If I open localhost:28080/geoserver/wfs/ with browser, I get               <?xml version="1.0" encoding="UTF-8"?>     <ows:ExceptionReport version="2.0.0"       xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://localhost:28080/geoserver/schemas/ows/1.1.0/owsAll.xsd"       xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">       <ows:Exception exceptionCode="MissingParameterValue" locator="request">         <ows:ExceptionText>Could not determine geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@7db12fce</ows:ExceptionText>       </ows:Exception>     </ows:ExceptionReport>      Any ideas? EDIT: added two pictures for the discussion in the comments: ![enter image description here](http://i.stack.imgur.com/vizYM.png) ![enter image description here](http://i.stack.imgur.com/EoidK.png)


title: Why does my feature layer crash on "query complete"?

text: In my WPF application I have an ArcGIS map with a set of various feature layers. When I execute the program on my local developer machine it works fine. Unfortunately, once it is deployed on a customer machine, it crashes with the stack trace below. What happens seems to be that one of the internal ArcGIS event handlers are executed from a background thread and tries to access/modify a graphics layer, which in turns touches WPF ... and then, bang, we get a "System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.". The stack trace doesn't have a single trace from my program - it all happens internally in the ArcGIS WPF components. Can anyone help with an idea of what is going wrong?               ERROR 2013-12-02 13:00:53,988 125226ms [Main] App WriteLog - Catching Unhandled exception     System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.     at System.Windows.Threading.Dispatcher.VerifyAccess()     at System.Windows.DependencyObject.GetValue(DependencyProperty dp)     at ESRI.ArcGIS.Client.GraphicsLayer.<Graphics_Collectionchange d>b__1(Graphic a)     at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)     at ESRI.ArcGIS.Client.GraphicsLayer.Graphics_Collectionchange d(Object sender, NotifyCollectionchange dEventArgs e)     at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionchange d(NotifyCollectionchange dEventArgs e)     at ESRI.ArcGIS.Client.GraphicCollection.AddRange(IEnumerable`1 items)     at ESRI.ArcGIS.Client.FeatureLayer.task_QueryComplete(Object sender, QueryEventArgs args)     at ESRI.ArcGIS.Client.Tasks.QueryTask.OnExecuteCompleted(QueryEventArgs args)     at ESRI.ArcGIS.Client.Tasks.QueryTask.<>c__DisplayClassf.<ExecuteAsync>b__d(Task`1 result)     at ESRI.ArcGIS.Client.Tasks.TaskBase.<>c__DisplayClassc`1.<HandeEventBasedTask>b__a(Task`1 result)     at System.Threading.Tasks.Task`1.<>c__DisplayClass17.<ContinueWith>b__16(Object obj)     at System.Threading.Tasks.Task.InnerInvoke()     at System.Threading.Tasks.Task.Execute()     --- End of inner exception stack trace ---     at System.Threading.Tasks.TaskExceptionHolder.Finalize()     ---> (Inner Exception #0) System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.     at System.Windows.Threading.Dispatcher.VerifyAccess()     at System.Windows.DependencyObject.GetValue(DependencyProperty dp)     at ESRI.ArcGIS.Client.GraphicsLayer.<Graphics_Collectionchange d>b__1(Graphic a)     at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)     at ESRI.ArcGIS.Client.GraphicsLayer.Graphics_Collectionchange d(Object sender, NotifyCollectionchange dEventArgs e)     at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionchange d(NotifyCollectionchange dEventArgs e)     at ESRI.ArcGIS.Client.GraphicCollection.AddRange(IEnumerable`1 items)     at ESRI.ArcGIS.Client.FeatureLayer.task_QueryComplete(Object sender, QueryEventArgs args)     at ESRI.ArcGIS.Client.Tasks.QueryTask.OnExecuteCompleted(QueryEventArgs args)     at ESRI.ArcGIS.Client.Tasks.QueryTask.<>c__DisplayClassf.<ExecuteAsync>b__d(Task`1 result)     at ESRI.ArcGIS.Client.Tasks.TaskBase.<>c__DisplayClassc`1.<HandeEventBasedTask>b__a(Task`1 result)     at System.Threading.Tasks.Task`1.<>c__DisplayClass17.<ContinueWith>b__16(Object obj)     at System.Threading.Tasks.Task.InnerInvoke()     at System.Threading.Tasks.Task.Execute()<---


title: Transform map coordinates to page coordinate in ArcObjects

text: I have a map inside a page layout in ArcMap. Currently, I use this code to convert geographic coordinates to page coordinates:                   IMap map = ...     IPageLayout pageLayout = ...          IDisplayTransformation mapTransformation = ((IActiveView)map).getScreenDisplay().getDisplayTransformation();     IDisplayTransformation pageTransformation = ((IActiveView)pageLayout).getScreenDisplay().getDisplayTransformation();          IPoint mapPoint = ...          int x[] = {0};     int y[] = {0};     mapTransformation.fromMapPoint(mapPoint, x, y);     IPoint pagePoint = pageTransformation.toMapPoint(x[0], y[0]);      For example, if mapPoint = 913767.624037, 6458100.4284 (in meters) I get: **x[0], y[0] = 18, -2** Then: pagePoint = 18.0, 2.0 (in centimeters The problem is that x[0], y[0] are intergers as the method IDisplayTransformation.fromMapPoint return integers (for device pixels). Their values are corrects but they are rounded. I would expect for this example a pagePoint = 18.42 cm, 2.19 cm What's wrong in my conversion method? Is there an other way to make this conversion with more precision?


title: How to delete one polygon from a multi polygon record in a spatialite database using QGIS

text: I have a spatialite database with multi polygon records within the database. When i try to edit these records i cannot delete just one of the polgons for a specific record. It only allows me to delete the entire record which may have up to 5 or 6 polygons associated with the record and i only want to delete one of these polygons from within the multi polygon record. I can get around it by exporting the record as a Shapefile, exploding to a multi part then deleting the polygon i need to delete, then taking the multi part back to a single part and then inserting it back into the spatialite database. A long and annoying process !!!! Is there a quicker way of doing this?? I really hope so !! Regards, Paul


title: What is the best way to use Leaflet and Geoserver to highligh a feature after a WMS request?

text: I have a web map, and I'm hoping to make it interactive. The layer I have is reasonably large, at 15 mb in GeoJSON format 4 mb compressed, so I don't want to load the whole layer as one file. But, I do want to be able to interrogate each feature for around 6 attributes and the geometry. What I have is:   * Leaflet 0.5   * GeoServer 2.2   * Access to the server and data, happy to customise the data. What I want is:   * user can click on a map, and is returned a nice dialog box with feature information in a table   * the map centers on the feature, possibly zooms, and highlights the feature. I'm pretty sure this can be achieved using a GeoJSON request (like the example here), but I can't find examples of this anywhere and I'm struggling to implement it myself. Does someone have a nice example of this?


title: Is it not possible to transform a feature from one featuredataset into another with arcgis toolbox?

text: I am reprojecting datasets from the path1 to path2. The only difference is that the dataset is names differently and obviously has another coordinate system. path1 = Datenbankverbindungen\VEKTOR.sde\GISVektor.DBO.Verkehr\GISVektor.DBO.VISPA_POINT path2 = Datenbankverbindungen\VEKTOR.sde\GISVektor.DBO.Verkehr_ETRS\GISVektor.DBO.VISPA_POINT_ETRS   However, when the dataset has been successfully transformed with arctoolbox, the featureclass is saved outside the featuredataset and in the root directory of the database. Is this normal? yours, Robert


title: Can I download large areas of OSM data with QGIS OSM plugin?

text: I have OpenStreetMap data loading failure problem. I want to use the Download OpenStreetMap data tool in QGIS. I want to select the extent from map canvas like shown below: ![enter image description here](http://i.stack.imgur.com/nidiM.png). For me, the osm-data usually works when the data downloaded map was less then 1:160000 scale. But when it is bigger than 1:320000 scale (including 1:320000), QGIS always gets infinite loading circle rainbow (OS X user). Does anyone have an idea on how to get it to work? Thank you. GIS Software : QGIS Hardware : Mac OS : OS X 10.9.2


title: Why does ITopologicalOperator2 .ConstructUnion produce a somehow invalid polygon?

text: I try to add a single buffer around the shape of the selected features. So I step through each selected feature and add it's shape to a `GeometryBag`. With `ITopologicalOperator2.ConstructUnion` I create a union geometry. But when I use this geometry to add an element, nothing appears after `Refresh`. The code part for adding an element does work, when I directly assign `element.Geometry = feature.Shape`. So `ConstructUnion` seems to fail here. Any ideas why? I already found out, that I have to simplify the shapes before adding it to `GeometryBag` and to set the `SpatialReference` on the `GeometryBag` before.               ESRI.ArcGIS.Carto.IGraphicsContainer graphicsContainer = (ESRI.ArcGIS.Carto.IGraphicsContainer)activeView.FocusMap;          ESRI.ArcGIS.Geodatabase.IEnumFeature enumFeature = (ESRI.ArcGIS.Geodatabase.IEnumFeature)map.FeatureSelection;     enumFeature.Reset();     ESRI.ArcGIS.Geodatabase.IFeature feature = enumFeature.Next();          IGeometryBag geoBag = new GeometryBagClass();     geoBag.SpatialReference = activeView.FocusMap.SpatialReference;     IGeometryCollection geometriesToUnion = geoBag as IGeometryCollection;     while (!(feature == null))     {       ITopologicalOperator2 shape = feature.ShapeCopy as ITopologicalOperator2;       shape.IsKnownSimple_2 = false; // see nef001's answer       shape.Simplify();       geometriesToUnion.AddGeometry(shape as IGeometry);       feature = enumFeature.Next();     }          IPolygon poly = new PolygonClass();     resultPolygon.SpatialReference = activeView.FocusMap.SpatialReference; // see Petr Krebs's comment     ITopologicalOperator2 resultPolygon = poly as ITopologicalOperator2;     resultPolygon.ConstructUnion(geometriesToUnion as IEnumGeometry);     IFillShapeElement fillShapeElement = new ESRI.ArcGIS.Carto.PolygonElementClass();     fillShapeElement.Symbol = fillSymbol;     ESRI.ArcGIS.Carto.IElement element = (IElement)fillShapeElement;     topologicalOperator = (ESRI.ArcGIS.Geometry.ITopologicalOperator)resultPolygon;     //element.Geometry = topologicalOperator.Buffer(distance);     element.Geometry = resultPolygon as IGeometry; // To make sure, it's not the Buffering that goes wrong     graphicsContainer.AddElement(element, 0);      **Update:** To address Petr Krebs suggestions   * I changed the assignment of `geometriesToUnion.AddGeometry` to `feature.ShapeCopy`.    * I changed the assignment of `element.Geometry` to resultPolygon instead of the buffer output.  Both didn't help.   * For testing I use a single layer where I select three polygon features. So the are all polygons and have the same SpatialReference.    * `resultPolygon.IsEmpty` after `ConstructUnion` is false. **Update 2**   * Regarding Nef001's answer I added `shape.IsKnownSimple_2 = false;` but it didn't change the result. **Update 3**   * Regarding Petr's answer I set the spatial reference before `Union()` but it didn't help.


title: Using sdemon command of ArcSDE?

text: I am pretty new to ArcGIS for Server and ArcSDE but cannot find a solution in the Esri Documentation or Forums. I don not know how to use **sdemon** or even where to start this command line tool.


title: Route Analyst acts odd at using custom impedance

text: I need to do a route analysis with a custom made impedance, which is impedance based on the surface type. Here is the problem: while the route Analysis acts perfectly fine with the default cost "Length" (image 1), it will be messed up with my unknown custom cost "Surface_tpye" (image 2), which is based on the field suface_cost. Since I am using the same stops on both scenarios, there can't be breaks. Any ideas to solve this problem? ![1](http://i.imgur.com/3NYSjys.png) ![2](http://i.imgur.com/gxnF7Bk.png) ![3](http://i.imgur.com/q0b09JO.png) I also tried with the field length as impedance, same problems. Only works with default cost.


title: clip one layer with the current map layers

text: I work in a little companie where the main goal of employees in GIS is to have a quick view of the issues on a study area. It would be very useful to have a tool wich clip all the layers of the current map extent with the study area. I made a quick search in ogr tools but I didn't find the appropriate one. Plus, I think that ogr can't work automatically with the current layers. So I think the solution is Pyqgis but I have no skills in Python. Is there an existing tool ? Any suggestions to find the simpliest way to do that ? Thanks


title: How to find the list of TMC codes by region or by geometry polygon?

text: Can you please suggest a way to find out all the TMC (Traffic Message Channel) codes by region or by Geometry polygon values. My area of interest : USA


title: Add TMS layer to GeoExt?

text: Could you please answer to these questions: How to add TMS layer to Geoext? If it's possible? I didn't find any information about it.... I will be appreciate for any help. Thank you in advance!


title: How to make GeoServer run as a windows Service after it has been installed?

text: While installing GeoServer, on my windows machine, I selected the 'Run manually' as the option. ![enter image description here](http://i.stack.imgur.com/PplKy.png) Now I wish to keep it running all the time, and for this, I would have to run it as a Windows service. I know that I can manually make a new service and run it from there, but is there a better way to make it run as a Service, without reinstalling it?


title: SELECT DISTINCT from table in Geoserver SQL view

text: The postgis table I have has the following columns,               id | name | style_id | unique_id | time_stamp | the_geom(polygon)      and logically the unique constraint (not currently imposed in the db) lies with unique_id+time_stamp. Sample data:               1 |  comp one   | 1 | comp1_u | 2012-11-02 11:00 | <comp1_geom>     2 |  comp two   | 2 | comp2_u | 2012-12-01 12:00 | <comp2_geom>     3 |  comp one 2 | 1 | comp1_u | 2012-12-01 12:12 | <comp1_geom>     4 |  comp three | 3 | comp3_u | 2012-12-01 12:00 | <comp3_geom>     5 |  comp two 2 | 2 | comp2_u | 2012-03-12 01:34 | <comp2_geom>     6 |  comp four  | 4 | comp4_u | 2012-12-01 12:00 | <comp4_geom>     7 |  comp five  | 5 | comp5_u | 2012-12-01 12:00 | <comp5_geom>      My objective is to create a GeoServer SQL View with only distinct elements based on unique_id from the table order by time_stamp. ie., I want my Geoserver layer to show only the latest distinct elements. I tried this:               SELECT DISTINCT on (unique_id) * from my_table order by unique_id,time_stamp desc      Though this command runs fine in the psql client, it doesn't seem to go well with the style specified for the WMS layer. The style basically colors each element based on the style_id. When the layer is displayed, neither comp1_u and comp2_u elements are styled properly nor can I view their info on click in the layer preview window. Am I using the right query for the view or is there any workaround to achieve the above? Thanks. PS. Setup is: Postgres 9.1 with PostGIS 1.5 and GeoServer 2.2


title: ArcGIS Server - Polygon lines dimenstions

text: How to measure the lines of polygon . VB.NET + ArcGIS Server . I have ArcGIS Server 9.3 - WebADF - VB.NET


title: Proper gdaltrasform syntax to transform a list of coordinates?

text: this is probably a very simple question, but I'm very new to GIS so I just need one last nudge. I've got a sense of the Linux utility **gdaltransform** and I am feeding it coordinate pairs in line-by-line format in "interactive mode" where the program waits for you to input coords and then it just spits back the results on the console. But a better way for scripting purposes would be able to just feed it an entire polygon of points and have it spit out the re-projected points, all in one shot. For example, here's what I'd like to do:               gdaltransform -s_srs EPSG:26986 -t_srs EPSG:4326 255771.72999999672,951430.5599999987 255756.3400000036,951443.129999999 255733.53000000122,951443.4400000013 255700.79999999702,951404.4400000015 255693.40999999642,951379.1900000013 255650.22999999672,951370.9400000012 255614.3400000036,951413.879999999 255561.04999999705,951408.3099999985 255510.45000000298,951377.7500000001 255441.9099999964,951361.75 255406.81000000238,951310.6299999988 255409.90999999642,951242.6900000013 255428.39000000063,951161.129999999 255434.14000000063,951070.2500000001 255498.34000000358,950986.0599999987 255507.03000000116,950854.1900000013 255545.59000000358,950798.25 255545.7800000012,950772.129999999 255545.79519999772,950770.4767999984 255558.06970000267,950778.8845000006 255617.48359999806,950816.685800001 255754.21130000052,950904.0976999998 255789.04469999668,950926.2617999986 255798.64760000262,950932.4488000013 255894.92400000244,950993.9884000011 255916.64130000022,951009.1233000011 255916.1400000006,951017.1900000012 255905.78000000116,951188.379999999 255775.32999999818,951303.5599999987 255764.8900000006,951334.3099999987 255771.72999999672,951430.5599999987      Simple, right? Unfortunately, the program reads the beginning of this string as the name of an input file. (So I tried to just dump this list into an input source file and point it to that, but it says the file is in the 'wrong format'.) How do I get this to work to process bulk pairs, in non-interactive mode?


title: How to convert Rainfall Isohyet map into Raster to determine precipitation (mm) at any point?

text: Specifically, I have a rainfall map (Isohyets) measured in mm (precipitation)... I wanted to know a particular value (precipitation) at any point between these lines... How can I do this? Do I have to convert/interpolate these polylines so I could have a Rainfall raster instead? So that I would know the precipitation in any point based on cell values of the Rainfall raster? If so, how do I make a raster map out of my rainfall contours/isohyets? By the way, I have a DEM of 20-m resolution. Will this be of any help in converting/interpolating my rainfall map?


title: Identifying the Primary Key field of the Layer in ArcGIS Server

text: I need to get the primary key column of the Particular layer added in the Map. Usually 'FID' be found for a Shapefile Layer Source and OBJECTID found for a SDE source layer. Is there any way to Identify which one is the primary key columns so that I can access those values. I need to get this using ArcGIS JS API Version.3.3 and I am using ArcGIS Server 10. Please help me


title: How to count zero values in a table in rows and write it to new field?

text: This is a very simple task to do but I can't understand the right syntax. I have a shapefile whose attributes are similar to the following:               FID Shape   FIELD1 FIELD2 FIELD3 ...     0   Polygon 0      1      0     1   Polygon 3      0      7     2   Polygon 3      4      7     ...      The number of **fields** and their **names** are always different. I need to create a new field (let's name it NUM), and count the number of zeros in each row. Example output:               FID Shape   FIELD1 FIELD2 FIELD3 NUM     0   Polygon 0      1      0      2     1   Polygon 3      0      7      1     2   Polygon 3      4      7      0      I know how to create a new field, however I am not clear on the next steps. * * * **The working code:**               #path is path to shape file     def a(path):       fields = arcpy.ListFields(path,"FID_*") #FID_* is wildcard to select a fields name        arcpy.AddField_management(path, "NUM", "SHORT") #create a field with name NUM       cursor= arcpy.UpdateCursor(path)        for row in cursor:         count=0         for field in fields:            a= row.getValue(field.name) #take a value            if a==0: #if value=0 then value=value+1             count+=1         row.setValue("NUM", count)         cursor.updateRow(row)       del row        del cursor      Thanks blah238, now I can eat pythons!


title: Open Layers Bounding Box, Flickr API, and popups?

text: Ive been using the code from the BBox strategy with my Flickr API to display photos on my map with some success. http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/strategy- bbox.html However, I would like to expand its functionality a bit, but have not been successful, my JS is rudimentary at best. I would like to add the functionality allowing a user to click on the existant thumbnail, and an larger image (say 300*300 pixels) would popup, with the photo caption below. Can anyone give me a hand with this or point me in the right direction? Many thanks!


title: IOError: Decoder Zip Not Found while using mapproxy with mapserver in windows 7 64bit machine

text: I am new to GIS technology. I have configured a map server OSGEO4W. I am able to render maps using WMS and openlayers. But the rendering is very slow. For faster rendering I want to use Mapproxy. I have installed Mapproxy with Python virtual environment. Mapproxy service is running fine. I am checking it with the following url "http://"mylocalhost":8080/" Then, it is showing: "Welcome to MapProxy 1.5.0" I have changed the mapproxy.yaml as per the demo application file so that it shows its "demo" application. When I am browsing demo application and rendering map using EPSG:4326 or EPSG:900913 (even when I am using it in my application with openlayers and map file, then also it is showing the the following): It is showing a blank image. It is showing the following error on command window: > File "c:\mapproxy_venv\lib\site-packages\pil-1.1.7-pu2.7-win- > amd64.egg\Image.py" line 385, in _getdecoder raise IOError("decoder %s not > available" % decoder_names) IOError: decoder zip not available It means it does not receive "decoder zip". Please help me to fix this problem. Thanks


title: Configuring image popups in a Silverlight application

text: My Silverlight application contains a points layer which contains paths to a folder of geotagged photos. These points were generated using the GeoTagged Photos to Points tool. I chose not to import the photos into the file gdb. When I view the layer in ArcMap and configure popups to display the path as a URL, clicking on a point pops up a preview of the image instead of the default popup (showing the actual value of the Path field). Inside my application (built using the ArcGIS Silverlight viewer), the popups only show the path to the image. There does not seem to be an option to configure it as a link instead. In order for the actual image to be displayed, would I have to select the option to add the photos as attachments to the SDE gdb?


title: Can't determine what parameters to pass to a OSM2PO SOAP call

text: I've been experimenting with OSM2PO which is a great little peace of software. Right now though, I'm fumbling with the SOAP WS which I'm trying to use from a JEE web application. I'm not having any trouble to setup the call to the webservice and can call upon one of the two webmethods described in the WSDL : findClosestVertexId() and findRoute(). Finding a close-by vertex ID from coordinates is no trouble at all but calling findRoute() is somewhat puzzling me as it takes four parameters : the two start and end points of the route and - RouterID (integer) and parameters (String). My question is : what do I put in those last two? I'm asking because actually I'm not getting anything from findRoute(). I've been trying something like findRoute(myStartVertexID,myEndVertexId,1,"") but the List I get is desperatly empty (getLength() returns 0!). I'm guessing this is because I'm misusing the findRoute() method and not putting proper parameters in the method call. Anybody experiencing the same problem?


title: Unexpected Polygon Zoom Extents with a Rotated Dataframe

text: I have created a series of roated Grid Index Features. I wrote an ArcPy script to generate the grids and adds a rotation value field. My plan is to run another ArcPy script that zooms to each grid and exports a PDF. I am using ArcPy instead of Data Driven Pages because of some additional requirements ArcPy fulfills. The problem I am experiencing is that I'm getting unexpected zoom results when the dataframe is rotated. In the example below, I rotate the dataframe 47 degrees to "straighten" the grid. When I use Zoom to Layer or Zoom to Selected Feature it doesn't provide a tight zoom around the polygon. If the dataframe is not rotated, the zoom works as expected. Rotating the dataframe causes the view to zoom out too far. Interestingly, when using Data Driven Pages and providing the rotation field, the zoom behaves as I expect. Below are some examples of this phenomenon. How can I get the results of third image (the Data Driven method) using ArcPy? **EDIT 1:** The ArcPy code is simply using the Grid Index Features Geoprocessor to build the grids. Where my code comes into play is when I rotate that geometry. I write the results of the following function to the geometry of each grid with an Update Cursor. The code I'm using for calculating the rotation is this:               def RotateAxis(AnchorX,AnchorY,inputx,inputy, rAngle):         x = inputx - AnchorX         y = inputy - AnchorY         resultx = ((x * math.cos(rAngle)) + (y * math.sin(rAngle))) + AnchorX         resulty = ((x * math.sin(rAngle)) - (y * math.cos(rAngle))) + AnchorY         return (resultx,resulty)      However, even when I manually rotate the grid in ArcMap with the rotate tool, it provides the same results as the code. Furthermore, it seems like the actual extent doesn't wrap around these polygons. When you use the edit tool and click on the geometry you can see the outline of the extent. I've included another screenshot of this. (I did thicken the outline in the screenshot so it would show up better, its really faint in ArcMap.) I suspect this extent may have something to do with it, but again, I get the same issue even with manually rotated geometry. I have not found a way to create geometry that is rotated at the time of its creation. Grid Index Features only creates unrotated geometry and thus my work around in using Arcpy to rotate after the fact. **Edit 2 :** Just to add further clarification, all of the grids are different sizes and rotations, so defining a set scale and moving the dataframe extent will not work. The aspect ratio of them however is consistent. **Zoom to Layer - No Dataframe Rotation:** ![Zoom to Layer - No Rotation](http://i.stack.imgur.com/8aOTC.gif) **Zoom to Layer - 47 Degree Dataframe Rotation:** ![Zoom to Layer - 47 Degree Rotation](http://i.stack.imgur.com/XcTmR.gif) **Using Data Driven Pages using the Rotation Field:** ![Data Driven Page](http://i.stack.imgur.com/xxgcj.gif) **Rotated Dataframe (317 degrees) with Polygon Extent Visible:** ![Rotated Dataframe with Polygon Extent Visible](http://i.stack.imgur.com/M101u.gif)


title: How to Change Torque Map Slider Text

text: I am new to CartoDB and NOT a programmer. I am trying to make a simple torque map that changes by year and I do not want the slider text to include or display the month, just the year. Is this possible to do with little to no programming?.


title: Editing versioned view in ArcSDE 10.1 error

text: I am working in an ArcSDE 10.1 instance sitting on Oracle that I believe was upgraded from a previous ArcSDE version. It has a versioned view for the table I am trying to edit (specifically, delete rows). However, the views isn't called _feature_class_name_ _vw, which seems to be the naming convention for views generated in 10.1. Which makes me think that it was created manually in a previous version of SDE. This is the error I'm getting: > ORA-20025: State 118977 is closed. > > ORA-06512: at "SDE.VERSION_UTIL", line 2495 > > ORA-06512: at "DATA.V109_DELETE", line 1 > > ORA-04088: error during execution of trigger 'DATA.V109_DELETE' Originally, it was giving a **Not owner of state 0** error. State 0 is owned by SDE, so that makes sense. I created an edit session in ArcMap with the same user that I am executing my SQL as, and that generated a state in the DB with the correct user - but also the state is closed error I mentioned above. So it seems like it isn't generating a state when editing the view. Any ideas why this is? **RESOLUTION:** I asked our DBA to regenerate the versioned views and that did the trick.


title: R: Can raster predict function pass to predict.rfsrc (a prediction function in a parallel verion of RandomForest)?

text: It seems that raster predict function can pass to predict.randomForest by setting the "type='response'". I am using a parallel version of randomForest package called the "randomForestSRC" and I am hoping to pass the raster predict function to predict.rfsrc to take the advantage of the parallelization and low memory usage. Does anyone know if raster predict function supports this? Or if there is a way to use raster predict function to do this? Or does anyone know if there are any other packages that can predict a fitted model to raster data and have the ability to handle memory issues (since I am using huge satellite image data)? .


title: Creating polygons from points in Mapinfo

text: I have a huge number of points(co-ordinates), from which I am required to draw a polygon in Mapinfo. This required polygon is a square of 200m size. All I have now is the left side lower end of the polygon. Is there anyway that I can draw a square of 200m from this point automatically using Mapinfo MBX files? Your answer will save my day. Thanks in advance, Suresh


title: New Feature is not Displaying

text: I have a feature layer on my ArcGIS for Server. I am trying to add a point based on coordinates. With the code below, I do not get any errors, but the graphic nor feature is created or put into the geodatabase. I am sure it is something silly that I am not seeing. C#:                 public void AddPoint(string account_num, string name, string street, string city, string state, string zip, string latitude, string longitude)             {                 FeatureLayer featurelayer = MyMap.Layers["Customer"] as FeatureLayer;                          Graphic graphic = new Graphic()                     {                         Geometry = _mercator.FromGeographic(new MapPoint(Convert.ToDouble(latitude), Convert.ToDouble(longitude))),                     };                                    graphic.Attributes["PWSID"] = null;                     graphic.Attributes["CIS_METR"] = account_num;                     graphic.Attributes["CUSTYPE"] = null;                     graphic.Attributes["SIZE"] = null;                     graphic.Attributes["TYPE"] = null;                     graphic.Attributes["OTHTYPE"] = null;                     graphic.Attributes["MANUF"] = null;                     graphic.Attributes["MODEL"] = null;                     graphic.Attributes["YEAR"] = null;                     graphic.Attributes["TESTDATE"] = null;                     graphic.Attributes["MASTER"] = null;                     graphic.Attributes["MBOX"] = null;                     graphic.Attributes["MBOXTYPE"] = null;                     graphic.Attributes["PLACE"] = null;                     graphic.Attributes["STR"] = street;                     graphic.Attributes["CITY"] = city;                     graphic.Attributes["COUNTY"] = null;                     graphic.Attributes["AGENCY_CON"] = null;                     graphic.Attributes["CONTACT"] = null;                     graphic.Attributes["LAST_UPDT"] = null;                     graphic.Attributes["XY_SOURCE"] = null;                     graphic.Attributes["XY_ISSUES"] = null;                     graphic.Attributes["COMMENTS"] = name;                     graphic.Attributes["SHAPE"] = null;                               featurelayer.Graphics.Add(graphic);                     featurelayer.SaveEdits();                       }      I have set breakpoints and all of the data is coming in correctly, including the GPS coordinates. I also stepped through the code and could not see any issues. XAML:                <esri:FeatureLayer ID="Customer"                          Url="http://xx.xxx.xx.xxx/arcgis/rest/services/Calvert_City_Test/FeatureServer/2"                         MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"                          DisableClientCaching="True"                         OnDemandCacheSize="0"                         Mode="Snapshot"                         AutoSave="False"                         OutFields="*"/>      Here are also screen shots to prove the capabilities of the feature layer: ![enter image description here](http://i.stack.imgur.com/ktft5.png) ![enter image description here](http://i.stack.imgur.com/xytdR.png)


title: Comparison of geocoding solutions (such as Gisgraphy & PostGIS 2.0)

text: As I am sure many of you are aware, PostGIS has finally released Version 2.0 and included within this version they have also built a geocoder (see: http://postgis.net/docs/Extras.html). Although I realize V2 was just released I am curious to know if anyone has had the opportunity to compare other opensource solutions such as gisgraphy.com. I personally am interested in understanding the differences in terms of speed, features/options, accuracy, and the ease of being able to use ones own dataset(s). Thanks in advance


title: Please help me identify this CRS. How could I identify this myself in the future?

text: I'm trying to georeference this map, but I don't recognise the CRS. It is for a region of Tanzania. Here is the image on imgur in case Stack Exchange compresses the image. ![Protected area in Tanzania](http://i.stack.imgur.com/imhE1.jpg) How would I go about IDing this myself in the future?


title: problem with flexviewer

text: I need your help on flexviewer,when I want to test the flexviewer I describe the following path: "C: \ inetpub \ wwwroot \ flexviewer" on my default browser "google chrome" but an error mssage appears : "Fault code: InvokeFailed Fault info: Error # 2148 Fault details: null " I check the flash player plugin is already enabled for google chrome and I tried to see the solutions on the net without result. thank you for interested in my question.


title: Wrong projection high quality shapefile for the coastline of Helsinki region (Finland)

text: I did some spatial interpolations in R and I need a support for those. Looking for shapefiles online the best I could find was ![this](http://i.stack.imgur.com/ghlmy.jpg) and it looks really horrible, the same area in `ggplot` looks like ![this](http://i.stack.imgur.com/DVxsa.jpg). I spent a lot of time on this, to no avail, I found shapefiles with any kind of informations, but nothing that has a good definition of the shore. EDIT my code               rm(list=ls())     setwd("C:/Users/irene/Desktop/FIN_adm")     graphics.off()     Finland <- readOGR(".","FIN_adm0")     #OGR data source with driver: ESRI Shapefile      #Source: ".", layer: "FIN_adm0"     #with 1 features and 70 fields     #Feature type: wkbMultiPolygon with 2 dimensions          #prj file says GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]          setwd("C:/tesi/Rtoshiba/dati/3 downtown")     data44 <- read.table("ch44.txt", header=T)     head(data44)     locations<-unique(cbind(data44[,1], data44[,2]))     #plot(locations)          media.stat44=vector(length=109)     media.rssi44=vector(length=109)          for (i in 1:109){       temp<-data44[data44[,1]==locations[i,1] & data44[,2]==locations[i,2],]#location i       media.stat44[i]<-mean(temp$stat)       media.rssi44[i]<-mean(temp$rssi)     }          temp44<-cbind(locations, media.stat44)     xy <- temp44[,1:2]     df44 <- as.data.frame(temp44[,-1:-2])     SPDF44 <- SpatialPointsDataFrame(coords=xy, data=df44)               bbox = c(min(data44$lon), min(data44$lat),              max(data44$lon), max(data44$lat))          predgrid <- expand.grid(lon=seq(from=bbox[1], to=bbox[3], length.out=400),                              lat=seq(from=bbox[2], to=bbox[4], length.out=400))          aa<-as.data.frame(rep(NA,160000))       dimnames(aa)[[2]]<-"stat"     loc<-SpatialPointsDataFrame(coords=predgrid, data=aa)          ciccia44<-as.data.frame(df44)     dimnames(ciccia44)[[2]]<-"stat"     SPDFgri44<-SpatialPointsDataFrame(coords=locations, data=ciccia44)          stima44 <- idw(stat~1, SPDFgri44, loc, idp = 1.0, debug.level = 1)          library(raster)     rast44 <- raster(stima44)          f44<-as.data.frame(stima44)     # create spatial points data frame     spg <- f44     coordinates(spg) <- ~ x + y     # coerce to SpatialPixelsDataFrame     gridded(spg) <- TRUE     # coerce to raster     rasterDF <- raster(spg)     rasterDF     x11()     plot(rasterDF)          # setwd("C:/tesi/GIS_data/FIN_adm")     # #setwd("C:/Users/irene/Desktop/fi")     #      # Finland <- readShapePoly("FIN_adm1.shp")     # Finland     # #str(Finland)     # unique(Finland@data$VARNAME_1)     # Finland <- Finland[Finland$VARNAME_1 == "Etelä-Suomen lääni|Södra Finlands län",]     vv<-fortify(Finland)          #prova subset sia giusto     #x11()     #plot(vv[,1], vv[,2])          projection(Finland) <- CRS("+proj=longlat +ellps=WGS84 +no_defs")          elevation.sub <- crop(rasterDF, extent(Finland))          elevation.sub <- mask(elevation.sub, Finland)          x11()     plot(elevation.sub)     plot(Finland, add = TRUE)      I downloaded (between others) the shapefile suggested in the answer, selected the tile I am interested in getting ![this result](http://i.stack.imgur.com/ZWH5T.jpg) Code I used:               Finland2 <- readOGR(".","helsinki")               class       : SpatialPolygonsDataFrame      features    : 1331      extent      : 2704914, 2905588, 8392151, 8516090  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0      variables   : 3     names       : error, tile_x, tile_y      min values  :     0,    227,    283      max values  :     0,    228,    284      unique(Finland2@data$tile_x)     unique(Finland2@data$tile_y)      I select the tile I am interested into               Finland3 <- Finland2 [Finland2$tile_x == 227 &  Finland2$tile_y == 284, ]      And project it               Finland3<-spTransform(Finland3, CRS("+proj=longlat +ellps=WGS84 +no_defs+ellps=WGS84 +towgs84=0,0,0 "))          x11()     plot(Finland3)      Is the change of projection wrong? Because when I write `Finland3` I get:               class       : SpatialPolygonsDataFrame      features    : 742      extent      : 24.29866, 25.20134, 60.23717, 60.68294  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0      variables   : 3     names       : error, tile_x, tile_y      min values  :     0,    227,    284      max values  :     0,    227,    284       This map shows the tile I want, but the geocoding is wrong at least north- south. QUESTION:is the projection wrong????? EDIT AFTER NEW SHP I still get wrong coordinates, this ![tile](http://i.stack.imgur.com/Qm6R1.png) has extent (24.29866, 25.20134, 60.23717, 60.68294) (xmin, xmax, ymin, ymax) and if I check these on google maps they are not overlapping, but I need them to overlap my raster when I import I just do:               aa<-readOGR(".", "helsinki_wgs84")     unique(aa@data$tile_x)     unique(aa@data$tile_y)     aa3 <- aa [aa$tile_x == 227 &  aa$tile_y == 284, ]     Finland3<-spTransform(aa3, CRS("+proj=longlat +ellps=WGS84 +no_defs+ellps=WGS84 +towgs84=0,0,0 "))          x11()     plot(Finland3)


title: Determine 3 and 6 minute fire response times

text: I'm expecting to get an Excel file with data on previous fire and emergency response times. I was told it will have incident addresses and the response time for each incident (~ 12K incidents). I also have a street layer and an address layer. Some streets have speed limit data, some don't, although I can assign arbitrary values based on road class (collector, major arterial, local, etc.). Is this sufficient data to produce a map showing response times? Ideally there would be a city-wide map similar to what an outside vendor produced 5 years ago, which to me looks more like a sort of heat map. They'd also like maps for each of eight fire stations. They're sort of unclear on exactly what they want; they may not know. I think essentially what they want is a map for each station showing 3 and 6 minute response time zones based on their actual data. I could do a multiple ring buffer based on an average speed, but that doesn't take into account actual streets. All help appreciated, thanks. Running ArcInfo 10.0 sp5, have Network Analyst and Spatial Analyst, although a bit rusty on both.


title: Reporting Engines used with ArcGIS Server

text: I'm curious what others are using to build the more elaborate reports out of ArcGIS Web API apps? By elaborate I mean ones that include lots of dynamic charts and tables, multiple maps/data frames with legends on a single page, etc. Seems like historically Crystal Reports and SQL Reporting Services are mentioned. What about ReportLab? Or with the recent improvements in ArcPy in 10.1 is it possibly better to roll something out independent of a reporting engine?


title: How to disable polygon Label on the vertices (OpenLayers) in Edit Mode

text: I added the style on the polygon layer like so.               var style = $.extend(true, {}, OpenLayers.Feature.Vector.style['default']); // get a copy of the default style     style.label = "1233456 ha"     style.fillOpacity = 0.1     style.strokeWidth = 3     var styleMap = new OpenLayers.StyleMap({"default": style});     polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer", {styleMap: styleMap});      The polygon looks fine on normal mode. ![label on normal mode](http://i.stack.imgur.com/3DXsV.png) However, on **ModifyFeature** , labels are showing up on every vertex. ![enter image description here](http://i.stack.imgur.com/GbVbj.png) So, I test this http://trac.osgeo.org/openlayers/ticket/2176.               var styleMap = new OpenLayers.StyleMap(new OpenLayers.Style({             label: "${getLabel}"             // your other symbolizer properties here         }, {context: {             getLabel: function(feature) {                 if(mycontrolIsNotInEditMode) {                     return feature.attributes.label;                 }             }         }}     ));      Then the labels on the vertices are disabled, BUT the label between vertices are still showing up. how can I disable the labels between the vertices? Thank you..


title: Spatial index vs two coordinates indexes

text: I have a table with two columns: latitude and longitude. I want to get all objects inside a "rectangular" (well, rectangular in a lat/lon coordinate metric) bounding box: min-max latitude and min-max longitude. Basically that boils down to the following pseudo-SQL:               SELECT * FROM MyTable WHERE lat < :maxlat AND lat > :minlat          AND lon < :maxlon AND lon > :minlon      What's the best solution for indexing my table? A two-column index? Two indexes on the two columns? A spatial index? I would like to know if a spatial index is really needed in that case, as you need a special column, specific libraries, all that at the expense of database portability and simplicity. I can guarantee that I will perform only this type of spatial query. And I already have functions to compute the great-circle distance between two point (Haversine function), so I do not need a spatial-enabled database. As for crossing the Pacific, it's out of the covered zone (but could be easily handled by a small test that switch minlon and maxlon). Note: I'd like to keep this question database-agnostic, but for the sake of completeness I mention the fact that I'm working with PostGreSQL 8, w/o (for now) PostGIS.


title: Running a python script that will find fields that are not attributed

text: I have about 30 geodatabases with about 15 feature classes in each database. Is there a way to have a script check the attribute tables to see if they're not attributed? If it could then select the features that don't have attributes and export them to a gdb or shp. I want an easy way to check the tables for nulls that I could run nightly. Would a searchcursor work for this? Is this possible?


title: ArcSDE desktop license

text: I am using the ArcGISDesktop student license. I want to work on versioning and geodatabase replication. Is it possible to set up ArcSDE with the same license and work on versioning and replication?


title: Versioning geodatabases

text: I am trying to reconcile and post the edits. I would like to know if I can post the versions to two different parents. Could some one help me with c# coding on how to do this.


title: Looking for collaborative webmapping projects

text: I´m looking for `open source collaborative web mapping projects` which allow vector editing, wms display and other features like comments, photo-uploads etc. I´ve only found `Ushahidi` and `Sahana` so far, but I´m sure there must be others out there. If anyone has heard of anything, please let us know.


title: How to open or import .sdc files in QGIS?

text: I have some .SDC files i want to look at but i dont have arcview installed. is it possible? i couldnt even find a software that does sdc to shp conversion. any idea? i am using qgis 1.7.4 on both windows and linux, i googled to find a converting software with no luck. i think i am missing something since sdc is very popular and i could not find enough questions on this subject. thanks for the help


title: Open Layers Control Modification

text: function testPanZoom() {         console.log("test func");         var newPanZoom = new OpenLayers.Control.PanZoom();              OpenLayers.Util.extend(newPanZoom, {             onButtonClick: function(evt) {                 console.log("test button click");                 var btn = evt.buttonElement;                 switch (btn.action) {                     case "panup":                          this.map.pan(0, -this.getSlideFactor("h"));                         break;                     case "pandown":                          this.map.pan(0, this.getSlideFactor("h"));                         break;                     case "panleft":                          this.map.pan(-this.getSlideFactor("w"), 0);                         break;                     case "panright":                          this.map.pan(this.getSlideFactor("w"), 0);                         break;                     case "zoomin":                          this.map.zoomIn();                          break;                     case "zoomout":                          this.map.zoomOut();                          break;                     case "zoomworld":                          this.map.zoomToExtent(new OpenLayers.Bounds(380983.55914508,                                                                     6668932.8432267,                                                                     392057.98129392,                                                                     6674994.9886843));                          break;                     }             }         });         return newPanZoom;     }          map.addControl(new testPanZoom());      however it does not seem to work.The control is added but zoomToExtent for worldicon in switch case does not really change anything.Can you tell me whats wrong ?


title: Arrow flow lines from a contour map

text: using QGIS (or even GRASS) is it possible to label a contour lines shape with arrows that indicate the flow direction? Briefly: I have a point shape with elevation values. I make an interpolation map and then I extract the contour lines. Now how can I show the flow direction with arrows?


title: Problems serving GeoTiff using GeoServer and ImageMosaic

text: **Goal** :   I am trying to serve a large (1GB+) GeoTiff file using GeoServer and ImageMosaic. **Process** :   **iant** have written a simple guide for this, which he proposed as an answer for a previous and similar question. I have used his _gdal_retile_ example and this gave me a folder with lots of tiff files and 8 subfolders (1-8, level 1 having the most zoomed tiles and level 8 a small overview tile). I created an _ImageMosaic_ store in GeoServer 2.1.3 and pointed my URL to the folder containing the tiff files and the 8 subfolders. GeoServer then put 8 files in the same folder. I published my ImageMosaic store as a layer and when doing a preview inside GeoServer, Java just starts working and I don't know if it will ever finish. **What am I doing wrong here?**


title: With which gis technologies was Mapmyrun created?

text: www.mapmyrun.com is a fantastic online gis application which is slick, fast, reliable and full of interesting tools and functions. As a GIS developer myself, I am interested in looking into new ways to improve my own applications and utilize new technology (mostly opensource). Does anyone have any inside information about what goes on behind the scenes of mapmyrun? is this a pure googlemaps api app? Thanks for any replies, Robert


title: Where is Object Loader found in ArcMap?

text: I've only used the Simple Loader in ArcCatalog. **The documentation** also mentions an Object Loader which resides in ArcMap. Where do I find this?


title: QGIS Updating composer label text via python - problem with Item Properties panel

text: I am writing a plugin that replaces the text of a composer label based on its itemID. When I change the text of the label using: item.setText("Hello World") the label changes on the composer but the text in the Item Properties panel for the label doesn't, it stays as what it was originally. If I call item.displayText() before and after I change the label text this returns the correct information. How do I get the text to change in the Item Properties panel? Using qgis 1.8 and 1.9


title: Add polygons to existing shapefile in QGIS

text: I'm completely new to GIS and this is a very basic question about editing existing shapefiles. I am working off an existing shapefile which was digitized (by a colleague) so that polygons represent building cover. The shapefile contains information about the land use type and area. I am using QGIS to edit the shapefile. Now, I wish to add/remove/edit polygons to improve accuracy as the extent of building area has changed a lot recently. However, when I add new polygons into the shapefile (by digitizing it using an updated basemap), they are not added into the same polygon class as the earlier shapefiles, even though I input the right LandUse type (i.e. Buildings) in the attribute form. Each new polygon seems to create a new LandUse category, even though they're all namd "Buildings". How do I ensure that any new polygons I add are added into the same LandUse class (all previously created polygons are in this "Buildings" class)? Thanks in advance for any help on this.


title: What do I need to change to get scale bar units other than degrees?

text: Measurements done in QGIS on my project are done properly using whatever unit is set in: Settings > Options > Map Tools > Preferred measurements units but the scale bar decoration and scale bar in print composer are still degrees. My data is all NAD83. Previously answered questions state that it must be changed in project settings but I don't see that menu option in QGIS 1.80. How can I change settings so that my scale bar is in units other than degrees? EDIT 1: I don't have that option in the menu (are you using 1.80?), but I do have a button for 'CRS status' on the status bar. If I click that and change layer units to feet, which it indicates are only used when CRS transformation is disable, I get the following: ![enter image description here](http://i.stack.imgur.com/JgCQ2.png) As you can see, the scale bar measurement is completely off. I can change the CRS to other systems than use feet other meters and it's more accurate. Are there metric and imperial version of NAD83, WGS84, etc? If the measure tool can give figures in feet or meters when using a CRS with degree units, why can't the scale bar do the same?


title: Segmentation Violation in ArcView 3.1 while performing UpdateLegend

text: I am loading a ".avl" legend file into ArcView 3.1 and I am plagued with a recurring Segmentation Violation Error when I execute the updatelegend command in the theme. It looks like the legend file was successfully loaded (evidenced by the updated legend thumbnail on the theme name in the view), but the actual image in the view does not update. If I double-click on the theme and click the "apply" button in the legend editor, then it works no problem, but I can't get the code to work! The sample code is:               theView = av.GetActiveDoc     x = theView.GetThemes.Get(0)     theLegend = x.GetLegend          chk = theLegend.Load("C:\ArcView\Legend1.avl".AsFileName , #LEGEND_LOADTYPE_ALL)          if (chk) then             x.SetLegend(theLegend)        x.UpdateLegend           end      Thanks, -Louis


title: Embedded images in KMZ not shown on Google Earth for iOS

text:
I've created KMZs that work well in Google Earth. Their placemarks reference embedded images files like so               <Placemark>     <name><![CDATA[IMG_1288]]></name>     <Snippet maxLines="2"><![CDATA[]]></Snippet>     <description><![CDATA[
]]></description>     <Point>     <coordinates>174.812836,-36.826668,0</coordinates>     </Point>     </Placemark>      The KMZ structure is               doc.kml     images/            IMG_1288.jpg      The same KMZ file does not work on iOS though. The popup window opens but it displays a broken image icon. What do I need to do to embed an image in a KMZ so that Google Earth for iOS can display it?


title: How can I calculate elevation from relief?

text: I have an SDE Raster that displays relief, but I want to display elevation. How would I go about doing this? I would really appreciate any advice or direction on how to do this.


title: How to build a website or mobile app with a circular routing capability?

text: Hoping this is an easy one... I want to build a web/mobile app for a college project which allows the user to enter a start point and a distance to travel e.g. distance to travel = 6km and the site would then plot a 6km circular route which brings the user back to where they started without (if possible) backtracking on any of the route already travelled. I've been looking at Open Street Maps and Open Layers or Leaflet.js. I'm not sure if this explains it very well but I suppose the app might work by calculating a 3km "end" point with a 1.5km waypoint on the east and a 1.5km waypoint on the west. Prefer to use open source technology. I'm new to this so appreciate advice. Thanks!


title: how to make decent sense from scattered river depth measurements

text: I sampled river depth at scattered positions and I want to be able to make a map and GIS layers out of it. My problems are:   1. As the river meanders the interpolation I do in scientific packages i,e. matlab generates values in points where there is no river therefore when I create a KML file out of it, it covers land areas. Does QGIS/GRASS have a better solution for that?   2. My GPS points accuracy of ~3m 90% of the time. Do I need to do any filtering for location?


I can't seem to find a tool to merge files from the active TOC into one file... The datamanagement --> Merge Shape files only allows you to choose a directory of shapefiles to merge which is really inconvenient as you then have to place only the required files in one directory etc or use the "select by layers" and then choose files which is a pain if the files are in multiple directories. The Geoprocessing Tools --> Difference on the other hand just lets you choose files from a drop down of files in the TOC. This is so much easier. Is there a version of merge in QGIS that works like "Difference"?


title: Problem loading KMZ in Google Earth API

text: I am building a Google Earth API application using a map service (using ArcGIS Server 10) that has KMZ/KML capabilities. For some reason, I am able to access the KMZ layer within our network. But, does not work outside our network. I am loading the KMZ file using the fetchKML method: google.earth.fetchKml(ge, IMG_URL_TO_LOAD, finished_and_visible); I am using IIS7 as the web server and have added MIME types for both KMZ and KML. Any suggestions to what might be the problem?


title: How to export a raster layer for external processing?

text: Is there a way to export all values from a raster to for example a cvs or other textfile or dbf or xls and later import (changed) values from that file back into the raster? For vector-files this is no problem but for raster-files I have not found anything like this. (Important here: the export-file should be a table, not a grid). The idea is to process raster-data with some external program like excel of statistics-software, to add channels (=columns) based on the data already there or create a new channel by linking data with data from a table. All this can be easily done for vector-layers but apparently not for raster-layers. THX, stn


title: display GeoReferencing image through MapServer

text: I have a tiff image and got the world file which contains the needed information for GeoReferenceing, how to start add this image on Mapserver ? if I use C# and use GMAP API to call the google server through internet to show map. how to add this map with correct coordinate on it ? if I have to replace this API to have a local map server to use, it is ok as long as I still can use the new mapserver and API with C# windows application. any suggestion? I have many times add similar to this question but all people answer to use GDAL, but I think GDAL to get the needed information which is already having them in the world file ?


title: How do I install mdenoise?

text: How do I install mdenoise in GRASS 6.4.3? I've already successfully installed r.denoise, and have downloaded mdenoise from wget http://www.cs.cf.ac.uk/meshfiltering/index_files/Doc/mdsource.zip. How do I proceed now?


title: Map Boundaries in WP8

text: How to set boundaries for the Map Control in WP8? So that the user cannot pan over those boundaries. I also need to set min and max zoom level.


title: Using SRTM data, how to get the coordinates of the peaks visible from a location?

text: Using SRTM data and a coordinate-altitude database of the peaks, I want to get the coordinates of the visible peaks from my location. I want to make an application similar to this. How is this possible? I have to calculate the viewshed offline, because up in the mountains there is no internet connection. The view shed analysis could be done only with ArcGIS software or there is another API too? The application will be developed for IOS.


title: Which topics are fundamental for ArcGIS?

text: Similar to Which topics are essential for a crash course in QGIS?, **which topics are fundamental to ArcGIS?** Basic through advanced topics are welcome. Should be freely accessible to all. This is about ArcGIS because it seems better and easier than QGIS (I could be wrong and have to do more research, but no questions on this site has a basic answer to that).


title: ArcGIS Field Calculator Python numbering rows of fishnet

text: I have a grid of 100*100 cells. I want to add to each cell a number representing the row it is in (like in excel). I added a field and want try to solve that with field calculator: The code is something like this:               def test( OBJECTID ):           if OBJECTID > 0 and OBJECTID < 101:          return 1           elif OBJECTID > 100 and OBJECTID < 201:          return 2           elif OBJECTID > 200 and OBJECTID < 301:          return 3           elif OBJECTID > 300 and OBJECTID < 401:          return 4           elif OBJECTID > 400 and OBJECTID < 501:          return 5           elif  OBJECTID > 500 and OBJECTID < 601:          return 6           elif  OBJECTID > 600 and OBJECTID < 701:          return 7      This works good, however I want to automate it a little bit. The return value shall automatically be counted to the next number. I tried to solve this with autoincrement. Though it adds a number per cell and not per row. Any ideas how to solve that? Meanwhile I figured, that the cells of each row have obviously the same coordinates and with the help of another guy I have now this code. However I receive only NULL values for the fields. Any ideas what is wrong               def test( X_KORD_ED ):         var = 0         old_i = object()               for i in X_KORD_ED:              if i != old_i:                 var += 1                 old_i = i             yield i, var


title: Is it a bad idea to use a geometric network for road editing?

text: I am producing a road map (for print and online). I was thinking of using creating a geometric network with my roads, for editing purposes mainly, but I would like to know any critical downsides of selecting this strategy. This is why I turn to You. All the examples I can find on the web (including Esri) are utility related -- either power, water or sewerage. So, if this concept is created with those in mind, is it useful for road editing too? The reasons I find geometric networks attractive for road editing are:   * Excellent editing features.    * Automatic clipping of existing segments, when a new segment is drawn to them.    * Existing annotations and representations are not lost, when a new road is added -- the automatic clipping preserves annotations and representations. The Planerize tool loses annotations and representations.    * Lightning-fast identification of disconnected road segments.   * Fast identification of dangles (send by analysing for loops   * On-the-fly validation of new features. This far, I have identified following downsides:   * Closed line features are not allowed    * Roundabouts are really hard to create without the Circle drawing tool (following the above mentioned limitation).    * Not being able to have a topology within the same featureclass.  Are there any critical issues that should prevent me from using geometric networks?


title: How to show a point on mouse over a hidden polygon?

text: Any suggestions on how to show a point on mouse over a hidden polygon? A single kml file contains two polygons and two points as in the image, I've hidden these polygon and point by setting stylemap fill color, is there any way to show the points on mouse over the hidden polygon. Any guidance and help is appreciated. ![kml layer](http://i.stack.imgur.com/3LgIe.png) Thanks in advance.


title: Why is my raster offset after I use a tool such as Reclassify?

text: I'm using ArcGIS 10.1 and have noticed a strange problem. Often,though not always, when I use a tool such as Polygon to Raster, Reclassify, or Mosaic to New Raster, the resulting raster layer is offset just a bit- either it's too high or low by about half a pixel. The projection is exactly the same, the layers just don't quite line up. The strangest thing is that it doesn't always happen. Anyone else run into this problem or have a solution? Thanks so much!