Disadvantages to ESRI Plug-In Data Sources

I wanted to know what disadvantages ESRI plug-in data sources have when compared to custom layers. I am looking to implement a fairly large (in terms of average dataset size) read-only custom type for ArcMap and ArcScene. I have read the chart here. I was wondering if there are any other disadvantages or major issues with plug-in data sources. In particular, has anybody experienced issues related to performance, integration and interoperability with the Desktop tools, or any other significant issues?


error GT_PK_METADATA doesn't exist

I keep getting this error message in the Postgres error log. STATEMENT: SELECT * FROM public.GT_PK_METADATA WHERE 1 = 0 ERROR: relation "public.gt_pk_metadata" does not exist at character 15 I'm looking something about this but I didn't find. How to fix it? My set: GeoServer 2.4.4 + Postgres 9.2 + PostGIS 2.1.0


How can I add a Torque layer using createLayer instead of createVis in CartoDB.js?

I have two tables in CartoDB, one is a fixed layer with locations of restaurants in a city. The other layer has data about the locations where police had to go because of fights for example (say 112 calls) that happened in the city during a one year period. Because I want to create my own basemap I have been using the `createLayer` function in CartoDB.js to display the restaurants. This works fine. But next I want to add a Torque map of the 112 calls on top of this. However, when I do finally get the Torque map to work, the other layer of the restaurants is no longer visible. What should I do to make both layers visible? Below a short version of the code I am using now, which only shows the Torque layer (also, in this version there is no time slider visible, which I hope will become visible once I get both layers working):               // initiate leaflet map     map = new L.Map('map', {          center: [0,0],         zoom: 11     })          // load the base map     L.tileLayer(mapURL, {         attribution: '...'     }).addTo(map);          var CARTOCSS_TORQUE = {...};     var torqueLayer = new L.TorqueLayer({                 user       : 'username',                 table      : 'table_name',                 column     : 'column',                 countby    : 'count(cartodb_id)',                 resolution : 2,                 steps      : 300,                 blendmode  : 'multiply',                 animationDuration: 90,                 map: map,                 cartocss   : CARTOCSS_TORQUE             });          cartodb.createLayer(map, layerURL)               .addTo(map)               .done(function(layer) {                   ...make a small SQL query change...               })               .on('error', function(err) {                  console.log(err);               });          torqueLayer.addTo(map);     torqueLayer.play();      Thank you for any help!


Drawing Curves/Bezier Lines with ESRI WPF Runtime

I'm looking for some pointers on how to draw a curved line or bezier line in WPF runtime. The WPF runtime sample application has a drawing mode for straight line, polyline, and freehand. However, no curve or bezier. Here is **an example in Silverlight** , so it seems like it should be possible in WPF as well. ... Here is **the page describing the app as well as source code download** : ... I haven't had a chance to do a deep dive into the source code yet. It looks somewhat complicated at first glance. P.S. I do have an ArcObjects engine runtime license available as part of my solution as well - just in case a hybrid solution would work.


How to install grass addons when offline?

Can anyone tell me how can I install GRASS (v.7) addons on a windows PC when offline? I manually downloaded the files from http://svn.osgeo.org/grass/grass- addons/grass7/ and copied: \- the .py file to ...\GRASS GIS 7.0.svn\scripts \- the .html file to ...\GRASS GIS 7.0.svn\docs\html But the GRASS GUI does not recognize them.


Using a field to define label font size in MapInfo?

I have a tab file of ordnance survey MasterMap data, this was obtained from a client so I have no way of re-downloading it. Usually when I have these files the text is automatically displayed according to a number of fields (e.g size, angle etc.). However this file I have everything is displayed as lines. I have used style override to remove the lines and have turned labelling on. However each label has the same text size and makes the map quite unreadable when zoomed out to the level I require. Is there any way in MapInfo to set the font size/height to that defined in a field in the table for the data? Thanks, Alan


Identify tool (attribute pop-up)

I hope this isn't too basic of a question... I'm using ArcMap 10.1, and upon bringing in a feature class, the identify tool window shows the attributes in alphabetical order of the field headings. I didn't try to do this and haven't touched any settings. Is there a way to make them display once again in the order that they were created (as they still are in the att table)?


How to get correct area calculation using Google Mercator?

i use QGIS with openlayers-plugin and i´ve loaded google satellite as a layer. what i want to do is making a shape-layer (polygon) with the goal to get the area values of the polygons. i´ve activated on-the-fly-transformation and chosen Google Mercator (EPSG:900913) for the project and the shape-layer. If i compare the values of the measure line tool in qgis with the one in google earth (desktop version) to make a rough estimate, i get two different values. they are same if i activate ellipsoidal on the measure line tool in QGIS. The area calculation takes places with ellipsoidal deactivated, so the area result in the attribute table is wrong. I know that the values of google earth are correct. Does someone know a way to get an correct area calculation of the polygons?


How to create labeling similar to this map?

Any ideas on if ArcMap is able to create labeling similar to this map? Ie. 95xx or 9500 is listed outside of the units and the the actual last 2 digits are listed within so that each unit does not have 4 digits labeling inside? ![enter image description here](http://i.stack.imgur.com/uJfHk.gif)


Calculate area covered by a particular raster layer within polygons in QGIS

I am trying to extract information on vegetation cover within a set radius of point locations (my sites). I have succeeded in creating a new vector layer of circles with a 5 km radius around my sites. ![enter image description here](http://i.stack.imgur.com/MKjEL.jpg) What I want to do is calculate the amount of vegetation cover within each of these circles (and therefore, within a 5 km radius of my sites), which I have as a raster layer. I would like to extract this either as a direct measurement of land cover (e.g. metres squared), or even just a percentage of the 5 km radius circle/polygon that is covered by the raster layer of vegetation (because I could then calculate the land cover from that). I am aware that the LeCos plugin can somehow do this, but I have not succeeded in installing this (subject of another question I have posted) and was hoping there might be another way. I would be open to trying this in R if someone can point me in the right direction ( I am a user of R for statistical analysis but haven't yet tried it for spatial analysis). Many thanks in advance! I have appreciated many, many posts on this forum throughout my use of QGIS.


How to modify single Pixel values in QGIS?

I would like to modify a raster (pixel values) in QGIS. The plugins "value tools" can easily provided me with the value of the pixel of my raster. However I know know how to modify it. I have found this tread saying it is possible to do it in Grass. thread I'v spent several hours on trying to understand how grass works. To complex for me... Is it possible to access the _d.rast.edit._ tool from another way ? (can't find it in the sextant plugin. Thank you for your help.


what is the general solution for collecting POIs

Most of our job is to collect data including POIs, roads, and etc, and then process these data using ESRI ArcGIS platform or something else, finally create map for client. Now we meet some problem for the collecting of POIS, since these kinds of data may change frequently, we have to update them accordingly. And now we collect all the pois manually, I mean we hire some guys, one for one area, then they will collect the infomration of the pois inside his area, for example, take a photo for the place, register the street name,number and photo, website(if any) and etc. But it will cost much time to do this complete manually, so I wonder if there are any automatic collecting solution or research? ========================================= Update: 1 What kind of data do we need? Generally speaking, POIs. For example the restaurant,pub,fast_food and etc, we need the know the address,street name, number. 2 What do we want to improve? We now collect them all manually, take me for example, I will go to the pub directly, record the long/lat, take some photos, got the photo or website from the service guy of the place. Then go to another place. After this original data are collected, we will import them by the GIS paltform(ESRI or something else), then we will draw them at the map one by one, and add the attributes if any(like phone,photo and etc) Note, the attributes are not all required, and some of them can be recognized from the photo(Like the exact name and type of the place,). This is rather slow if we have a large area to update. So we wonder if there are any devices can improve this. For example, we can drive along a street with a camera, then we can take photos for the places along the street, then we get all the required attributes like geographic position,name,type from the photo, and draw them ....


Why does ListLayoutElements give IndexError: list index out of range?

When trying to create a legend on ArcMap use the following Python/ArcPy code I received an error message:               import arcpy     mxd = arcpy.mapping.MapDocument(r"E:\cities\MyProject.mxd")     df = arcpy.mapping.ListDataFrames(mxd)[0]     lyr1 = arcpy.mapping.Layer(r"E:\cities\cities.shp")     lyr2 = arcpy.mapping.Layer(r"E:\cities\region.shp")     lyr3 = arcpy.mapping.Layer(r"E:\cities\lakes.shp")     lyr4 = arcpy.mapping.Layer(r"E:\cities\rivers.shp")     legend = arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT")[0]     legend.autoAdd = True     arcpy.mapping.AddLayer(df, lyr1, "BOTTOM")     arcpy.mapping.AddLayer(df, lyr2, "BOTTOM")     arcpy.mapping.AddLayer(df, lyr3, "BOTTOM")     arcpy.mapping.AddLayer(df, lyr4, "BOTTOM")     legend.adjustColumnCount(2)     mxd.save()      and I get this message :               Traceback (most recent call last):       File "E:\cities\scripts\Lgend.py", line 8, in <module>         legend = arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT")[0]     IndexError: list index out of range      What does this indicate?


Shortest path plugin error in QGIS 2.2

We are having a problem with the Shortest path plugin in QGIS 2.2. In the configuration screen it does not appear our layer as a selectable layer, so no computation can be done. Is there anyone else having problems with this plugin? It works fine in QGIS 2.0 with the same input data. Thank you very much for your help


How to use ModelBuilder to add many images to mosaic dataset?

Here is my sample of a model builder. ![enter image description here](http://i.stack.imgur.com/WuREl.png)What I would like to create a mosaic dataset then add lots lots lots lots of imagery from different folders to the dataset rather than I have to do manually. What I would like to run tool to add the imagery to the dataset and when it is done then change to another folder and keep adding more imagery without having to stop the process builder. Is there a tool to do that or should I need to create a variable ? There are three folders that hold imagery and there are three sub-folders as well. You can see why I am trying to build three different names: Columbus, El Paso, and Playas Valley because it is where they hold the imagery.


How to set PYTHONPATH in OS X to use PyQGIS?

I am trying to use PyQGIS in custom applications. I am on Mac OS X 10.9 with QGIS 2.0.1-Dufour. I know I have to set the the `PYTHONPATH` environment variable. This is the path to QGIS on OS X: `/Applications/QGIS.app/Contents/Resources/python/` My current `PYTHONPATH` is the following:               $ echo PYTHONPATH     PYTHONPATH      Next I tried to export the QGIS Python path:               $ export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python     -bash: $: command not found      Then I tried it with `sudo`:               $ sudo -s export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python      This worked. But when I check my `PYTHONPATH` again it is the same as before:               $ echo PYTHONPATH     PYTHONPATH      What steps am I missing in order to set the `PYTHONPATH`?


Determining which "color" each image band represents?

I have a satellite image that has a few bands in it. But I don't know what colors they are supposed to represent, nor do I know where to look for this information--the file's metadata say nothing about this. Is there a way to determine what color each band represents? How can I find out which band is red, blue, NIR, etc.?


GDAL TIF to JPG Creates Dark Image

I'm using the GDAL Raster>Translate to create JPGs from Georeferenced TIFs. The translation is working, but the resulting JPGs are significantly darker than the TIFs they are being created from. Here is a screen shot showing the difference in brightness: ![enter image description here](http://i.stack.imgur.com/jUcXT.png) Anyone know why this is happening and (more importantly) how I can fix it? Thanks!


Where to find Metropolitan Statistical Area (MSA) KML data?

Hello GIS stackexchange, GIS is not my field, so I apologize if my question is very basic. I need this data for a odd job at work. I have been unsuccessful in finding the data from Google FusionTables but found (what I believe to be) the shapefile for MSA's from the US Census on the US Census site Is there an easy way to convert this file to KML polygon data? I have tried QGIS but it seems to throw an error when I save the Layer as a KML file type. Alternatively, is there any place I can simply find this polygon data? Thank you all very much for any help! I have been pulling my hair out trying to figure this out. EDIT: Here is the error text I receive from the QGIS: "Export to vector file failed. Error: creation of data source failed (OGR error:Failed to create KML file polygon_data.kml.)" **EDIT2: Big thanks to mtn.biker for successfully creating the file for me. Mtn.biker outlined their process in the comment below if anyone else runs into this issue.**


Extract Overlapping Polygon Data to Points

I have a polygon data set of corn yield collected by a combine. However, as the combine drove through the field, there was slight overlap between passes, leading to overlapping polygons within the same shapefile. I also have a point dataset of sampling sites within the field. Occasionally, these points fall on locations where two polygons are overlapping. At each point, I would like to extract the value from whichever polygon has the higher yield. ![enter image description here](http://i.stack.imgur.com/Jos2M.png) I've thought of two ways to do this:   1. If I can extract the values from both polygons to the attribute table, I can process the data in Matlab to get the maximum. However, most of the points are entirely contained within one polygon. I've tried doing a 'Join by spatial location' but because the polygons are in the same layer, it will only join one of the two records.   2. Create new polygons for all the overlapping areas and then use join to extract the data.This example from Grass seems to do what I want, but I don't know how to do the behind-the-scenes programming. Is there a built-in function of Arc that can do the same thing? I am using ArcMap 10 with spatial analyst. There are hundreds of polygons overlapping, so I'd like to use some sort of automated extraction. Thanks in advance!


dynamically aggregate data based on user input and create KML to be displayed on map

I want to dynamically aggregate data based on user input (basically firing a sql on my database ) and create a dynamic KML file out of that and display it on google map using their java script API . How can i achieve this . Note :All of my data is either on private cloud or in house ,initially i thought of exporting some of the data of my use (for aggregation purpose) to fusion but got lost on how to achieve my end target .


Runtime error <type 'exceptions.TypeError'>: 'unicode' object is not callable

I'm working on a script to replace a layer datasource, and I'm getting an error I cannot figure out. When I run the following code in a python window inside ArcMap, I get a "Runtime error : 'unicode' object is not callable"               import arcpy     mxd = arcpy.mapping.MapDocument ("CURRENT")     for lyr in arcpy.mapping.ListLayers(mxd):          if lyr.supports("DATASOURCE"):              if lyr.dataSource (r"N:\3_PLANNING\6_GIS\GIS Data\INDIANA GIS\Indiana_County.mdb\Boundaries\Indianacounty_shp"):                  lyr.replaceDataSource (r"N:\3_PLANNING\6_GIS\GIS Data\Indiana_County_Database_201201.gdb", "FILEGDB_WORKSPACE", r"N:\3_PLANNING\6_GIS\GIS Data\Indiana_County_Database_201201.gdb\Boundaries\County_Boundary")      Problem is, I'm not very good at python yet, and I'm not sure what the unicode object is that the error is referring to.


What is the best way to create polygons on a map and download files associated with the polygon?

My client wants to build a tourist site and for that he wants a backoffice for the map and the ability to draw polygons on the map (that user can see). When the user clicks on a polygon, he gets a list of files he can download (pdf , images etc...) I'm using OpenLayers as a map client and haven't decided on the server side yet (probably GeoServer). What is the best way to plan this? To where should I save the polygons and file list (shp file ? database ?) thx


Trying to combine nearby points into a polygon

We have collected millions of cell phone strength readings. I am trying to group points of the same strenght that are within a distance of each other in to a polygon. I asked on the postgis mailing list but didn't get a response. To make the process simpler, I already extracted all the point of the same strength to one table. So I have a table of 1.5 million rows. It has a gist index on the geom field and btree indexes on the uniqueid of each row and on the 'clusterid' which is supposed to be the same for all points that are in the same 'cluster' (ie point a which is within distance of point c which is within distance of point z would all be the same cluster). How would you accomplish this task??? I did wonder whether it might be worth trying to load the geometries in to memory and use JTS to process them? Although I doubt that would be any better. Thanks - Bryan.


Road graph tool crashes, but works with sample shapefile

When I try to calculate the distance between two points using the "Road graph" plugin in QGIS (1.8.0-2, on OSX 10.8.2 ML), QGIS just crashes. It does work with the sample shape file from http://manual.linfiniti.com/en/vector_analysis/network_analysis.html I'm sure it's a problem with my shapefile, but I can't see why it won't work. Even if I extract one single line as a new shapefile, it still crashes (program closes itself). Any ideas? Thanks! EDIT: "QGIS quit unexpectedly Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple. Ignore / Report... / Reopen" ![enter image description here](http://i.stack.imgur.com/wpnpy.png) EDIT2: Info from the .prj file: > > PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] Filenames: gsk3c_ruhr_gew_line.sbn gsk3c_ruhr_gew_line.sbx gsk3c_ruhr_gew_line.shp gsk3c_ruhr_gew_line.shx Plugin settings are the default (do work with sample shape file)


Learning to think spatially rather than just follow point and click tutorials

The college I work for is considering revamping their intro to GIS course. Traditionally, they've used the ESRI suite but are now open to using other options. There are two factors responsible for the desire to make a change:   1. The text book provided by ESRI. The instructors feel that the point and click tutorials don't teach the students how to think about GIS but rather how to use ESRI software. They'd like to have something that's more than a manual and that won't be out of date by the time they arrive.   2. Traditionally graduates could expect jobs from either the Territorial Government or Parks Canada (both of which use ArcGIS), but with recent gov't cut backs these two are no longer the main destination for graduates. After consulting with industry representatives the college has been told that they should be training student to "think spatially" rather how to use just one type of software. Are there any resources the SE.GIS community would consider helpful for developing GIS thought and instruction (rather than tutorials)? And if you were going to commit to teaching with one program/suite which do you think would be most useful to learn such that the skills learned would be most broadly applicable to GIS software in general? Thanks.


QGIS: when using composer to save as image the image has a shift of about 50m

im using qgis 1.8.0; i have two layers turned on, 1 the google earth hybrid layer from the open layers plugin and a shapefile of my own making. i set on the fly projection and everything looks spot on in the active window. when i got to composer everything still looks good. its only once i have saved the image (exported) that there is an issue. i think i read about this earlier but i cant find the answer to it anywhere. i can't remember if it has to do with on the fly projection or not... it seems rediculous that the composer doesnt just "print the screen" of whats displayed there. anyhelp would be great, shapefile is located here on the fly projection is utm 50s or epsg 32750 cheers simon


How to get correct scale values?

The scale of my map is wrong, no matter what coordinate system I use in my project. The map and all objects show the correct coordinates but the scale of the map shows nonsense and the measurement tool gives wrong dimension. The map should be like 1:10000 but qgis shows 1:1. Anyone an idea?


How to use IRelationalOperator2 and GeometryBag

I want to use the IsNear method of IRelationalOperator2. The documentation says that GeometryBag supports the IRelationalOperator2 interface. But this just doesn't work and results in an exception _"... unable to cast COM object ... No such interface supported..."_               IRelationalOperator2 relationalOperator = (IRelationalOperator2)geometry;      The same code works fine with IRelationalOperator but there is no IsNear method:               IRelationalOperator relationalOperator = (IRelationalOperator)geometry;      What is wrong - the code, the documentation or is it a bug? "geometry" is a geometry of geometry type _esriGeometryBag_ and contains some polylines. I used the straight cast to get the .NET exception.


How to compile mapfish in Debian?

When compiling mapfish I can't help but notice the quickstart instructions on the home site are not very good and have led to broken results so far. Any one able to clarify the steps? for instance when running the patch script should I save to any particular directory? the follow on command lines, should they be run in the same terminal window? as root? what are paths that need to be set on a debian system? That and broken links and the use of $ and # in the scripts without background explanation of use in a terminal emulator and system specific intructions makes me wonder if mapfish is ready for prime time. Thanks for any help * * * Here are the instructions I can only post 2 hyperlinks Usually if I can't build from instructions on a website it's because the documentation is not so hot, I'm not a CS major but I have a decent amount of linux experience. http://trac.mapfish.org/trac/mapfish/wiki/HowToInstallMapFishWithPip http://mapfish.org/doc/2.2/installation.html Thanks Lewis * * * The problem is I've used both shells and I've pasted in the commands they supply (which include the # or $ symbol) I didn't use the symbol, just let the shell supply the character and the commands didn't correctly execute. The python environment from running the download script does not have a clean way to exit the shell after the compile runs, has a bunch of > which looks like pico or some other text editor running off the shell. Makes sense as the download is text. the (env) $ case is not returned on the next line as per the instruction set. I've tried the virtual env as well and the problem always ends up being at the $ source env/bin/activate "install MapFish" (env) $ pip install mapfish"" the first line when run does not lead to a (env) $ case being returned at the beginning of the line.


Where can I set the BufferColor property for labels in QGIS?

The accepted answer to this question suggests that the buffer color can be set as a data defined label property. However, in the Layer Properties > Labels > Advanced tab, the only options I can see for the buffer are size and transparency. How can I set the BufferColor property?


QGIS define hexagon area around mapped points

I am using QGIS to map a number of radio antennas (for mobile network). Once I have the layer of the sites (done), I would like to assign to each site a coverage area (envelope). I could achieve that using the "fixed distance buffer" function of fTools However, I couldn't make the envelope have a Hexagon shape. When I specify the number of segments: 1: I obtain a square 2: I obtain an octagon ... How can I do to have a Hexagon? Thank you


Spatial difference with vector functions

I have 2 shapefiles, 1 municipal boundary, 1 x properties (3000 Geomertien) I would like to form a spatial difference, this unfortunately does not work with the vector functions of QGIS. thank you very much Sorry for my english


OpenLayers - Add points at vertices of line while drawing line

I would like to create points while I draw a line on my map in OpenLayers. That is, at each vertices of a line and at the end points there is a shape like a square, circle, or diamond. I have this partially working. I can add points at the vertices of a line while I'm drawing it but they are one off. The point/shape doesn't render at the beginning of the line but at the second point in the line as you can see below. Also, the end of the line has two points/shapes; you can't see it since they are stacked. ![enter image description here](http://i.stack.imgur.com/qedoe.png) Here is my code that adds the point/shape as I'm drawing my line (see the `point` callback in my `DrawFeature` control setup).               var path_control = new OpenLayers.Control.DrawFeature(          vector_layer,          OpenLayers.Handler.Path,          {               callbacks: {                    point: function( point ) {                              console.log(point);                              point_collection.push(point);                         var feature = new OpenLayers.Feature.Vector( point );                              vector_layer.addFeatures([feature]);                         vector_layer.redraw();                         }                    }          }     );      `console.log(point)` gets called at all the correct times. When I output my `point_collection` variable that I setup to figure out what is going on, the points are different than those output by `console.log(point)` from with the `point` callback. I have a feeling that it has something to do with when I'm actually adding the points to the vector layer but can't figure it out.


Can HTML annotations be autogenerated for each location in QGIS 2.4

Can HTML Annotation Boxes be autogenerated on the whole map, linked to locations, and always have the same html file loaded for all of them?


GRASS GIS v.in.ply

I'm trying to import a .ply file from MeshLab 1.33 into GRASS GIS 7.0 using v.in.ply addon, but I get the error message: ERROR: List index must be integer, is uchar This appears to be referring to the faces element of the file: element face 50000 property list uchar int vertex_indices property list uchar float texcoord example data: 3 18598 18744 18713 6 0.376742 0.28305 0.376685 0.279639 0.378521 0.280493 It appears to be reading the 3 references to the vertices (further up the file) as uchar not integers. Yet they are integers and a scan of the file doesn't find anything else popping out. Anyone got any experience of importing .ply files to GRASS, I'd very much appreciate some advice. Thanks in advance Andy Bates


Is there a recomended method for symbolizing inland lakes, streams and rivers in a topographic map?

I produce a lot of maps with inland lakes, rivers and streams overlaid over a dem surface symbolized with a color graduation (green for lows and brown for higher elevations) I also use a semi-transparent shaded relief to enhance the terrain. I have a standard blue color I often used for both lakes and streams but I noticed that **sometimes** the hydrology does not stand out enough. I experimented with outline for the lakes and with dark and light blues but nothing seems to work for every map. Can someone recommend a good color/method for symbolizing lakes/streams/rivers? Is there a generally accepted standard theme for symbolizing lakes/streams/rivers? (Ontario, Canada)


Change annotation font size on a IGeoFeatureLayer

I would like to change the font size for the annotations on an IGeoFeatureLayer. I tried to set it in the lpLabelEngine.Symbol.Font.Size below but the set doesn't persist.                    IGeoFeatureLayer geoLayer = thisLayer as IGeoFeatureLayer;                 if (geoLayer != null)                 {                  geoLayer.DisplayAnnotation = annotationsOn;                 IAnnotateLayerPropertiesCollection propertiesColl = geoLayer.AnnotationProperties;                 IAnnotateLayerProperties labelEngineProperties = new LabelEngineLayerProperties() as IAnnotateLayerProperties;                 IElementCollection placedElements = new ElementCollectionClass();                 IElementCollection unplacedElements = new ElementCollectionClass();                 propertiesColl.QueryItem(0, out labelEngineProperties, out placedElements, out unplacedElements);                 ILabelEngineLayerProperties lpLabelEngine = labelEngineProperties as ILabelEngineLayerProperties;                 if(geocode != null) lpLabelEngine.Expression = geocode;                 if(annotationLabelColor != null) lpLabelEngine.Symbol.Color = annotationLabelColor;                  labelEngineProperties.AnnotationMinimumScale = minScale;                 labelEngineProperties.AnnotationMaximumScale = maxScale;                     if (fontsize != null) lpLabelEngine.Symbol.Font.Size = Convert.ToDecimal(fontsize);      Any ideas? Thanks. ArcEngine 10, C#, VS2010


How to design a bus station query database schema?

We have bus station data, and we want to build an application which will provide the line/multiple line for a given start station and the end station. For example user try to get a bus line suggestion from station1 to station2. If there is a bus line which can cover both `station1` and `station2`, this line should be returned. The result may look like this:               Step1: station1 -- station2      If there is no direct bus line between station1 and station2, then the application should try to find the exchange plan,for example, the result may look like this:               Step1: station1 -- exchangestation          Step2: exchangestation -- station2      Now we have the data, but we do not know how to design the data model in the database, how to create the schema to make the query efficient? ============================================= Update: ![enter image description here](http://i.stack.imgur.com/mQsTD.png) For example, I have four bus lines(actually two) each with a different color:               l1: A-B-C-D     l2: D-B-A (in fact, the l2 is the reverse of l1 except the l2 will skip station `C`.     l3: E-B-D-F     l4: F-D-B-E(reverse of l3)       Now if we want to save these information in the database to query the bus line plan for given one station to another, then how many tables do we need, and what should be put into each table ?


OpenStreetMap is more technical than many people think

I have been asked to write an article on the above topic. I am writing on   1. Quasi topological data format   2. Incompatibility with OGC standards (WMS vs mapnik, WFS vs overpass, SLD vs mapcss)   3. Closed nature (you require different tools to process data)   4. Attribute model (hstore model) Is there something i am missing? and are there already such articles.


Identify what projection this Australian map uses?

Im looking to put **this map** into google maps as custom tiles, but i now learn what projection is and that this map does not use the same format as google's default. You can create custom projections i read in the API. I suspect this map uses a common projection, likely the same as **this one** : * * * I believe it will likely be **this one** : e.g. National Geoscience Datasets, Geoscience Australia and Conic Projection – Lambert Conformal Conic


Set scale for labels

I have multiple shapefile with different geometry and I am trying to on a label of layers. For create a map I am using Geoserver and Openlayer. Requirement is layer are visible on a max zoom level but labels are visible on min zoom level for same shapefile. Ex : Layer gets visible at 1:6,00,000 but labels gets visible at 1:5000 for the same shapefile. Please if anyone know the answer reply me as soon as possible. Thanks in advance


Changing TMS layer does not change map view

I have a TMS layer that I'm using as my map, i have set it up so that users can change the map.   However, changing the layer does not update the map view until I hit the zoom in button or the zoom out button. How can I refresh the map view to show the newly added layer?   Here is a quick code sample. I tried `layer.redraw()` without any solution. Does someone have any other ideas.                   function initMAP() {         var mapBounds = new OpenLayers.Bounds(bounds[0], bounds[1], bounds[2], bounds[3]);         var mapMinZoom = 0;         var mapMaxZoom = 3;              // avoid pink tiles         OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;         OpenLayers.Util.onImageLoadErrorColor = "transparent";                             var options = {             theme: null,             controls: [                  new OpenLayers.Control.Navigation({                 dragPanOptions: {                     //     enableKinetic: true                 }             }),             new OpenLayers.Control.Attribution(),             new OpenLayers.Control.Zoom()             ],                  maxExtent: new OpenLayers.Bounds(bounds[0], bounds[1], bounds[2], bounds[3]),             maxResolution: 4,             numZoomLevels: 3              };                   map = new OpenLayers.Map('map', options);                layer = new OpenLayers.Layer.TMS("TMS", "http://mymapserver.com/MAP2/", { 'type': 'png', 'getURL': get_my_url });                     map.addLayer(layer);           layer.redraw({ force: true });                map.zoomToExtent(mapBounds);              new OpenLayers.Control.Attribution(),         new OpenLayers.Control.Zoom()          }      Code where I'm caching the layer:               function get_my_url(bounds) {                   var res = this.map.getResolution();         var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));         var y = Math.round((bounds.bottom - this.maxExtent.bottom) / (res * this.tileSize.h));         var z = this.map.getZoom();              var path = z + "/" + x + "/" + y + "." + this.type;         if (WorkingMap == "4")         {             var url = "../TrentonArtsFestival/"              }         if (WorkingMap == "2")         {             var url=""              }                   if (url instanceof Array) {             url = this.selectUrl(path, url);         }         return url + path;          }


View ArcGIS 10 metadata in SharePoint 2010

Does anyone know how I can view the "FGDC CSDGM"-compliant metadata in SharePoint 2010? I know I can copy the metadata output since it's an html file but that's not what I want. I want SharePoint 2010 to be able to view the metadata, or GENERATE it itself, if possible, using the xsl/xslt stylesheets in ArcGIS 10. In other words, I want to "plug in" SharePoint with ArcGIS/ArcCatalog to see 'real-time' metadata. So this leads to my other question, does anyone know the process by which ArcCatalog 10 uses different stylesheets (there are so many) to ultimately create the final output (dhtml) which we see in ArcCatalog? Thanks!


pgRouting: calculate many-to-one shortest paths

In a previous question on how to calculate many shortest paths, @dkastl pointed to the pgr_kdijkstra function, which allows to calculate each time the total cost of **one source-to-many targets** shortest paths, by giving an array of target nodes. What I'd like to do is, to calculate the total cost of **many sources-to-one target** shortest paths. A solution could be to switch source and target, but then I'm actually calculating the total cost of a different chain of paths, given the fact I'm using a directed topology network. @UnderDark already provided a solution for this problem, but, out of curiosity, my question is: _Is there a way of modifying the pgr_kdijkstra function such that you're able to give an 'array of sources' and 'one target' as input?_ Something like (given the example of pgRouting manual):               SELECT seq, id1 AS source, id2 AS target, cost FROM pgr_kdijkstraCost(     'SELECT id, source, target, cost FROM edge_table WHERE cost >= 0',     array[4,12], 10, false, false);           seq | source | target | cost     -----+--------+--------+------        0 |      4 |     10 |    4        1 |     12 |     10 |    2      Thanks!


Standard for storing human metadata in spatial databases

Is there an existing, standard, universal approach (and hopefully existing tools that support managing it) for storing geospatial metadata in non-ESRI spatial databases alongside (and therefore able to travel with when dumped) the data themselves. I'm hoping to identify an approach that simply relies on tables and relations and could therefore be used in databases like PostGIS, Spatialite, Oracle, SQL Server, etc. Here, metadata mean the narrative information about the data (i.e., US FGDC or ISO 19139 geospatial metadata type information) - not the BBOX and internal stuff. ESRI users have the now several XML formats that can universally describe and accompany data whether they be files (Shapefiles) or Geodatabases. However, what existing options exist when ESRI software are not used? Yes, of course, I could design my own tables, data structure, etc. But why reinvent a wheel that must surely exist. UPDATE: Complex architectural components like Geonetwork (or anything necessarily involving a server) is exactly what I need to avoid. Also, the metadata would live with the data, not as a separate database. Requirements are below and I should have stated it at the start. System requirements: 1\. Architecture must need nothing more than QGIS and a Spatialite Database - partly because the organization is not sophisticated enough to run anything on a server and doesn't have money to buy anything or have anything built/deployed. Functional requirement: 1\. The data must be easily distributed to many people and the documentation must not be easily separated from the data - meaning they should live and easily be distributed together so that I always know what the data are and why they were created, etc - if I have the data I have the documentation. 2\. Like the data themselves, the metadata documentation should be easily editable and maintained using intuitive desktop tools, and by non- technical staff. Use case: 1\. Bobby the Student Volunteer (and just learning GIS) creates some data of monitoring sites as part of a study. 2\. Bobby records the inputs he used, explanation of his processing steps, and other info that helps others to understand the lineage of the data. 3\. Bobby gets a real job and leaves, leaving his data backed up on CD-ROM. 4\. Two years later someone finds the data and determines it to be very useful because they can read the documentation that are within the data. If you come from sophisticated organizations you'd say, "Man, what a screwed up situation. Just manage the data the Right Way (whatever that is)." But related scenarios are actually quite common in my world.


projection issues from ArcGIS to Qgis

I am pretty new to ArcGIS and Qgis. I have loaded some geometry data in Qgis from my postgres database, then I have also loaded the same data in ArcGIS. Then from ArcGIS i have created a shapefile containing part of the data loaded from the database. Now my problem is that when I load the shapefile containing part of the whole geometry data in Qgis, they are not being displyed on top of each other. Instead they are displayed both totally in different locations. Now my data from postgres is set to 4326 and my data created in ArcGIS is set to wgs1984 UTM 33N. **I have uploaded these two images to explain more myself. I would like that in qgis will appear that the blu rectangle will be on its twin rectangle. NOT ON ANOTHER PART** ![enter image description here](http://i.stack.imgur.com/DTt41.png)


Table to table script using Excel sheets (not workbooks) arcpy

So what I'm trying to do is to create feature classes from the sheets in an Excel table. I can get it to work if I save each excel sheet as its own workbook, however this isn't really what I want. I an a complete newbie so I'm sure the answer is pretty obvious. I think it is something to do with the $ in the table names, I can't work out how to strip it though. Any help would be much appreciated, Thanks # Working code               fileList = arcpy.ListFiles("*.xlsx")     print 'Listing .xlsx files in workspace'          try:          # Loop through each file         for file in fileList:             print file             arcpy.env.workspace = os.path.join(r"C:\\Users\\Jane\\Documents\\GIS Project\\BasicTest", file)              # Use splitext to set the output name of the table             dbfFile = os.path.splitext(file)[0] #+ ".xlsx"             if arcpy.Exists(dbfFile+".dbf"):             print "deleting"             arcpy.Delete_management(dbfFile+".dbf")                  # Convert excel to DBF             arcpy.TableToTable_conversion("Sheet1$", outPath, dbfFile+ ".dbf")                  print 'File conversion. Converted ' + file      Not working code:               tableList = arcpy.ListTables()     print 'Listing table files in sheet'               for table in tableList:         print table         arcpy.env.workspace = os.path.join(r"C:\\Users\\Jane\\Documents\\GIS Project", table)              # Use splitext to set the output name of the table         dbfFile = os.path.splitext(table)[0] #+ ".xlsx"         if arcpy.Exists(dbfFile+".dbf"):             print "deleting"             arcpy.Delete_management(dbfFile+".dbf")              # Convert excel to DBF         arcpy.TableToTable_conversion(table, outPath, dbfFile+ ".dbf")              print 'File conversion. Converted ' + table      Error:               Traceback (most recent call last):       File "C:/Users/Jane/Documents/GIS Project/BasicTest/3rd Script.py", line 33, in <module>       arcpy.TableToTable_conversion(table, outPath, dbfFile+ ".dbf")       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\conversion.py", line 1904, in TableToTable       raise e     ExecuteError: ERROR 000354: The name contains invalid characters     Failed to execute (TableToTable).


Problems adding KML layer in OpenLayers

I'm stuggling to add a KML layer to a simple test OpenLayers map - no errors are shown, but the KML layer does not display on the map. I've tried multiple samples including the Sundials on a Spherical Mercator sample and the Layers help page. I can open this example in Firefox and see the KML points on the map without error. I copied this sample's source code and adjusted the paths to the CSS, JS and KML files to use full paths. However, when opening this map the KML points are not displayed. Firebug shows **GET sundials.kml** on the working example from OpenLayers, but **OPTIONS sundials.kml** on my version. Any advice on what I'm doing wrong? Thanks               <!DOCTYPE html>                     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">         <meta name="apple-mobile-web-app-capable" content="yes">         <link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">         <link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css">
KML Layer Example

               kml, popup, feature

               Demonstrates loading and displaying a KML file on top of a basemap.


QGIS Real Time GPS

I'm trying to navigate real time with an USB GPS over a shapefile map, but I can't find the way to do this. I'm using QGIS 1.9.0 desktop version with a Garmin Etrex Legend HCx GPS. In fisrt place, QGIS doesn't recognise my GPS port. In addition, I cant't find in QGIS the option to navigate real time. Do you have any idea or tutorial to help me with this? Thank you very much.


R - How to sampleRandom() from large raster without NA values

I have a number of vary large rasters which need to be randomly sampled with the return value being a matrix of x, y, and value. The raster package `sampleRandom(raster,n, na.rm=TRUE, xy=TRUE)` will do this just fine most of the time. When working correctly, this function returns a matrix of non-NA values for `n` coordinate pairs. When NA values come up in the sample, they are dropped and replaced by a non-NA value. However, for my rasters (smallest being 4e^7 cells and some having a high percent of NA values), `sampleRandom()` returns a matrix substantially smaller than `n` coordinate pairs. Presumably, this due to sampled NA values, not being replaced when they are sampled. My question is; why does the `sampleRandom` function return incomplete results on the real-world data example? Is it a bug, bad coding, or is there a better approach? Edit: as Radar correctly pointed out, the documentation for the raster packages states: `With argument na.rm=TRUE, the returned sample may be smaller than requested` With this, my question becomes; how do I draw a work around this and efficiently draw random sample of `n` coordinate pairs? Example 1: this works correctly in retrieving a random sample of `n` from a larger raster that is cropped and masked by spatial polygons. returns a matrix of 2000 cordiante points.               region1 <- rbind(c(0,0), c(50,0), c(50,50), c(20,20), c(0,0))     region2 <- rbind(c(50,0), c(80,0), c(100,50), c(60,40), c(80,20), c(50,0))     polys <- SpatialPolygons(list(Polygons(list(Polygon(region1)), "region1"),                             Polygons(list(Polygon(region2)), "region2")))          r <- raster(ncol=1000, nrow=1000)     r[] <- runif(ncell(r),0,1)     extent(r) <- matrix(c(0, 0, 1000, 1000), nrow=2)          r_crop <- crop(r, extent(polys), snap="out", progress='text')     r_mask <- mask(r_crop, polys)           plot(r_mask)     plot(polys, add=TRUE)          x <- sampleRandom(r_mask,2000, na.rm=TRUE, xy=TRUE)     nrow(x)          >[1] 2000      ![results of crop and mask for sample data](http://i.stack.imgur.com/ecHPC.jpg) Example 2: The next example is with real data that consist of a universal raster (geo.r) of 2e^8 cells and a subset of spatial polygons (geo.poly) that contain 1200 polygons and is a smaller extent than geo.r. This code incorrectly results in a matrix of much less than `n`; depending on the random sample. a few runs produce a matrix of between 3 and 117 non-NA coordinate pairs.               require(maptools)     Prj <- "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"     modeling_areas_SHP <- "C:/.../modeling_areas_dissolve.shp"     geo.polys <- readShapePoly(modeling_areas_SHP, IDvar="area_ID", proj4string=CRS(Prj))     geo.poly <- modeling_areas[modeling_areas$area_ID == i,] #subset the shapefile          geo.r <- raster("C:/.../cost_raster")          geo.r_crop <- crop(geo.r, extent(geo.poly), snap="out", progress='text')     geo.r_mask <- mask(geo.r_crop, geo.poly, progress='text')          plot(geo.r_mask)     plot(geo.poly, add=TRUE)          x <- sampleRandom(geo.r_mask,2000, na.rm=TRUE, xy=TRUE)     nrow(x)          >[1] 117      ![results of crop and mask for real data](http://i.stack.imgur.com/2V2CS.jpg) To me at least, the above examples are the same except for the overall size of the rasters and complexity of the polygons; two very important factors. Obviously I cannot provide the real world data because of file sizes, but I hope the code will suffice. Any suggestions on how to fix this or alternative methods would be appreciated. Thank you for your time. EDIT: I used this work around hack, but it is not super efficient. However, was more efficient than using `spsample()` from the "sp" package.               micro_sample = 50000     tmp_rand_smple <- data.frame(x = numeric(0), y = numeric(0), layer = numeric(0))                 while(nrow(tmp_rand_smple) < micro_sample){                     tmp_smple <- data.frame(sampleRandom(geo.r_mask,10000, na.rm=TRUE, xy=TRUE)) ### 10k is an arbitrary chunk, loops until > micro_sample                     tmp_rand_smple <- rbind(tmp_rand_smple, tmp_smple)                     tmp_rand_smple <- unique(tmp_rand_smple[c("x", "y", "layer")]) # remove any duplicate coordinate pairs                 }                 tmp_rand_smple <- tmp_rand_smple[1:micro_sample,] # trim to length of micro_sample      Example 3: Here is an example of the above code that can be reproduced with the linked shapefile. On my computer this fails at returning the required number of random sample https://www.dropbox.com/s/7poaqcxju808arw/riverine_region_1.zip               Prj <- "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0"     geo.poly <- readShapePoly("FILE LOCATION:/riverine_region_1", IDvar="area_ID", proj4string=CRS(Prj))  ## set file location          r <- raster(ncol=5202, nrow=8182)     r[] <- runif(ncell(r),0,1)     extent(r) <- matrix(c( 1533500, 592219.7, 1447689, 537662.6), nrow=2)          r_crop <- crop(r, extent(geo.poly), snap="out", progress='text')     r_mask <- mask(r_crop, geo.poly, progress='text')           plot(r_mask)     plot(geo.poly, add=TRUE)          x <- sampleRandom(r_mask,2000, na.rm=TRUE, xy=TRUE)     nrow(x)


Selecting ideal locations using vector data - location analysis ArcGIS

Wondering if I could get some advice on how to approach a problem. I have 10,000+ polygons of varying size and shapes which I would like to use in a location based analysis. I have a set of parameters (both attribute and ideally geometry) whereby I would like to rank each polygon to see if they meet the need for development. Would something like Location-Allocation in ArcGIS work with such a large number of polygons? My impression was that you pre-selected certain locations and then ran the analysis. Thoughts?


Do ModelBuilder or Geoprocessing tasks run slower if screen locked?

Is it true if you are running ModelBuilder or a geoprocessing task on a large raster\vector dataset then locking the computer would that cause the ModelBuilder or any geoprocessing to run slower? Is it the computer itself? I am running a large raster datasets using ModelBuilder on a different computer machine and I unplugged the network to prevent from reboot or push in such as update patches. I’d like to hear your comments or tips? * * * My work has these Insomina.exe and I'm wondering if this does made the difference to speed up the geoprocessing/model builder work ? Here is the link: Insomina.exe


Longest slope oriented to north?

I need a help with my homework. I have created digital elevation model from the shapefile. In QGis(Grass plugin) ![enter image description here](http://i.stack.imgur.com/9auHt.png) This is how far i can go. I have to find the longest slope oriented to North. I know I have to use r.slope and r.aspect modules, but how can I use it? Thanks!


Geoexplorer Class Diagram

Does anyone know where I could find a class diagram for the different modules of geoexplorer (geoext and gxp)?


ArcGIS Server 10 on Ubuntu or CentOS?

I know Solaris is on the way out with 10.1 I also know that v10 is only supported on 32bit flavours of RedHat & SUSE. What I do want to know, has anyone had any luck installing it on either Ubuntu or CentOS? Google only told me of this blog which had revolved around Engine 9.2. \--EDIT-- Looks like Ubuntu support for may arrive at 10.1. Ease of use and lower costs on AWS look to be the reasons (over CentOS) ![enter image description here](http://i.stack.imgur.com/5aegW.png)


Installed Sharepoint 3 = Breaks ArcGIS Server

Want to do some testing with Sharepoint/MapIt.   * Took an existing machine with ArcGIS Server 10 on Windows Server 2008 on.   * Installed Sharepoint 3.0 SP2 on it with basic install/default options.   * Can now hit Sharepoint with http:///default.aspx   * Can no longer hit manager or REST = 404   * Under wwwroot, the ArcGIS folder is still there So whats happened and how can I get the two to work side by side?


Why doesn't my Custom Layer Draw?

I have a Customer layer which inherits BaseCustomLayer. I add it to my MapControl via addLayer. But the function "public override void Draw(esriDrawPhase drawPhase, IDisplay Display, ITrackCancel trackCancel)" is never hit. The Custom Layer appears checked in the TOC. I think I must be missing some initialization one-liner. Thanks in advance.


Geospatial CMS like Cartaro without Internet connection

I want to install geospatial CMS like Cartaro and I'm interested in whether this CMS works in an intranet environment without taking data from services such as Openlayers, Google map, etc. Is there a database (world map) as the demo site http://demo.cartaro.org/ that can be used offline Thanks for any tips or ideas!


How to combine If Then with InStr in ArcMap field calculator?

I want to write an if then in field calculator that tests if a field in the attribute table contains one of several versions of another string (the versions vary by capitalization). Trouble is, I can't get even a simple if then to work, let alone an if then else if, which i would need here. I'm getting a 9999 error when I try the following: (in the pre-logic script code)               Dim onlorain as Long     If InStr( [Export_Output.std],"Lorain" )>0 Then     onlorain = 1     else onlorain = 0     end if      (in the variable = ('parcel.onlorain =') box)               onlorain      I've posted a screenshot here: ![screenshot](http://i.imgur.com/wIbmm.png) I'd thought that ultimately, I'd be striving (when I build in the capitalization variants) for something like               Dim onlorain as Long     If InStr( [Export_Output.std],"Lorain" )>0 Then     onlorain = 1     elseif InStr( [Export_Output.std],"LORAIN" )>0 tHEN     onlorain = 1     elseif InStr( [Export_Output.std],"lorain" )>0 tHEN     onlorain = 1     else     onlorain = 0     end if      But if the 'simple', 1st version of this won't work, this won't work either. Hope someone has thoughts. Thanks in advance!


how do i load map service from using JavaScript API?

I created a Map Service in arc catalog. Now How i can load this map with javascript api ? I have this sample :                 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">                                             <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>                 <meta http-equiv="X-UA-Compatible" content="IE=7" />                 <meta name="viewport" content="width=device-width,user-scalable=no"/>                                  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>                 <title>Maps Toolbar</title>                 <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">

                                  But this load map from esri. I want load map from my map service.


QGIS 2.0 Howto copy raster data from a QgsRasterDataProvider to an OpenCV matrix

I'm hacking the half day arround a problem and that I' thought it was simple one. I'm using C++ (QtCreator) QGIS 2.0 und openCV2 on an 64 bit Workstation runnig Debian Wheezy. The Application I try to assemble is a standalone QGIS one and will be a mix of gis and image processing software. Problem description: I've a QgsMapLayerCanvas with an associated QgsRasterlayer based on an GeoTiff with UTM32 CRS and a resolution of 2 cm. My objective ist to point on an location, determin the pixel data and cut out the data buffer in a 2 x 2 meter window . In the next step this buffer should go to an opencv image processing routine. I' havent found a ready to use solution in the qgis library. My guess is, that the QgsRasterDataProvider can do this job but. But I cannot find any useful snippets in the web for this task. Is there somebody who has exprience with this matter? Is there eventually a library or a tool that can solve or address the problem? Thanks in advance Huck * * * Here the snippet of my first try:               void MainWindow::doMapImgCanvasClicked(const QgsPoint &point,                                       Qt::MouseButton button) {                   if (!(qgsMapImgLayer && qgsMapImgProvider) ) return;              // Size of the window for the image process         int winWidth  = 10; int winHeight = 10;              // Calculate the pixel position         QPoint pixPos(-1,-1);         doMapImgCalcRasterPos(point, qgsMapImgLayer, pixPos);              // Give me a response for coords and pixel pos          QString str;         str.sprintf("COORD %f %f PIX %d %d",                             point.x(), point.y(),                pixPos.x(), pixPos.y());         outLog(str);              // Create a region of interest         QgsRectangle roi(point.x()-1, point.y()-1, point.x()+1, point.y()+1);                     // Make a copy of Data 2x2 m for the first band         QgsRasterBlock *block = qgsMapImgProvider->block(           1, roi, winWidth, winHeight);               // Block data is OK?         if (block->isValid()) {              outLog("VALID");         }                          // Blockdata empty?         if (block->isEmpty()) {            outLog("EMPTY");         } else {           return;         }              // Is this the buffer?            char* bits = block->bits();         str.sprintf("DB.TYPE %d", block->dataType()); outLog(str);              // OK This is the size of the Pointer          str.sprintf("DB.NUM %d", sizeof(bits) ); outLog(str);              // Test Output         for (int i=0; i<winWidth*winHeight; i++) {                 char c = bits[i];             str.sprintf("PIX[%d]=%d", i, bits[i] ); outLog(str);         }     }


grass on ubuntu cannot import globalvar

I installed GRASS GIS 6.4.3 on Ubuntu Precise 12.04 by `sudo apt-get install grass grass-doc,` as recommended by the Wiki. It runs with the wxpython GUI, but when I use any command (like r.in.gdal or v.digit etc.) from the command line, i get the exception:               Traceback (most recent call last):         File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 69, in <module>         from core import globalvar         ImportError: cannot import name globalvar      I opened the python interpreter (actually running python 2.7.3) and tried to import core; that works but, in fact, there's no module globalvar under core. I am able to use all grass commands from the GUI, but the same commands raise the ImportError exception if run by the command line. This happens only when starting GRASS with the wxpython GUI, not with the Tcl/Tk one. I assume that GRASS looks for globalvar in the main core package rather than in the wxpython.core one.


How to Rank Field in ArcGIS 10.1?

I have a table of crimes by precinct. There is a field with the precinct number (I.E. 1, 2, 3, 4...) I also have a field each for Burglaries, Assault, Arsons with a count of how many in each precinct. Is there a way to summarize the precinct field so that each of the three crime type fields are ranked from highest count value to lowest (I.E. 1,2,3,4... instead of the current count 45,35,43...)


How can i show online temporal data using Tracking Analyst?

I have online GPS tracking data . I'd like to show these data in webgis . I'm using ArcGIS Silverlight API . I used tracking analyst in Arcmap for offline temporal data but not online data. Is there any way to show online data using Tracking analyst ? Thanks for advance.


Does a PDF contains geographical coordinate if the Adobe Reader Geospatial Location Tool doesn't write anything?

Does a PDF contain geographical coordinate if the Adobe Reader Geospatial Location Tool doesn't write anything? I mean that I am moving the mouse over the pdf and no latitude and longitude values will show. Does this mean there are no coordinates stored in the map?


Querying PostGIS Raster with MultiPoint

For one of my projects using PostGIS 2 I have a table with GPS tracks (`igc_files`). It holds records including a `MULTIPOINT()` column that has about 1,000 points for each record and a column that has an array of the corresponding timestamps. I also have a raster table (`elevations`) that should at some point hold all of the SRTM elevation data. For now I have only imported a few relevant areas though. What I want to do is get the elevation for each point of one certain record and the corresponding timestamps. I have implemented an naive approach and it does work, but I'm wondering about its performance implications. This is how it currently looks:               SELECT timestamps[location_id] AS timestamp,            ST_VALUE(elevations.rast, subq.location) AS elevation      FROM elevations, (         SELECT (ST_DUMP(igc_files.locations)).path[1] AS location_id,                 (ST_DUMP(igc_files.locations)).geom AS location          FROM igc_files          WHERE igc_files.id = 1     ) AS subq, igc_files      WHERE igc_files.id = 1 AND            ST_INTERSECTS(subq.location, elevations.rast) AND           ST_VALUE(elevations.rast, subq.location) IS NOT NULL      Since this is a GPS track and the points are not that far apart, PostGIS could assume that the next point is in the same raster tile and check that tile first before checking the index again from the top. Is that actually done by PostGIS or is it just starting to search the index from the top for each of the points? I have tried to use `ST_INTERSECTION()` instead of `ST_VALUE()` and feeding in the `MULTIPOINT` directly, but that was actually even slower by a few orders of magnitude. Is there a feature/function of PostGIS that I am missing to do this more efficiently?


How can I fix "ImportError: No module named qgis.core"?

First of all, I'm using Python 2.7.3, QGIS 1.8 (Lisboa) on Windows 7 pro 64 bits. Now let's go to the actual question: I have written some code (Python) that works well within the QGIS built in Python console, but now I need to run it from outside QGIS (it is too much to ask for the final user to open QGIS, then the python console and to copy and paste the code). I have been trying to access the QGIS API, but it is missing from my PYTHONPATH. I've tried whatever is on the instructions, plus a bunch of paths like: C:\Program Files(x86)\QGIS\apps\qgis\python\qgis and C:\Program Files(x86)\QGIS\apps\qgis\python. My result so far is always the same:               import qgis.core     ImportError: No module named qgis.core      Any ideas?


error in gp.execute intersect

i generate a tool to return values using area of polygons. but when i execute the tool, visual studio show an error :"Error HRESULT E_FAIL has been returned from a call to a COM component" in gp.Execute("Intersect_analysis", parameters, null);. this tool use area of polygons . first use GRIDCODE field to calculate area of each GRIDCODE . for example in slope layer we have 5 GRIDCODE then this tool calculate polygon Area for each GRIDCODE then intersect slope layer with layer2 such as lanslide layer and calculate area of layer2 in each gridcode .for example gridcode 1 = 2000 KM2 and layer2 in gridcode1 = 500 KM2 finally layer2 in gridcode1 area divide to gridcode1 area : 500/ 2000 the code is : what's my problem in writing this code?               namespace class_library     {         public partial class form_model : Form         {            public IHookHelper phookhelper;             // jahate moarefie polygon be combobox            IFeatureLayer pfeaturelayer;                 string path, name;                  public form_model()             {                 InitializeComponent();             }                  private void form_model_Load(object sender, EventArgs e)             {                 pfeaturelayer = new FeatureLayerClass();                      if (phookhelper.FocusMap.LayerCount < 2)                 {                              MessageBox.Show( "at least two layer must be import in ArcMap ","error");                     this.Size = new Size(0, 0);                     this.ShowInTaskbar = false;                     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;                     this.Close();                     this.Hide();                      }                 else                 {                     for (int i = 0; i < phookhelper.FocusMap.LayerCount; i++)                     {                         pfeaturelayer = (IFeatureLayer)phookhelper.FocusMap.get_Layer(i);                         if (pfeaturelayer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon)                         {                             comboBox1.Items.Add(phookhelper.FocusMap.get_Layer(i).Name);                                   }                     }                     for (int i = 0; i < phookhelper.FocusMap.LayerCount; i++)                     {                         pfeaturelayer = (IFeatureLayer)phookhelper.FocusMap.get_Layer(i);                         if (pfeaturelayer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon)                         {                             comboBox2.Items.Add(phookhelper.FocusMap.get_Layer(i).Name);                                   }                     }                 }                  }                  private void button2_Click(object sender, EventArgs e)             {                 Close();             }                  private void button1_Click(object sender, EventArgs e)             {                 IFeatureCursor pFeatureCursor;                 IFeature pFeature;                 if (comboBox1.SelectedIndex == -1)                 {                     MessageBox.Show("select watershed layer");                     return;                 }                 if (comboBox2.SelectedIndex == -1)                 {                     MessageBox.Show(" select landslide layer");                     return;                 }                 if (String.IsNullOrEmpty(path) || String.IsNullOrEmpty(name))                 {                     MessageBox.Show("select save rout");                     return;                      }                      // computing area of each gridcode in aspect layer                 int layer1 = comboBox1.SelectedIndex;                 int layer2 = comboBox2.SelectedIndex;                 IFeatureLayer fl1 = (IFeatureLayer)phookhelper.FocusMap.get_Layer(layer1);                 IFeatureLayer fl2 = (IFeatureLayer)phookhelper.FocusMap.get_Layer(layer2);                      pFeatureCursor = fl2.Search(null, false);                 pFeature = pFeatureCursor.NextFeature();                 double val;                 int fieldIndex;                 fieldIndex = fl2.FeatureClass.FindField("GRIDCODE");                 if (fieldIndex == -1)                 {                     MessageBox.Show( + "there is no GRIDCODE field in selected layer " );                     return;                 }                 // getting unique values                 List<double> UVs= new List<double>();                 while (pFeature != null)                 {                     try                     {                         val = (int)pFeature.get_Value(fieldIndex);                         if (!UVs.Contains(val))                         {                             UVs.Add(val);                         }                     }                     catch { }                     pFeature = pFeatureCursor.NextFeature();                           }                                IQueryFilter2 pQFL = new QueryFilterClass();                 Dictionary<double,double> Areas = new Dictionary<double,double>();                 foreach (double i in UVs)                 {                          pQFL.WhereClause = String.Concat("\"GRIDCODE\" = ", (int) i);                     pFeatureCursor = fl2.Search(pQFL, false);                     pFeature = pFeatureCursor.NextFeature();                     double TotalArea1 = 0;                     IArea pArea;                     while (pFeature != null)                     {                         pArea = (IArea)pFeature.Shape;                         //MessageBox.Show(pArea.Area.ToString());                         TotalArea1 += pArea.Area;                          pFeature = pFeatureCursor.NextFeature();                     }                          Areas.Add(i,TotalArea1);                 }                      string layer1path, layer2path;                 IDataset ds1 = (IDataset)fl1;                 IDataset ds2 = (IDataset)fl2;                 layer1path = String.Concat(ds1.Workspace.PathName, "\\", fl1.Name,".shp");                 layer2path = String.Concat(ds2.Workspace.PathName, "\\", fl2.Name, ".shp");                      try                 {                               IGeoProcessor gp = new GeoProcessorClass();                     IVariantArray parameters = new VarArrayClass();                          parameters.Add(String.Concat('"', layer1path, '"', ";", '"', layer2path, '"'));                     parameters.Add("c:\\intersect.shp");                     parameters.Add("ALL");                     gp.OverwriteOutput = true;                     gp.AddOutputsToMap = false;                          gp.Execute("Intersect_analysis", parameters, null);                               }                  catch             {                 MessageBox.Show("error in intersect");                 return;


Set feature class based on IF statement in Modelbuilder

My model selects a feature class within a user specified file geodatabase, based on the output of an IF statement which checks the user specified string value e.g. If the user specifies a file gdb `InputGDB` and a string `A`, the if statement checks the string and returns true if the string is A. it then chooses the appropriate feature class `FC_A` within `InputGDB` and continues processing. The same thing happens if the user enters B, i.e. feature class `FC_B` would be chosen. The same processes happen on the feature class, regardless of whether A or B is chosen. My problem is there is a third feature class, also sourced from the same gdb (let's call it `FC_Common`), whose processes always run regardless of what is happening with A/B. After some initial processing, `FC_common` must interact with A/B via a series of Intersect, Joins, selections etc. How do I set the model up so that I don’t have to duplicate the entire branch of processes for each option? I've read a bit about the Merge Branch tool, and I think it's what I want, but I'm not entirely sure how to use it. I've attached an image of the model to show where I am having a problem. ![Model](http://i.stack.imgur.com/5MipH.png)


How does QGIS handle opening files and how can I improve this?

We are using shapefiles with a large attached database to it (162 Mb for 133000 features) Opening this shape file on a remote server takes about 5 minutes whereas DivaGIS takes 7 seconds for the same file. My suspicion is that QGIS loads the entire shapefile to client and stores it in a temporary directory before rendering it whereas DivaGIS picks up the geometry, renders it and opens the .dbf file on the remote server. My question is: "How does QGIS handle files and how can I improve this and / or can it be improved?" (I have once read an article "QGIS on steroids" but i have not seen any improvement since QGIS 1.6) Working with Postgis improves this a little bit but it doesn't come anywhere near the speed of DivaGIS. Hope someone can help me further.


In a ROMS model, how can a get the time series data for a parameter using a lat/lon point?

As a follow on question to my initial post here I would like to get point data over a time series from a ROMS model. For example, given the netCDF file hosted via Thredds here: http://omgsrv1.meas.ncsu.edu:8080/thredds/dodsC/sabgom/his_20130919.nc.html I am interested in getting the salt value for a lon/lat point for each time increment in the file. Thanks, Dan


Best Method for Validating polygons?

I would like to assess the spatial accuracy of a load of polygon shapefiles which are supposed to show air quality for a bunch of countries. Firstly I want to assess whether each shapefile has a complete coverage of the country it is supposed to represent. Secondly I want to assess whether there are any slithers in the shapefiles, areas which fall out of the country boundary. My initial method is using the rasterize polygon method, using the extract by mask tool to exract the supplied data by a known country boundary shapefile, and perhaps counting the pixels in the original file, and the extracted file, for each case. Can you think of a more efficient method for doing this? I tried to use the split function but it didn't work as I expected it would. Thanks


Intersecting with Geodatabase.ISpatialFilter - no results

I'm trying to intersect two layers and get resulting features with the following code I've written:                  ESRI.ArcGIS.Geodatabase.ISpatialFilter spatialFilter = new ESRI.ArcGIS.Geodatabase.SpatialFilterClass();        spatialFilter.SpatialRel = ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum.esriSpatialRelIntersects;             int indOfLayer1 = Int32.Parse(ConvertFromLayerNameToLayerId(m_Map, m_ResourceMapItem, m_firstLayerName));        int indOfLayer2 = Int32.Parse(ConvertFromLayerNameToLayerId(m_Map, m_ResourceMapItem, m_masterLayerName));                  // Get the map underlying the map service and the IGeoFeatureLayers contained in the map        ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal mfunct =                          (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal)        m_Map.MapResourceManagerInstance.GetResource(m_ResourceMapItem);        ESRI.ArcGIS.Carto.IMapServer iMapServer = (ESRI.ArcGIS.Carto.IMapServer)mfunct.MapServer;              ESRI.ArcGIS.Carto.IMapServerObjects mapServerObjects = (ESRI.ArcGIS.Carto.IMapServerObjects)iMapServer;         ESRI.ArcGIS.Carto.IMap map = mapServerObjects.get_Map(iMapServer.DefaultMapName);         ESRI.ArcGIS.esriSystem.UID layerTypeID = new ESRI.ArcGIS.esriSystem.UIDClass();         layerTypeID.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; //feature layer         ESRI.ArcGIS.Carto.IEnumLayer enumLayer = map.get_Layers(layerTypeID, true);         enumLayer.Reset();              // first layer         ESRI.ArcGIS.Carto.IFeatureLayer featureLayer1 = map.get_Layer(indOfLayer1) as ESRI.ArcGIS.Carto.IFeatureLayer;              // master layer (second)         ESRI.ArcGIS.Carto.IFeatureLayer featureLayer2 = map.get_Layer(indOfLayer2) as ESRI.ArcGIS.Carto.IFeatureLayer;              spatialFilter.Geometry = (IGeometry)multipointPoints2;              // perform the query         ESRI.ArcGIS.Geodatabase.IFeatureCursor cursor = featureLayer1.Search(spatialFilter, true);              ESRI.ArcGIS.Geodatabase.IFeature feature = null;         // Create a ComReleaser for cursor management.         IGeometryCollection formetotali = new MultipointClass();         ESRI.ArcGIS.ADF.ComReleaser comReleaser = new ESRI.ArcGIS.ADF.ComReleaser();         // Create and manage a cursor.         comReleaser.ManageLifetime(cursor);         object missing = Type.Missing;         // Delete the retrieved features.              while ((feature = cursor.NextFeature()) != null)         {             ESRI.ArcGIS.Geometry.IGeometry mageometry = feature.Shape;             formetotali.AddGeometry(mageometry, ref missing, ref missing);         }                   DrawIGeometryOnMap(m_Map, (IGeometry)formetotali);      but I'm getting no results at all even if the layers intersect What's wrong with that?


Retrieving tiles in EPSG:4326 format. Is there a service for that like CloudMade?

Is there a service that can provide custom tiles in the EPSG:4326 projection? I've looked at Cloudmade and it would be the ideal solution but their tiles are using Spherical Mercator. Basically the end result I'm looking for is to create a square grid overlay on a map. Like this : http://openlayers.org/dev/examples/graticule.html So retrieving the maps via WMS would be a good choice but I need the map to be custom styled like you would be able to do in cloudmade. But maps like cloudmade and google maps seem to distort the world and so a square grid won't be possible on their tiles if i wanted to create the grid by equal increments of latitude and longitude.


How to extract road and building features from raster data?

I work with raster data and my task is to digitize a big image. This consumes much time just for digitizing roads and buildings! I'm looking for tools to simplify working on raster data to digitize features, such as automate road extraction, smooth features, etc. For examples, check these videos: RoadTracker & Overwatch. I have ArcGIS 9.3 and 10 but other suggestions are welcome too.


Sql Query for percent of buffer filled with objects

Hi I am trying to write a query to find the percentage of a buffer polygon (Called 250_Buffer) that is filled with or contains other polygons in another layer (Called Development) any help that you guys could give me would be awesome. I am hoping for an answer output as a percentage of 100 but I could also get something in square meters/acres/miles and calculate the percentage myself. Thank you for the help.


How to code for Thematic map in Mapbasic?

I would like to write code for creating a thematic map. The GUI command in Mapbasic window shows many lines in order to set up the different colours which will be used on the different polygons (i.e. Brush (2, 16760, 2300)). Is it possible to generate this part automatically provided the user gives some parameters ? Any help would be appreciated. Part of the code would look like the following:               Declare Sub Main()     Declare Sub sThematic          Sub Main()       Call sThematic     End Sub          Dim nStep As Integer     Dim sSymbole As Brush     Dim sSymbol(300) As Float     Dim counter As Integer     Dim sTableName As String     Dim sDataCol As Integer     Dim nBreak As String     Dim sStatement As String     Dim sStatementStart As String     Dim sStatementMid As String     Dim sStatementEnd As String          SUB sThematic          sSymbol(1) =   MakeBrush (49, 12632256, 12)      sSymbol(2) =   MakeBrush ("+sDefaultSymbol+", 16752895, 8)      sSymbol(3) =   MakeBrush ("+sDefaultSymbol+", 9445631, 8)      sSymbol(4) =   MakeBrush ("+sDefaultSymbol+", 255, 8)      sSymbol(5) =   MakeBrush ("+sDefaultSymbol+", 65280, 12)      sSymbol(6) =   MakeBrush ("+sDefaultSymbol+", 16776960, 12)     sSymbol(7) =   MakeBrush ("+sDefaultSymbol+", 16744448, 12)     sSymbol(8) =   MakeBrush ("+sDefaultSymbol+", 16711680, 12)           sStatementStart = "shade window " + winID + " " + sTableName + " with " + sDataCol + " ranges apply all use all Symbol (49,12632256,12)  "     sStatementMid = ""     sStatementEnd = " default Brush (2,8421504,16777215)  # use 2 round 1 inflect off Symbol (0,0,0) at 5 by 0 color 1 #"          nStep = 8       For counter = 1 to nStep        sStatementMid = sStatementMid + nBreak(counter) + ": " + nBreak(counter + 1) + sSymbol(counter)     Next          sStatement = sStatementStart + sStatementMid + sStatementEnd          Run Command sStatement      End Sub


What are the main research areas under development for GISc today?

Along the lines of the closed topic about a master thesis, I would like to propose you guys with a question that it is simple: What are the main areas under active research and development for GISc? Or, what areas need further R&D? What are the current "hot-topics" for GISc? Modelling, simulation, temporal representation?


Trouble installing pgrouting

I'm trying to install the pgrouting library but have hit a bit of a problem whilst installing. It's probably something I've done (I'm quite new to Linux so struggling to understand the error message). Has anyone seen this before or have any ideas of how to resolve it?               [root@localhost pgrouting]# git clone git://github.com/pgRouting/pgrouting.git pgrouting          [root@localhost pgrouting]# cd pgrouting          [root@localhost pgrouting]# sudo /root/cmake-2.8.3-Linux-i386/bin/cmake .          [root@localhost pgrouting]# make install          [ 16%] Building CXX object core/src/CMakeFiles/routing.dir/shooting_star_boost_wrapper.o /root/pgrouting/core/src/shooting_star_boost_wrapper.cpp:26:54: error: boost/property_map/vector_property_map.hpp: No such file or directory In file included from /root/pgrouting/core/src/shooting_star_search.hpp:22, from /root/pgrouting/core/src/shooting_star_boost_wrapper.cpp:27: /root/pgrouting/core/src/shooting_star_relax.hpp:18:47: error: boost/property_map/property_map.hpp: No such file or directory make[2]: [core/src/CMakeFiles/routing.dir/shooting_star_boost_wrapper.o] Error 1 make[1]:[core/src/CMakeFiles/routing.dir/all] Error 2 make: [all] Error 2      I followed the instructions given at http://www.pgrouting.org/docs/1.x/install_centos.html and I'm installing on CentOS 5.5.


What is the best way to visualize multiple large LIDAR tiles?

I want to load approximately 10 large LIDAR tiles for analysis. I have tried using ArcScene but it appears there is a limit on how much data ArcScene can handle at one time. Each tile is 65-90MB in size. The only returns that I am using (and that are available) are ground returns. My computer has 8GB ram, an amd 6 core processor, and a really good video card. I am fairly certain that it is more than sufficient to handle large amounts of data. I am not against using something other than an ESRI product to complete this task.


How to find the boundary co-ordinates from a given set of co-ordinates

Given a set of coordinates, How do we find the boundary coordinates.   ![set of coordinates](http://i.stack.imgur.com/HkoJ2.png) <== **Figure 1**   Given the coordinates in the above set, How can I get the coordinates on the red boundary. Boundary is the polygon which is formed by the input coordinates for vertices, in such a way that it maximizes the area. **Edit:** I am sorry I wasn't precise about why I needed this. I am working on an app which searches properties within 'x' miles of a _city_. What I have is:   1. Coordinates of all the properties.   2. A set of coordinates for each city (I have one coordinate for each zip. And since most cities have more than one zip, Every city has a set of coordinates) The reason I am asking for the _maximum area_ is so that I don't come up with a polygon like the one below:   ![crooked polygon](http://i.stack.imgur.com/lLG5l.png) <== **Figure 2** What I need is the _algorithm_ to come up with the set of coordinates for the boundary. An algorithm which will allow me to come up with boundary coordinates for **Figure 1**. Hope that clarifies a few things.


File Browsing Dialog for Tables in Spatial Databases

I am looking for a file browsing object that allows a user to navigate into the different types of geodatabases. For example, the ability to navigate into a Spatialite/PostGIS/ESRI File Geodatabase...etc database to select a specific spatial table. I am working on a .NET based app. In ArcObjects, the equivalent object would be the IGxDialog.


How can i use Flex Viewer 2.2 with ArcIMS 10 or 9.3

i am one of the users that are using ArcIMS to build a web gis,so i have not migrate to ArcGis Server yet,therefore can i use Flex viewer 2.2 in ArcIMS 10 or 9.3 without any problem with it, if so that, any one help me, how can i get start to learn flex viewer for (API). thank you


How to select by attribute and calculate a field of new selection in modelbuilder

I have a polygon shapefile (with 4000 records in it) that I want to group into different regions by doing a "select by attribute". I need to do this about 164 times because of the different selection ranges I use in the expression (eg nr >= 1000 AND nr <= 1119). For each new selection I need to calculate the Fieldname(Region) to the name of the new region (again 164 times) How can I achieve this in modelbuilder?


Merging shapefiles

I have a query regarding the merging of shapefiles. I have 7 different landuse shapefiles which together covers all my study area. Now, inside my study area, there are 70 different priority areas for which I have to calculate the area of each types of landuse. Therefore, I was thinking to merge 7 landuse shapefiles into 1 shapefile and clip the area of 70 different priority areas in order to get the area of the individual priority area (for example: 20 acre forest, 10 acre agriculture, 5 acre wetland...). I was wondering if I would merge 7 shapefiles into 1 shapefile, is there any chance of losing any area especially on the edge of two shapefiles? If yes, could anyone suggest the right procedure so that I wouldn't lose/alter my original information of each individual shapefile.


QGIS, "Handle bad layers" and empty layers

I'm a novice in GIS, so forgive me all possible mistakes I might have here... I'm using QGIS 2.0.1. (Dufour) with Mac OS X (10.6.8). I have couple of dozens(?) of vector layers added on a project. At some point, when I opened a project, application opened a window " _Handle bad layers_ ". As far as I know, this should pop up when the project cannot find the file due to its new location, for example. There were a few (ca. 5) layers listed. But in the columns " _New file_ " and " _New datasource_ " there were the same path and file name. When I tried to select a file from the list and relocate it, QGIS crashed. After that it crashes every time at the same point. If I close the window, it's possible to get ahead. QGIS removed those files (vector layers) from the project's " _Layers_ " list. That's not too bad. But now all the other layers in the project are empty.   * If I right-click one of them in the " _Layers_ " list and choose " _Show feature count_ ", it shows the right number, for example [13176]. But the style definitions under it (I've made the categorized color style according to one attribute value of the data), it shows [0] as feature count value.    * if I choose "Open attribute table", it's empty. When I checked size of the original file (added as vector layer), it has some data. I have NOT changed the location of data files - some earlier QGIS backup project files still find them. Am I having too many layers, perhaps? Thank you for any help! I hope there's all infomation needed.


QGIS 2.4.0 Mac Yosemite compatibility

I just upgraded to the Beta 2 version of MacOS 10.10 ("Yosemite"). I'm getting an error when I try to "drag and drop" shape files into QGIS. I'm running QGIS 2.4.0, GDAL 1.11, and MATPLOTLIB 1.3.1. I can manually add shape files using "Layer --> Add vector layer ..." So, there is a solid work-around. It's just the GUI that's not working.


Agent Analyst doesn't work with ArcGIS 10.2

I have installed the agent analyst extension for my ArcGis 10.2. I am also following ESRI tutorial (http://resources.arcgis.com/en/help/agent-analyst/). Every model which requires updateDisplay or just update action doesn't work. When I click run and later on initialise - nothing happens and when I click start or step, the program crashes. I got something like this: https://drive.google.com/file/d/0B6apFdCMCsMbcjhwR2YwT01TTU0/edit?usp=sharing Do you know how can I fix it? I think it can be something with refresh files, I followed 2 posts:   * **Agent Analyst tool interface will not open on ArcGIS 10.1** (Agent Analyst tool interface will not open on ArcGIS 10.1)   * **ArcGIS 10.1 using Repast's Agent Analyst Extension - refresh.exe does not work** (ArcGIS 10.1 using Repast's Agent Analyst Extension - refresh.exe does not work) These posts are written for 10.1 version, though. So I changed version to 10.2, but in the second post I tried Update 2 option (I don't know how could I do update 1) and it doesn't work. In _Refresh.exe.config_ file, I tried to type in newVersion: 10.2.0.0, 10.2.2.0 and my 10.2.2.3552. Only when I put 10.2.0.0, there is no error - when I am clicking Refresh.exe file after changing Refresh.exe.config. Nevertheless there is a problem in the simulation, which I described above.


create symbology categories automatically

I am using ArcGIS 10.2.2 for Desktop. I'm creating a model that takes an Excel file with coordinates. input = Table input excel   1. make XY event   2. copy feature output = Shapefile Now I want to automatically add the shp and symbolize by category with a specific field. ![enter image description here](http://i.stack.imgur.com/1Mt7Q.png) Does a way to do this exist with ArcPy as script added to the model ? If so, how to do it? Or does a tool to exist to do this?


QGIS way to import OSM/Google Maps but remove or exclude extraneous areas, limit geographically the use of OSM

GIS Newbie question, perhaps: But I am looking to place an Open Street Maps/Google Maps layer underneath the rest of my shapefiles for referencing purposes. Let's say for instance, that I am looking at the Swiss Cantons and cities, and I want the Street Maps underneath these layers. What I have been doing is importing Open Street Maps from the OpenLayers plugins. However, this imports a world map and rendering is slow. Is there a way to import the OSM/Google Maps layer and then exclude extraneous or superfluous areas? If I am only interested in Switzerland I don't necessary need Uganda, Botswana, Kazakhstan and Indonesia as well.


Dockable window close event

Is there an event that fires when a custom dockable window is closed in ArcMap? My dockable window uses the Add-in pattern and hosts a WPF user control. It opens via a command button which is nested in an ArcGIS toolbar menu. I can listen to the OnUpdate() event of the command, however, this event will only fire when the menu is expanded. I need to know immediately when the window is closed so I can stop a background process.


Zoom in to see details

I have 2 shape files, one that shows all the counties on an island, the other shows all the villages on the island.   Here is the scenario:   My initial map shows the counties. When you click on a county, the map zooms to that county displaying the villages within. What is the best way to accomplish this using leaflet?


R.Neighbors with large neighborhoods?

I'm running into problems running the r.neighbors GRASS command in QGIS. Although it will run for small neighborhoods as soon as I increase my neighborhood above a certain number it becomes unbearably slow. I don't understand why Focal Statistics on Arcmap will do this in the blink of an eye while R.Neighbors takes ages?


How to generate wind direction raster using its U and V components in arcgis?

I have two raster layers representing the U and V components of a vector wind. I could generate the magnitude raster by applying `(u*u+v*v)` in Map Algebra in ArcGIS. Now I need to generate the direction raster with the following function:               if(u > 0 && v > 0,( atan(u/v) + 180),if(u < 0 && v < 0,(atan(u/v) + 0),if(u > 0 && v < 0,( atan(u/v) + 360), if(u < 0 && v > 0,( atan(u/v)+270)))))      but I don't know how to apply it in ArcGIS. Any help please?


INSPIRE XSD schema definitions

I was looking for `INSPIRE` `XSD` schema definitions in the Web, but nothing found. Only something like THIS. But that resource is "a little" messy... I wanted to use `xsd.exe` to autogenerate `C#` classes that could be easily serialized into `XML` that is `INSPIRE` compliant. The problem is in finding that schema file. Could you point me where to download it?


Location Data in TAIP Format to Geoevent Processor

We are testing whether we can get the surveyed cordinates in a Trimble GPS transferred online via TAIP format ( Trimble exchange protocol) to ArcGIS Geoevent processor . For this , one main concern is how the device to configure the Device to receive the data in TAIP format and secondly how to push the TAIP format to the Server. The page below provides some insight to the work flow. http://www.arcgis.com/home/item.html?id=6b458b1f4de5436486ffbd7801c6b438 The question is , how can I override the programs in the GPS to configure the TAIP format . I guess this qn should be put to the GPS hardware dealer, but if anyone can offer a suggestion, we make some headway..


PostGIS: ST_Clip() throws non-noded intersection between LINESTRING

I have a polygon and a set of rasters. I'm trying to clip raster with polygon.   ![enter image description here](http://i.stack.imgur.com/yKhDH.png)   As you see, my rasters is divided into tiles. Any tiles that is contained by the polygon has ST_Overlaps(polygon, rast_geom_4326) = 'f', obviously. And it leads to non-noded intersection error. But, I also have the same problem with this query:               SELECT ST_Clip(rast, ST_Transform(polygon, rast_geom_4326))     FROM landsat8     WHERE ST_Overlaps(polygon, rast_geom_4326)      Is there any function to dissolve the polygon with tiles, to get rid of "non- noded intersection between LINESTRING".   I've read a presentation about this error postgis-power.pdf. But, I can't find the solution for my problem.


How can I filling ring in QGIS 2.2?

I created a polygon which covers a park. But I want to distinguish some small buildings located inside the park. Consequently, I want to distinguish them and use them as independent patches inside the original polygon. I used do it the "Add ring" function in the QGIS 2.2. But I don't know, how can fill those empty holes, which were resulted. I tried the "Fill rings" options (in QGIS 2.2), but I was not lucky with it. Does anybody have an idea, how can I fix this problem?


How to add pages in print composer

Is it possible to add more than one page to one QGIS print composer Project? For example one sheet for the map and another sheet for the legend ans some other informations. Thanks in advance, Patrick


PostGIS SQL query to find a polygon that intersects with a line

I need to build a PostGIS query that would select every polygon inside an area the river is flowing through. I'd better describe with an example below: There is a river ( _blue line_ ) flowing through several violet polygons ( _selected in yellow_ ). Both of the yellow polygons are crossed by the green one (labeled Žulová, which is a boundary of a county), but the river actually flows through the only one of them (labeled 2-04-04-044) and the other one _is only touched_ by the end point of the river. The query I have so far looks like this:               SELECT DISTINCT              poradi              ,ST_Distance(ST_StartPoint(ST_LineMerge(toky.geom))             ,ST_Centroid(pov.geom)) AS dist     FROM              povodi_iv AS pov             ,cr_osy_toku_snap_2m AS toky             ,$table     WHERE              toky.gid = $gid // river id         AND                   $table.uid = $id // county id         AND                   ST_Intersects($table.geom, pov.geom)         AND                   ST_Intersects(toky.geom, pov.geom)     ORDER BY              dist ;      But it gives me the result you see on the picture. Could anyone help me out to build a query that would **return only the violet polygons that are both crossed by county boundary and flown through by a river?** ![Example of what I want to achieve](http://i.stack.imgur.com/txMWP.png)


How to extract values from rasters at location of points in R?

My question is about extracting values from rasters at the location of points. With the function extract this is very easy, and the function gives me a dataframe with the values of all the variables in the points. I want to have in that dataframe the coordinates of each point. How can I make that happen? Is it possible to say to R that when extracting the values from the raster also add the columns of the location point. This is my procedure:               presencias=read.table("c:/SDM_R/presencias/P_lentiscus_pres.csv",header=TRUE,sep=";")          lista_variables <-list.files(path="Variables_modelizacion/solo_ascii",pattern='*.asc',full.names=TRUE)     variables <- stack(lista_variables)          variables_presencia<-extract(variables, presencias)      the results are something like these:               > bio1  bio12  bio18  bio2  bio4      > 90    875    165    95    4886     > 115   1085   158    83    4075     > 135   1153   153    67    3402     > 85    1026   137    99    5203     > 96    667    128    108   5823     > 98    531    109    113   6305     > 132   450    63     123   6598     > 132   569    104    106   5963     > 95    814    196    98    5571     > 146   474    39     114   6603      But I want two more columns with the coordinate data (but could be others columns from my csv extracting location table). Thank so much.