postgis loader osm shapefile

I downloaded the map of my city already in shapefile into postgis http://metro.teczno.com/ to load in order to consult routes using pgRouting. Iss happening the error: http://metro.teczno.com/               Importing with configuration: port-alegre.osm online, public, geom, C: \ Cassia \ Shape POA-OSM \ port-alegre.osm-line, mode = c, dump = 1, simple = 0, geography = 0, index = 1, shape = 1, srid = 4326      C: \ Cassia \ Shape POA-OSM \ port-alegre.osm online: DBF file (. Dbf) can not be opened.      Shapefile import failed.       I do not know what the geometry column in esquecificar postgisloader, can someone help me?


View attachments in popup when using the editor widget

I am using ArcGIS javascript API to construct an editor app for a layer. I am using the default out of the box editor widget to edit and display data for an app. The layers I am editing contain attachments, which show up as a link within the editor's attribute viewer. Attachments are by default opened in a new window. I would like a dialog box with the attachment ( which is images) to load via a ajax request once the link is clicked. Has anybody been able to get attachments, such an image to open in a popup of some type, while using the default editor widget? My logic was to trigger an event handler that changes the link to the attachment, after the attribute inspector loads but I can't seem to find an event that is triggered during that time. Am I going at this from the right approach, or would there be a better way to accomplish this with the default editor? I know you could probably write a custom widget to to do this, but I would prefer to stick with the functionality that the editor widget provides.


In ArcMap how do I print to an image (jpg or pdf) with a transparent background?

I am trying to print a contour shapefile to an image (jpg) with a transparent background instead of white. What I want to do is add this into powerpoint as a layer over the top of a basemap so I can see both the basemap and the contours. I realize that there are ways around this. Example, I could just print two different maps; one with the contours and basemap and one with just the basemap. I also know that I could also use the remove background in powerpoint, but we had issues with some of the maps not picking out the right areas. However, my boss is adamant that there should be a way to do this exclusively in ArcMap. Anybody know of a way.


How to use ArcGIS 10.2 Features to JSON output in web maps?

Using the Features to JSON tool that is now available with 10.2, is there additional formatting that needs to be done to the files before they can be displayed as web maps?


How to display information when a certain dataset is loaded into QGIS?

I need to show the quality information of a dataset that was manually created by me, that is saved as a text file. The text file will "pop up" when the dataset is added into QGIS. I have no experience in creating plugins in QGIS. Can you help me with the approach to create a plugin for the above mentioned purpose.


How can I read the geospatial properties of ArcGIS web services using C#?

I need to display the Geospatial properties of ArcGIS web-services (like service name, service type, description, copyright, etc.) which are available in the "ArcGIS Services Directory", in my C# application. Any thoughts would be much appreciated.


WFS data expiration check

Does WFS protocol offer a way to know when layer/featureType data was last modified? If not, is there another protocol that allows retrieving such information?


Any android application for field mapping with Google map in background

I need a android/iPhone app, through which I can draw point/line/polygon while survey only. The app should have facility to use Google satellite imagery or provision for uploading base maps. Please suggest, if any.


How to use pointstacker for polygons?

I have a lot of polygons and i would like to use poinstacker. I am not familiar with sld code. I am thinking to make a point shp from the polygons centroids. Where in the sld code will i put the table feature name? Is there something else i must replace? **vol_stacked_point** Stacked Point **Styles volcanoes using stacked points** **data** cellSize 30 outputBBOX wms_bbox outputWidth wms_width outputHeight wms_height rule1 Volcano count 1 triangle #FF0000 8 rule29 2-9 Volcanoes **count** 2 9 circle #AA0000 14 **count** Arial 12 bold 0.5 0.8 2 #AA0000 0.9 #FFFFFF 1.0 rule10 > 10 Volcanoes **count** 9 circle #AA0000 22 **count** Arial 12 bold 0.5 0.8 2 #AA0000 0.9 #FFFFFF 1.0


Web GIS attribute editing forms - open source

I would like to create input masks similar to QGIS "data input masks" on web GIS. I could program this forms by hand in PHP and show form "on click". I was wondering if there is something existing there to help us speed up this proces of dynamic form building. What kind of technology should I use to build input forms for attribute data entry - review with identification? I think this is a common IT problem and I don't want to rediscover something new. Is there a web GIS that simplyfies this tasks? Maybe also support spatial editing? I wonder how large enterprises handle this kind of data input problem with open source GIS software. GS


How to calculate LS Factor of Watershed for RUSLE Calculation?

I managed to get subbasins for my catchment (7 km^2) with their areas but I haven't figured out how to get the LS factor (see Revised Universal Soil Loss Equation) from it. I have the vector file for my subbasins and I have the DEM (digital elevation model) file. I extracted the LS raster file from the DEM file (via r.watershed) but I dont know what to do afterwards. I figured I can isolate the subbasins within the LS raster file and calculate the average LS factor of those areas. Do you know how to do this? On a side note, is there a way to split up the subbasins since there are slopes that are steep with slopes that are flat? Thanks in advance.


OpenLayers ModifyFeature for multiple layers

Is it possible to configure the ModifyFeature control to edit features in multiple layers?


Points in polygon by months

I have two tables: points(gid,id,datum,x,y,geom) and hexa_grid(gid,geom). I must create new table hexa_grid_pip (gid,2008_01,2008_02 ... 2011_12, geom) In column 2008_01 ... 2011_12 must be number points in polygon. Columns 2008_01 ... 2011_12 are shortcuts of months. Is it possible to do this by using script in PostGIS, or do I have to count month by month in QGIS?


How can i select a polygon in MS SQL 2008

I am very new to MS SQL 2008. I got a task to select a polygon from the polygon layer by giving the X-Y coordinates. I already got the script for PostgreSQL for the same thing, but i need it for MS SQL 2008. the code in PostgreSQL is, `SELECT * FROM "Kar_bbmp_198" WHERE ST_Within ((ST_GeomFromText('POINT(773824 1442012)',32643)), the_geom) = TRUE;` Can anybody help me from this, thanks in advance


Query WMS GetFeatureInfo with known latitude and longitude

My issue is that normally, when you want to query a WMS layer, you need to pass width & height of a map, and x,y (in pixels) which describe a point on the map where user clicked. I want to do this in other way - I want to query this WMS layer with longitude and latitude known before. I assume, that by using some ArcObjects libraries I will be able to convert latitude,longitude and projection to width,height,x,y so that I can use GetFeatureInfo. Can someone please explain how to achieve this? I'm using ArcObjects SDK 10.1 for .NET.


Can I use GRASS algorithms in Sextante under ArcGIS?

Sextante for ArcGIS comes with SAGA modules. I know that I can use GRASS algorithms in Sextante under gvSIG. But how can I use GRASS algorithms in Sextante under ArcGIS? I tried to look for any instructions, but could not find any. Any suggestions?


How to customize legend icons in QGIS?

Under layers in QGIS shapefile polygon layers always seem to be denoted by right angled polygons which translates to the map legend in Composer. Is there any way to change the outline to a more representative shape, i.e. lakes don't normally have right angles. ArcGIS has a feature under the legend options to substitute the symbol being used in the layer with a preferred symbol, e.g. square to rounded or "blob" shaped. I'm after a similar feature in QGIS. Thanks.


What must be learned to build 3D web map?

I wish to build a 3D web map based on Silverlight or JavaScript. I cannot build 3D in Silverlight. What I should do then? Should I learn "Balder" or OpenGL or what? I must do it before 09/2014. Can you give some ideas?


Saving rasters to postgresQL using raster2pgsql, saving forecast time

I would like to save a forecast which is saved as geoTiffs into a postgresQL database. I've been able to import the rasters using: raster2pgsql -s 0 -I -d tiff/field*.tiff -F public.latest | psql -d optigrid THis gives me a table latest which looks like               rid  | rast  | filename     1      ...     field1.tiff     2      ...     field10.tiff      and so forth. However I would like to add another column which stores the time the forecast, something like               rid  | rast  | filename      | forecast_date     1      ...     field1.tiff      2012-08-09     2      ...     field10.tiff     2012-08-10      Is this possible? Thanks Matt


min function not found compiling osrm

I'm trying to compile OSRM in a Xubuntu 12.04 virtual machine following these instructions. I had some problems installing boost (a requisite) and I compiled it manually. The error is this:               /home/user/src/Project-OSRM/datastore.cpp: In function 'int main(int, const char**)':     /home/user/src/Project-OSRM/datastore.cpp:163:86: error: no matching function for call to 'min(long unsigned int, std::basic_string<char>::size_type)'     /home/user/src/Project-OSRM/datastore.cpp:163:86: note: candidates are:     /usr/include/c++/4.6/bits/stl_algobase.h:187:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)     /usr/include/c++/4.6/bits/stl_algobase.h:233:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)     make[2]: *** [CMakeFiles/osrm-datastore.dir/datastore.cpp.o] Error 1     make[1]: *** [CMakeFiles/osrm-datastore.dir/all] Error 2      I've tried to define these variables in compile time               CFLAGS=/usr/local/include     LDFLAGS=/usr/local/lib      The directories where boost headers and libs can be found. Just in case. Still getting the same error. Any suggestions? I've used boost 1.49 (I know there's a problem with it, but I'm still not there). And maybe the problem isn't boost, but something else. Many thanks in advance


ArcGIS - Create a join based on multiple fields

I have two feature classes in a File Geodatabase that I would like to join based on multiple fields. I've searched this site and Google and all I have come up with was to use the Make Query Table tool. I've tried this, but I keep getting an SQL error. My SQL is pretty poor and I'm pretty sure I'm missing something. I am aware I can create a new field and concatenate the values from my fields, but I would like to avoid this, if possible. I'm using something that looks like this:               (Table1.Field1 = Table2.Field1) AND (Table1.Field2 = Table2.Field2) AND (Table1.Field3 = Table2.Field3)      When I verify the query, I get an error that says: There was an error with the expression. An Invalid SQL statement was used. An invalid SQL statement was used. [Table1] Also, if someone has another solution that doesn't use this tool, I'm happy to hear about it. Thanks.


How to rotate sphere when using Vertical Near Side Perspective projection?

**Situation** Data is currently displayed on a globe using the Vertical Near Side Perspective projection with a blue circle as a backdrop. **Problem** I would like to 'rotate' the globe by altering the projection parameters without causing the shape files to shift away from the backdrop. The parameter that was changed was the Longitude_Of_Center ![Current layout](http://i.stack.imgur.com/sMeaP.jpg) ![Shift in shape files](http://i.stack.imgur.com/3NBuk.jpg)


How to implement a Gaussian function in field calculator?

Are there any build-in functions like Gaussian or Epanechnikov functions in field calculator? Or I have to write that by myself?


How to calculate the height of buildings from satellite/aerial images using MATLAB

I want to calculate the height of buildings from satellite/aerial images using MATLAB automatically with no or least possible human interaction. I am not using LIDAR or any DEM information. Can anyone help me out in this? My project is simple but very difficult to be completed. There are some GIS tools available for determining height of buildings but they are proprietary software and not automatic. What I am trying to do is to read satellite images in MATLAB and calculate the heights of buildings present in the images. There is no compulsion of what type of images I should use i.e I can use aerial or satellite images, normal or stereo images or oblique images. I hope this information is sufficient to answer my question, I would be really happy to provide further clarification if needed. Thanks in advance.


How to take polygon centroid in Postgis

I have table with column name,Latitude and Longitude.I want to update this with polygon name and its centroid latitude longitude.I know there is a function in postgis st_centroid(geometry). But I want to enter x value and Y value in a separate column.How can I do this? Please help me Regards, Sreesha


How to rasterize vector data correctly in GRASS GIS 6.4.0?

I try to rasterize some vector data in GRASS GIS 6.4.0. Unfortunately, it always just works with one layer. Afterwards, there are just lines generated instead of rectangles. What am I doing wrong?


openlayers - Access to geoserver layers with php authentication

I disable all anonymous requests (wms/wfs/... ) to my geoserver, but now I can't access to any layer from my openlayers app. I want to know if it is possible authenticate on my geoserver via php or javascript before any openlayer request. If yes, what is the best option? Via php crul, javascript or proxy (http://docs.geoserver.org/stable/en/user/security/tutorials/httpheaderproxy/index.html) Best regards


When is Qgis 1.9 being released

I've been working in the alpha of 1.9 for quite a while (because of doing bug reports) and I like it a lot. It's more than a year since 1.8 was released, so I wonder when 1.9 is expected out.


Radar Data - Animated Gif in Geoserver

I have 7 animated gifs (5 animations in each gif) (with bounding coordinates) of real time radar data. The number of these will grow significantly over the next year or so. We are currently serving each gif as a separate raster layer using open layers but this is causing problems on slower connections as openlayers appears to load the gifs even if not being displayed in the viewport. I would like to be able to combine and serve all the animations via Geoserver as one layer, probably animated using the Geoserver Animation feature. This is totally rocket science to me so I am reaching out for suggestions from more experienced users. I guess we have to break the gifs apart for each animation, combine them into one raster for each time slice (they are all synced), load each georeferenced raster into postGres then use geoserver's animation feature to display the layer. Am open to any and all suggestions, thanks in advance.


Customizing opentripplanner webapp

I am using opentripplanner for an app development. I want to customize the webapp. It has many different maplayers (its using openlayers). I want to change some mapslayers, but i couldn't find in which java-script file they are creating map and maplayers.


Frequency of partially or fully overlapping lines

Let **L** be a set of line-segments (lines) in a two-dimensional (2D) Euclidean space that are randomly (say, using uniform random function) distributed, that is, some may overlap other(s). Overlapping could be on a point or a line segment (in this case it is partial or full overlapping). **_We aim to represent any frequency of overlapping lines in a reasonable way_**. For those may think of rendering; it is not of our interest in this post. To start, for example, our naive solution was to discretise all the lines into a grid, that is, aiming to generate a 2D raster map i.e., a matrix. In this way, we are able to count the number of visiting per cell for all lines in the set. The resulting map/matrix (as of our quick experiments) is promising. ![enter image description here](http://i.stack.imgur.com/JGFyp.jpg) **{1} What is the closest topic (if exists) to the aim of our question?**   _The answers may help us for improving our search keywords._   **{2} Any thoughts on better ideas or suggestions for improvement?**


Overwrite option on a standalone ZonalStatisticsAsTable using ArcPy

How can I code an "overwrite option" on a standalone ZonalStatisticsAsTable using ArcPy? I don't see any overwrite option from a Esri example.               # Execute ZonalStatisticsAsTable     outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster,                                       outTable, "NODATA", "MEAN")      Is impossible or possible to overwrite?


Comparing data from two different time periods

I am trying to compare DWI frequency over the period of 3 years. I want to create 3 maps, with each one showing where DWI's occurred during 2011, 2012, and 2013. I have the point data for this, but I am unsure on the best way to display it.


Alternative to using ArcGIS Online Geocoding

I have 1.4 million addresses that I need to batch geocode. I can't find a free service to do so. Does anyone know of something out there that I can use? Oh, the service needs to be were I can upload a file in a .txt file formate, not a copy and paste. Copy and paste services crash the 661 mb size file.


SRID 4326 and geometry conversion

From this line:               SELECT ST_AsEWKT(geom) FROM buildings LIMIT 1;      I get this result:               "SRID=4326;MULTIPOLYGON(((404269.308014269 4543087.6184561,...)))"      I'm wondering if the coordinations are actually in the right format as SRID 4326? Thank you. EDIT ---- > The table was updated using this line:               SELECT UpdateGeometrySRID('buildings','geom',4326);


Distance calculation : Integrating incremental gps data

I am trying to build a GPS based odometer based on android. Currently , I am calculating incremental distance changes very frequently ( < 5 meter movement). The distance calculation in android is using the WGS84 ellipsoid. Currently on test runs, The gps calculations overshoots by 3 - 5% depending on route taken and duration of travel. There are two problems I am facing :   1. The distance calculation is not considering altitude.   2. When the vehicle is stationary, gps starts injecting errors due to position changes which even though the device is stationary gps does calculation errors. This is the source of most of the error. Details for error 2 : Typically, when in a traffic signal / just plainly stopped on road. The android api tells me the new lat long pair when there is a displacement of minimum 5 meters. The problem is the api informs me of even the "drifted" lat long to be 5m away and hence I increment the odometer value which keeps accumulating errors because device did not move.Hence if the device is stationary it keeps accumulating this error. An example "error" data when device is stationary               Device  Latitude    Longitude   Accuracy    Speed   Altitude    Heading     gps 13.0311466666667    77.5577383333333    41.5    1.9193991   894.7   295.77     gps 13.0311516666667    77.557795   38.8    0.99907583  892.8   294.88     gps 13.0311616666667    77.55784    38.4    0.5883275   886.4   294.88     gps 13.031175   77.5578866666667    37.5    0.74892086  886.1   294.88     gps 13.0311816666667    77.5579383333333    32.5    0.6552414   886 294.88     gps 13.0311516666667    77.557975   27.6    0   885.9   294.88     gps 13.0312016666667    77.5579733333333    32.4    0.7175228   885.9   294.88     gps 13.0312316666667    77.5579366666667    31.8    0.5610472   885.9   294.88     gps 13.031235   77.557885   30.4    0.9028228   885.9   294.88     gps 13.031245   77.5578366666667    30.5    0.81634945  885.8   294.88     gps 13.0312416666667    77.55779    27.9    0.5559  885.8   294.88     gps 13.0312233333333    77.5578433333333    23.9    0.43236667  886 294.88     gps 13.0312066666667    77.5578883333333    23.6    0.43905807  886.2   294.88     gps 13.03119    77.5579366666667    23.6    0.49258918  886.3   294.88     gps 13.0311666666667    77.5579983333334    24.9    0.77208334  886.7   294.88     gps 13.0311316666667    77.557945   22.4    0.3958214   887.8   241.89     gps 13.03113    77.5578416666667    25.2    0.24089 890.5   269.19     gps 13.0311133333333    77.5579 20.7    0.40663055  891.2   221.69     gps 13.0311116666667    77.5578516666667    21.9    0.47302973  891.3   251.03     gps 13.03104    77.55787    26.7    0.40199804  891.3   134.23     gps 13.0311033333333    77.5579333333333    23.6    0.5193547   891.6   332.92     gps 13.0310766666667    77.557985   19  0.38346806  893 118.18     gps 13.0311333333333    77.557945   27.9    0.3381725   896.9   287.31      Full data set is available here . It has > 5000 data points corresponding to a round trip from my home to office and back. From the start about ~800 data points are error beyond that the device starts moving. Also adding raw nmea strings..               $GPGGA,191215.557,1301.8784,N,07733.4765,E,0,0,,912.5,M,-88.1,M,,*68          $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,1.00*01          $GPGSV,3,1,11,29,53,169,18,21,49,005,,18,44,334,17,15,34,037,*76          $GPGSV,3,2,11,14,31,211,,22,27,284,,09,27,107,,27,22,087,*76          $GPGSV,3,3,11,25,10,183,,06,09,318,,30,04,261,*42          $GPRMC,191215.557,V,1301.8784,N,07733.4765,E,0.009,0.00,160712,,N*68          $GPVTG,0.00,T,,M,0.009,N,0.017,K,N*3D          $GPACCURACY,27947.3*04          $GPGGA,191216.557,1301.9128,N,07733.4723,E,0,0,,911.4,M,-88.1,M,,*6A          $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,1.00*01          $GPGSV,3,1,11,29,53,169,18,21,49,005,,18,44,334,18,15,34,037,*79          $GPGSV,3,2,11,14,31,211,,22,27,284,,09,27,107,,27,22,087,*76          $GPGSV,3,3,11,25,10,183,,06,09,318,,30,04,261,*42          $GPRMC,191216.557,V,1301.9128,N,07733.4723,E,0.001,0.00,160712,,N*60          $GPVTG,0.00,T,,M,0.001,N,0.002,K,N*31          $GPACCURACY,27942.6*04          $GPGGA,191217.557,1301.8573,N,07733.5089,E,0,0,,909.4,M,-88.1,M,,*6F          $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,1.00*01          $GPGSV,3,1,11,29,53,169,18,21,49,005,,18,44,334,18,15,34,037,*79          $GPGSV,3,2,11,14,31,211,,22,27,284,,09,27,107,,27,22,087,*76          $GPGSV,3,3,11,25,10,183,,06,09,318,,30,04,261,*42          $GPRMC,191217.557,V,1301.8573,N,07733.5089,E,0.068,0.00,160712,,N*63          $GPVTG,0.00,T,,M,0.068,N,0.126,K,N*39          $GPACCURACY,19781.4*0A      Also, I am finding it very hard to visualize this data using excel, can anyone suggest better tools ( I use a MAC ) Can some one give me ideas to reduce the errors , perhaps a better algorithm to consider even altitude?


MapServer Pixmap Symbol GAP for Park Polygon Layer

I have a   * Polygon layer (National Park)   * PNG Pixmap symbol (from Maki icon set)   * MapServer 5.6 If I use the PNG Pixmap symbol for my Polygon Layer, Mapserver fills the polygon layer with the png symbols. I tried using GAP 300 However it doesn't seem to work with pixmap (works fine with vector symbol) Is there another way to use GAP for pixmap ?


Geoserver returning Translator Error when I use PropertyIsLike

I'm converting a WFS app from MapServer to GeoServer (2.1.4) and have hit a snag around PropertyIsLike. Whenever I include it in a getFeature's filter I get back a ServiceException as seen below. This is the filter sent to getFeature:               <Filter xmlns='http://www.opengis.net/ogc' >         <ogc:And>                      <BBOX>             <PropertyName>geom</PropertyName>             <Box srsName="EPSG:4326">               <coordinates>174.74029566015622,-37.005568168501505 175.0849917050781,-36.89582122701751</coordinates>             </Box>           </BBOX>           <ogc:PropertyIsLike  wildcard="*" matchCase="false" singleChar="." escape="!">             <ogc:PropertyName>locality</ogc:PropertyName>             <ogc:Literal>*reek*</ogc:Literal>           </ogc:PropertyIsLike>       </ogc:And>     </Filter>      And this is the error               <ServiceExceptionReport version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">       <ServiceException>         error:Translator error         Translator error         java.io.IOException         null         null       </ServiceException>     </ServiceExceptionReport>      It works fine if I remove the PropertyIsLike, and it works if I change it to PropertyIsEqual, but I need a wild-card search. I've looked over and over the filter and I can't see a problem with it. Can someone see an error, or suggest another way to achieve a wild-card search on GeoServer? _Update_ Here is the requested full stack trace. 2012-07-16 15:55:41,953 ERROR [geoserver.ows] - org.geoserver.platform.ServiceException: error:Translator error at org.geoserver.wfs.xml.GML2OutputFormat.encode(GML2OutputFormat.java:286) at org.geoserver.wfs.xml.GML2OutputFormat.write(GML2OutputFormat.java:295) at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:141) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:751) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:238) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406) at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185) at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: javax.xml.transform.TransformerException: Translator error at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:136) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:111) at org.geoserver.wfs.xml.GML2OutputFormat.encode(GML2OutputFormat.java:276) ... 73 more Caused by: java.lang.RuntimeException: java.io.IOException at org.geotools.data.store.ContentFeatureCollection.iterator(ContentFeatureCollection.java:258) at org.geoserver.feature.RetypingFeatureCollection.iterator(RetypingFeatureCollection.java:44) at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:53) at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:513) at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:939) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:299) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:132) ... 75 more Caused by: java.io.IOException at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:576) at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:484) at org.geotools.data.store.ContentFeatureCollection.iterator(ContentFeatureCollection.java:255) ... 82 more Caused by: java.lang.NullPointerException at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:450) at org.geotools.filter.LikeFilterImpl.accept(LikeFilterImpl.java:614) at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:544) at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:496) at org.geotools.filter.AndImpl.accept(AndImpl.java:64) at org.geotools.data.jdbc.FilterToSQL.encode(FilterToSQL.java:205) at org.geotools.data.jdbc.FilterToSQL.encodeToString(FilterToSQL.java:234) at org.geotools.jdbc.JDBCDataStore.selectSQL(JDBCDataStore.java:2885) at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:564) ... 84 more


Python: Run script when opening an MXD in ArcGIS 10

This post is related to Run a Python Script when opening an MXD? I would like a python script to run every time a .mxd is opened. However, the link above uses VBA to do it, which ESRI suggests migrating away from.... http://events.esri.com/uc/QandA/index.cfm?fuseaction=answer&conferenceId=2F6DC1A1-1422-2418-883C3868A9004888&questionId=3182 I am looking for way to do it with python. Thoughts?


Making calls the PostGIS functions with Java

We have Java stored procedure in Oracle that make calls to functions offered by Oracle Spatial to perform spatial analysis and return results. I am looking to the same in PostGIS, is this possible?


Any tool to monitor ArcGIS Server Usage

I am using ArcGIS Server 10.1 on AMI instance. I have around 10/12 simple map services (Used query layer in all services) I want to check performance/time/statistics of map services in ArcGIS Server. So is their any tool to monitor ArcGIS Services ?? **What I found so far :** 1.According to http://ideas.arcgis.com their are few third party tools available. 2.Using windows task manager I can monitor only process not the services. 3.In 10.0 version its possible to see the statistics/min ,max time using 'statistics' tool in ArcGIS Server I think in 10.1 its not present 4.Using ArcPy I doubt its possible .Even I tried using ArcGIS ADMIN API for server. 5.Screenshot of windows task manager (javaw.exe taking too much memory but its important to run the ArcGIS Server according to this post) ![ArcGIS Server 10.1_windows task manager](http://i.stack.imgur.com/UMNrZ.png) Any help will be great !! thanks in advance : ) **Update** According to @Alex Tereshenkov answer I downloaded the tool but it work with Web adapter only. We do not have the Web adapter we are using reverse proxy at our end. Found this useful article for ArcGIS Server to test the load balance using Jmeter


Can we do operations like Geo-referencing and Geo-coding in NoSQL Databses

I want to generate a map, using some spatial data provider like OSM. I am trying to put in some dynamic data-set on top of the base map. The data size is considerably large enough to be called as BigData. Its taking hours to insert data into PostGIS. NoSQL Databases are meant to be scalable for humongous data sets. So my query is can i replace my PostGIS database with NoSQL, considering the scale-out factor and the enormous growth of data. If so which seems best MongoDB, Hbase or Neo4j.


How to set a definition query for an AGS layer?

Is it possible filter out some features using a definition query set from the client on a AGS layer? I've checked out the map server layer but it only supports find and identify. Also looked at WMS, WFS and the Feature Service. Can't find a way that works. Do I need to extend the AGS to get this functionality? **Update:** What I'm trying to do is opening an MXD in an ArcGIS Engine application. The MXD has an ArcGIS Server map server layer. I would like to filter out some of the features in one of the ArcGIS Server layers by using an definition query.


Create closest-distance line in MapInfo

As part of a larger program (basically a remake and extension of DistanceCalc) I want to programmatically create a line between the two closest points of two regions in MapInfo. The ObjectDistance function effectively measures this line and returns its length but there is no way to store the line itself. The "Nearest" statement almost does what I want but it does too much! - it measures from one site (or each item in a table) to each item in another table. Also it puts the results in a table whereas I want to manipulate them before storing them. Is there a simple way to do this?


Is there a good GPS track analysis library?

I keep writing custom code to work with GPS tracks: GPX files and NMEA logs from my phone, dedicated GPS logger, etc. I feel like I'm reinventing the wheel and am wondering if there's some standard library / tool I can use to work with GPS tracks. Some of the things I like to do:   * Calculate the distance travelled on the track   * Calculate the average speed and instantaneous speeds along the track   * Calculate time in motion vs. time stationary   * Simplify the track, eliminate stationary segments   * Segment a track into separate tracks, one per trip   * Smooth out GPS sampling error   * Create an elevation profile by looking up points in a DEM   * Convert the tracks to GPX, KML, etc for visualization There are a variety of applications that analyze GPS tracks. I'm looking for a software library or scriptable set of tools so I can write my own applications. I don't much care about input formats; any sort of timestamped lat/lon points is fine. I mostly work in Python on Unix but pretty much any language will do. Existing tools I use include GPSBabel and GDAL/OGR for conversion and PostGIS for working with the track geometry as a line string. But mostly I end up writing my own Python code that works on arrays of lat/lon pairs and that feels too low level. Also some of the tasks above (like removing GPS error) are quite subtle. Is there some existing library out there I should be using?


How to load postgis layer to map control with mapwingis?

I search over the internet but couldnt find out the resolution. I create GIS app with MapWinGIS library, I have some spatial table in PostgreSQL (table with geometry column). I want to load these table as shapefile to map control. Is there any way to do that ? Thank all.


combine two OCG filters in Openlayers : ERROR: invalid input syntax for integer

**i need to combine two OCG filters. each one works fine separably but if i combine them using Filter.Logical.OR, the first one works only.**               var c_filter = new OpenLayers.Filter.Logical({      type: OpenLayers.Filter.Logical.OR,      filters: [      new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.EQUAL_TO,          matchCase:false,          property: 'id',          value:(document.getElementById("Text")).value              }),        new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.LIKE,          matchCase:false,          property: 'name',          value: "*" +(document.getElementById("Text")).value + "*"            })           ]      });       **as you can see, the first one expect integer and the other one a string. also i tried:**               var id_filter = new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.EQUAL_TO,          matchCase:false,          property: 'id',          value:(document.getElementById("searchText")).value              });        var name_filter = new OpenLayers.Filter.Comparison({          type: OpenLayers.Filter.Comparison.LIKE,          matchCase:false,          property: 'name',          value: "*" +(document.getElementById("searchText")).value + "*"            });               var orFilter = new Array();      orFilter.push(id_filter);      orFilter.push(name_filter);                     wfsProtocol.read({                      filter: new OpenLayers.Filter.Logical({                       type: OpenLayers.Filter.Logical.OR,                       filters: orFilter                   }),                 callback: processTheQuery,          scope: strategy               })       **and still, the id_filter works fine. but the name_filter i got the error: ERROR: invalid input syntax for integer: "test name" i don't understand why it should be integer !! and if i try name_filter alone, it works fine !**


is there any relationship between drawing graphics and IIS overloading

I'm running gis web application built on silverlight but when many users connect to the system the IIS reaches the full memory so could the reason be from many users draw graphics at the same time ,if not what could makes the IIS overloaded and not responding. regrads.


How to trim Landsat 5 scene edges

I have a bunch of Landsat 5 scenes that I want to mosaic together. However Landsat 5 scenes have a zigzag pattern on the left and right edges as well as some bad data values along these edges. Is there a program that can automatically trim the edges of the Landsat 5 scenes so that all the edges are nice and straight?


How to perform an attribute-weighted sum of multiple polyline features from a single vector layer?

I have a shapefile of ~8000 polyline vector features representing traffic journeys on road routes. Each has an attribute representing volume of traffic for that journey. The routes are all generated by the same routing engine so the node coordinates should match exactly where routes follow common sections of road. I am wanting to effectively add these together in a "map algebra" sort of way to give a representation of network usage. Keeping the result in vector would be preferable, but ultimately not essential. I can see how this could be done conceptually simply by converting each feature to a separate raster of pixel values = traffic volume, then summing all the rasters but this would practically be very painful to combine 8000 high-resolution rasters. Ironically, QGIS is effectively already doing this visually for me - I am displaying the layer using combining of features by "addition" method.. but I can't see any way of getting that directly out into a much higher resolution raster format than my display: ![QGIS-rendered display screengrab](http://i.stack.imgur.com/EihUh.png) Surely there must be a vector way to do this? (QGIS or ArcGIS) If it makes it easier to not go the shapefile route I have all the route nodes in CSV format, one line per route. The polygon "union" then "dissolve" method outlined in How to union polygons and add attribute values of combined output features looked promising, but Union does not work on line features it seems. Flicking through the ArcGIS Network Analyst "Route Analysis" pages looked potentially promising if rather OTT for this purpose and I'm guessing would require a lot of messing round to get there - I'm sure there must be a simpler way!


How to link to external files with relative path in QGIS actions?

_Objective_ : I have point layers with attributes contain paths to external files (visio, autocad dwg...). I want to put them all in one folder together with the project file, compress the folder into a zip file and send it to my colleagues for reviews. When my colleague de-compress the zip file, they would be able to open those files with simple actions like the posts linked below. _My observation_ : what I want to accomplish is very similar to those discussed in this post and this post with one difference: when the zip file is de-compressed, absolute path to referenced files will be different. But I think that RELATIVE PATHS to the project file will be the same, so why not use this? The problem is: I can not find a way to open external files with relative paths inside QGIS. Any idea how to solve this problem? Thanks a lot!


How can I force ArcGIS to generate "color pallets" for display of GeoTiffs in the FAIMS Mobile App?

The FAIMS Mobile App 1 displays a black pane instead of a well rendered geotiff when I try to import files directly from ArcGIS 10.1 instead of processing them through gdal and grass. Running gdalinfo, the major difference between pre and post processing with GRASS is the presence of: > >     Band 1 Block=256x256 Type=UInt16, ColorInterp=Palette >       Color Table (RGB with 65536 entries) >         0: 5,5,5,255 >         1: 5,5,5,255 >   >     ... >   >       65534: 0,0,0,255 >       65535: 0,0,0,255 >   The ArcGIS produced Geotiffs by our resident mapping person do _not_ have this, unfortunately. I know a limitation of the Nutiteq rendering engine the app uses requires either this color palette or the kind of tiff that shows up normally when viewed with a normal image viewer. Our normal prep methodology is kind of painful, and I'm wondering if there isn't a simpler solution. Is there a way to force ArcGIS to generate a geoTIFF that:   1. Is in the required projection for display (EPSG:3857),    2. equivalent to -co TILED=YES (I know tiled means many different things, so this is the tiled of gdalwarp)   3. And has a written colour pallette for the UInt16 that it needs? 1Fair disclosure, I'm one of the FAIMS project leads.


QGIS: creating lines from starting to arrival points?

Is it possible in QGIS to create lines from a table storing the X,Y-coordinates of starting and arrival points? So that a line.shp is automatically created? Or exists a plugin to achieve that? Thank's for any advice! Best regards, phil


Can I view a Postgis Geometry Array in QGIS?

I have got an array of geometry as a column in postgis database. Is it possible to view the data (even the nth element?) in qgis?


How to add raster data to Table of Contents using python?

I can easily add shapefiles to the Table of Contents in Arcmap using the following codes:               mxd = arcpy.mapping.MapDocument("current")      df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]     path = os.path.abspath("shapefile_path")     addLayer = arcpy.mapping.Layer(path)     arcpy.mapping.AddLayer(df, addLayer)     arcpy.RefreshActiveView()     arcpy.RefreshTOC()     del mxd, addLayer       but I am confused how to add raster data (which usually consists of several files). Any help would be much appreciated.


How do osm2pgrouting and osm2po differ in their ways creation?

How do osm2po and osm2pgrouting differ in their algorithms for creating their `ways` table ? I've seen significant differences between their processing of the same osm extract. Processing the same file (us-midwest-latest.osm) from geofabrik using both `osm2po` and `osm2pgrouting` (and using config for cars only with both) resulted in nearly 400K more entries in the `ways` table from `osm2pgrouting` than in the corresponding `*_2po_4pgr` table. Does osm2pgrouting just create more nodes/vertices?


How to delete column/field in PyQGIS?

How to remove or delete column fields in a shape file using python?


Importing KML in QGIS - what are all the node elements that QGIS looks for other than Name and Description?

Of all elements given at (ref: http://service.kmlvalidator.com/ets/ogc- kml/2.2/) only Name and Description seem to be recognized on importing KML using QGIS 1.8.0-Lisboa. I would like to know if this is completely true or few other elements from the spec are also recognized? My question is related to the two below:   1. GDAL 1.9.1 ogr2ogr KML to PostGIS not incuding ExtendedData   2. How to convert KML to shape file without losing attributes?


How to compute geometric intersection using ArcPy?

I want to take geometric intersection of line and polygon shapefile. ArcPy has a tool:               arcpy.Identity_analysis      but it is available with "ArcGIS for Desktop Advanced" and I have "ArcGIS for Desktop Basic". Any replacement suggestions would be appreciative.


Any case when one must use older ArcPy cursors (not da module based)?

I was using the arcpy.da cursors in ArcGIS 10.2 to iterate for quite some time now yet didn't use "classic" cursors that became available in 10.0 a single time. Is there any situation where one would must (due to a limitation or a similar reason) use arcpy.%type%Cursor instead of arcpy.da.%type%Cursor? Esri help doesn't seem to outline any case when one would need to use classic one: > ArcGIS 10.1 added a new data access module (arcpy.da) The previously > existing cursors (that are still listed under arcpy) are still functional > and valid; however, the new arcpy.da cursors include significantly faster > performance. So, I am just wondering why Esri keeps updating the older arcpy cursors in 10.2 when the Data Access module is available since 10.1 and provides "better" cursors? Is there any other reason apart from keeping 10.0 scripts that use arcpy (not da module based) cursors running?


How to set style in the database (QGIS)

Is it possible to set style layers in the database? (QGIS) [MySQL database] I would like to set and share my style to other users when they open the layer it's still as my style. Thank you


Calculate shortest path between each lat/lon point in one table and each lan/lon point in another in Postgresql

I have two tables, both of them have only 2 columns. The first one contain only latitude and longitude coordinates of my source points and the other one only latitude and longitude coordinates of my target points. For each source point I have to find the closest (along the streets) target point (and tell what's the distance). I have already developed a function give_me_cost, that finds the closest node and performs the routing:               create or replace function nearest_node (double precision, double precision) returns           integer as     $$     SELECT id::integer as source_id FROM roads_vertices_pgr                             ORDER BY the_geom <-> ST_GeometryFromText('POINT('                             ||$1|| ' ' ||$2||')',4326) LIMIT 1;     $$ language sql;          CREATE OR REPLACE FUNCTION give_me_cost(double precision, double precision, double precision, double precision)       RETURNS decimal(8,8) AS     $BODY$     with subset as (     SELECT seq, id1 AS node, id2 AS edge, cost       FROM pgr_dijkstra(         'SELECT gid as id, source, target, st_length(geom) as cost FROM roads',         nearest_node($1,$2),nearest_node($3,$4), FALSE, False       ) as di     )     select sum(cost)::decimal (8,8) from subset          $BODY$       LANGUAGE sql VOLATILE;      Now I have to use it in some kind of loop, but don't know how. The most preferable solution would be the function, where I can input my source table and my target table and get an output of a table with sources, the closest targets and the distances between them. Any help appreciated.


Concatenate multiple string / text fields some of which may have NULL values ArcGIS

I am trying to repeat the behavior of this code from the ESRI website. I want to replicate the output example in `ALL_Type` field, so that it concatenates a field but it deals (ignores) any that have NULL values. Unfortunately this example no longer works at 10.2.2 because all example of NULL return a "None" text. Instead I just want a blank to show. ![enter image description here](http://i.stack.imgur.com/VjHgM.jpg) ![enter image description here](http://i.stack.imgur.com/hZZRY.jpg) And here is the code.                  "*args" allows this routine to accept any number of field values.     # the values are passed as a Python tuple, essentially a     # non-editable list     #     def concat(*args):            # Initialize the return value to an empty string,       # then set the separator character       #       retval = ""       sep = "_"            # For each value passed in...       #       for t in args:         # Convert to a string (this catches any numbers),         # then remove leading and trailing blanks         #         s = str(t).strip()              # Add the field value to the return value, using the separator         # defined above         #         if s <> '':           retval += sep + s            # Strip of any leading separators before returning the value       #       return retval.lstrip(sep)


How to draw a rectangle graphic element (given feature and extents in meters) with ArcObjects?

I am trying to render a rectangle graphics box onto the map, given the center location of an polygonal feature and the extent dimensions (length and width) in meters. The feature has the spatial reference of its shape set to WGS84 though. I am able to get the location of the feature (an IPoint) by taking its centroid. Is there then a straightforward way to accomplish the drawing of such a box with meter-dimensions around that point? Looking at the API, IEnvelope seems to be what I need, but will I have issues with unit-conversions (since I need the extent dimensions to be in meters)? And how should I go about rendering the IEnvelope? Any help is appreciated, thanks!


Need help for getting a high resolution satellite image for digitising features in ArcGIS?

I want to digitise some places of my city in ArcGIS. I found ArcGIS 'World Imagery' layer which I can use it as a basemap for digitisation. But the problem is it works only while the internet is connected. Is there anyway to save the cache of the layer at a particular zoom level so that I can work on it offline even after I restart the computer. If no, please tell me any other way- may be with google or bing imagery, I need to digitise important features of the city. So i require resolution at house level.


How to detect(condition) if Query Layer Connection is failing?

I have a job (arcpy script) which relies on a query layer but it fails sometimes. It has to do with the query layer connection (the point where job fails randomly)- which is totally under the control of ORACLE team. I want to capture this to discuss with ORACLE team. What should be the right layer property to capture this?


How to use ArcGIS 10.1 to make Python scripts for ArcGIS 9.3?

Recently I have been making scripts to run geoprocessing tools for a client who is running ArcGIS 9.3. However I only have access to ArcGIS 10.1. As a result I cannot use model builder in 10.1, and have to script everything with arcgisscripting (`import arcgisscripting`). I cannot find many arcgisscripting examples beyond the 9.3 help files. My questions are: is there a way to reverse convert 10.1 (arcpy/modelbuilder) scripts to 9.3? Is there a place with good arcgisscripting .py examples? Has anyone else done this?


How to draw parallel or curved labels for OSM data in QGIS?

I'm trying to recreate a Google style map using OpenStreetMap data and QGIS. I've been following underdarks many wonderful guides but am getting stuck at the labels. The OSM data was taken from geofabrik and imported into a postgreSQL/postgis database using osm2pgsql. When I try to label the roads it seems to place them as points and does not give the option for parallel or curved labeling. You can see the result below. ![enter image description here](http://i.stack.imgur.com/VQUaz.jpg) When I click on the advanced tab for labeling all I see are the data defined placement options and no check box for curved or parallel labeling. I'm new to QGIS so I hope I'm missing something really simple.


Hydrograph in GRASS

How to make hydrograph for a basin in GRASS? While surfing the GRASS home page, I came to know that some time back in GRASS 4.x a command _r.water.fee_ exist. I understand, it is missing in GRASS 6.4. Is there any equivalent command for this? Any alternate? Thanks in advance....


Change Attirbute Name (Fiona)

I have a shapefile that has 2 attributes named "X" and "Y". I want to change this to "Lon" and "Lat". My (limited) experience tells me that I should read in the original shapefile, preserve the original driver, crs, make a new schema with "Lon" and "Lat" defined, and then write a new/new named shapefile. Is there a quicker/easier way with fewer steps?               import fiona          with fiona.open(filein, 'r') as source:         source_driver=source.driver         source_crs=source.crs         source_schema=source.schema         print(source_schema)          new_schema= {'geometry': 'Point',              'properties': { 'Lon': 'float:16.6',                               'Lat': 'float:16.6',                               'SP': 'float:16.6',                               'X_meter': 'float:19.11',                               'Y_meter': 'float:19.11',                               'Depth': 'float:19.8',                               'Line_Name': 'str:50',                               'SurveyID': 'str:50'}}          with fiona.open(fileout, 'w',             driver=source_driver,             crs=source_crs,             schema=new_schema) as c:         print(len(c))          c.closed


How to rasterize a point layer? Cell value should be 1 if feature attribute is 1

I’m a fairly experienced GIS user, but I’m new to QGIS. I’m using version 2.2, and I’m trying to convert a point data layer into a raster data layer using the Rasterize tool. The point data layer has an integer field with a value of 1 for all records, and I want to make a raster data layer which has a value of one for each cell which has at least one point in it (some cells have more than one point in them). When I use the Rasterize tool, it creates the raster data layer fine, but all cells with have points in them appear to have a value of 0.995968. I’ve tried editing the gdal code (even making the resulting raster data layer an integer layer), but I still cannot get it to produce a raster with a value of 1 rather than just a number very close to one. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? On a related note, is it possible to use the Rasterize tool to work out the average or total values for all the points which fall in each grid cell? If so, how (I can’t find anything in the gdal instructions themselves which would suggest this is possible, but I might be missing something). If this isn’t possible to do with the Rasterize tool, are there other tools in QGIS which can do this? Thanks for any help anyone can give on this. All the best, Colin


pass an array of geometry to postgresql function

I am trying to pass an array of geometry to a postgis function using JDBC with JAVA:                           CallableStatement proc = conn.prepareCall("{ ? = call somefunc(?) }");                 proc.registerOutParameter(1, 7);                 PGgeometry[] arr = new PGgeometry[2];                 arr[0] = a;                 arr[1] = b;                 proc.setArray(2, conn.createArrayOf("geometry", arr));                 proc.execute();      a,b are valid PGgeometry types. I am getting this exception:               Exception in thread "main" java.lang.AbstractMethodError: org.postgresql.jdbc3g.Jdbc3gConnection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;      Is this even possible to do? I found no good answer for that. Thanks!


Carto CSS variables

Does anyone know whether it's possible to use a variable within an attribute selector. For example I define my variable at the top of the file:               @lowZoomMax: 9;      And then reference it as follows:               #settlement {      [zoom > @lowZoomMax] {     ...     ...     }     }      This doesn't appear to work in the map I currently have - I get `Invalid Code: @lowZoomMax` (in the second bit of code, not the definition).


How can I get my raster analysis to produce a larger extent in ArcGIS

Ok so the situation is as follows. I have an vector shapefile and within that area there are three points. I converted the points into raster and now I want to do a Euclidean distance analysis in ArcMap. My window is clipped to the extend of the vector shapefile so that the Euclidean distance analysis will only cover the inside of my area. Instead getting a nice output the output only covers a certain part of the vector shapefile instead of the full extent. so this is the map with the point. ![enter image description here](http://i.stack.imgur.com/0dxr5.png) and this is afer the analysis ![enter image description here](http://i.stack.imgur.com/7DI1T.png) Does anybody know why this is and how I can fix it?


How to reproject EPSG:102218 with QGIS?

I have a raster file. ArcMap says it is in `NAD_1983_USFS_R6_Albers` (EPSG:102218). QGIS says it is in `USER:100000 - * Generated CRS (+proj=aea +lat_1=43 +lat_2=48 +lat_0=34 +lon_0=-120 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs)`. I assume QGIS doesn't know that coordinate system. So I can also not re- project it with QGIS, right? Is there a work around to still reproject it with QGIS? I don't want to re-project it with ArcMap.


Materialized View Does Not Appear In Geometry_Columns View

I have defined a materialized view in a PostGIS 2.1-enabled database running PostgreSQL 9.3.1:               CREATE MATERIALIZED VIEW canvec_data.contours_m AS       SELECT         contours_original.ogc_fid,          contours_original.elevation::integer AS elevation_orig,          CASE             WHEN "substring"(contours_original.code::text, 1, 3) = '257'::text THEN round(contours_original.elevation::double precision * 0.3048::double precision)             ELSE contours_original.elevation::double precision         END AS elevation_m,          contours_original.wkb_geometry::geometry(Linestring,3578)      FROM canvec_data.contours_original      I had, perhaps erroneously, expected that this resultant entity (a table?) would be listed in the `public.geometry_columns` view, and thus be properly interpreted by GIS viewer software such as QGIS. The materialized view does not appear in the `public.geometry_columns` view. What am I doing wrong? Thanks!


I am migrating my Application built in Version 9.3.1 to version 10 In my code I am getting the exception: `Retrieving the COM class factory for component with CLSID {4147A362-EFC4-11D3- A0A4-00C04F6BC626} failed due to the following error: 80040111` at this place: `IExportOperation pExportOp = new ExportOperationClass();` I have already bound my application with bindmanager code: `ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);` Every thing works fine like creating IWorkspaceFactory InitiallizeLicense, the exception arises as this statment is executed: `IExportOperation pExportOp = new ExportOperationClass();` Is there any solution to avoid this exception? Please help. Thanks


Unicode Characters in GRASS ps.map instructions file

I am trying to put text on a ps.map generated map and the text contains the degrees symbol. I can insert the symbol into the instructions file, and it looks fine, but when I generate the map, the result is Â° Here's the instruction: text 99% 63% 60 °N fontsize 16 ref left end Does anyone have advice on how to get unicode symbols to display correctly with ps.map?


why are my buffers not lining up with their original points despite setting the layer crs as all the same crs when I reopen my project

I am having my entire project in pseduo mercator (google earth raster image) and when I create buffers for points and then open back up my project all the buffers are offset from their points. Update: pseudo-mercator-error So my buffers I got to line up with their original centers, but other points that I meant to place within proximity were offset. I think it has something to do with meters and relative buffer distance being the reason why the buffers were fixed, but not some of the points.


OpenLayers Icon e PopUp

Ciao, sto creando una pagina in php con una mappa ... in OpenLayers Examples ho trovato due interessanti esempi:   * esempio che mostra come usare diversi tipi di poupup (http://openlayers.org/dev/examples/popupMatrix.html)    * esempio per inserire icone personalizzate (http://openlayers.org/dev/examples/markers.html)  Il mio problema è che non riesco ad integrare i due esempi... dal primo:               echo"              ll = new OpenLayers.LonLat($lng,$lat).transform(                  new OpenLayers.Projection('EPSG:4326'), new OpenLayers.Projection('EPSG:900913')              );              popupClass = OpenLayers.Popup.Anchored;              popupContentHTML = '$T';              addMarker(ll, popupClass, popupContentHTML, false, true);       dal secondo:               echo"              ll = new OpenLayers.LonLat($lng,$lat).transform(                  new OpenLayers.Projection('EPSG:4326'), new OpenLayers.Projection('EPSG:900913')              );              var size = new OpenLayers.Size(50,50);              var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);              var icon = new OpenLayers.Icon('{$row['enclosure']}',size,offset);              markers.addMarker(                  new OpenLayers.Marker(                      (ll                      ),icon                  )              );      ";       Ho notato che nel primo addMarker richiama una funzione, che sembra simile a markers.addMarker ... sinceramente non so dove mettere ", icon" nel primo o nella funzione che richiama? EDIT - Translation to English (Tradotto in inglese) Hello, I am creating a php page with a map ... in OpenLayers Examples I found two interesting examples: • Example showing how to use different types of poupup (http://openlayers.org/dev/examples/popupMatrix.html) • example to insert custom icons (http://openlayers.org/dev/examples/markers.html) My problem is that I can not integrate the two examples ... the first:               echo"                  ll = new OpenLayers.LonLat($lng,$lat).transform(                      new OpenLayers.Projection('EPSG:4326'), new OpenLayers.Projection('EPSG:900913')                  );                  popupClass = OpenLayers.Popup.Anchored;                  popupContentHTML = '$T';                  addMarker(ll, popupClass, popupContentHTML, false, true);       The Second:               echo"              ll = new OpenLayers.LonLat($lng,$lat).transform(                  new OpenLayers.Projection('EPSG:4326'), new OpenLayers.Projection('EPSG:900913')              );              var size = new OpenLayers.Size(50,50);              var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);              var icon = new OpenLayers.Icon('{$row['enclosure']}',size,offset);              markers.addMarker(                  new OpenLayers.Marker(                      (ll                      ),icon                  )              );      ";       I noticed that in the first addMarker calls a function, which looks similar to markers.addMarker ... I honestly do not know where to put "icon" in the first or in the function calling?


Python Script to convert a mass of KMLs to a single fGDB

I have a mass of KML files, approx 350+ that I need in a single fGDB. I lifted a string of code from ESRI help to attempt to do this - I got it working to the point of creating all the individual gGDBs (one per KML) but its failing with an invalid character in a variable somewhere. Below is the code, and then the error that it throws out. I've added some print commands to show whats in the variables right before it fails. Help? Also, this is my first time trying to use python for actual work, so I apologize in advance for n00bish mistakes.               # Name: BatchKML_to_GDB.py     # Description: Converts a directory of KMLs and copies the output into a single fGDB.     #              A 2 step process: first convert the KML files, and then copy the featureclases          # Import system models     import arcpy, os          # Set workspace (where all the KMLs are)      arcpy.env.workspace="C:\\Users\\mperez\\Desktop\\IT-Paths"          # Set local variables and location for the consolidated file geodatabase     outLocation = "V:\\2155\\active\\215510456\\GDB"     MasterGDB = r'AllKMLLayers.gdb'     MasterGDBLocation = os.path.join(outLocation, MasterGDB)          # Create the master FileGeodatabase      arcpy.CreateFileGDB_management(outLocation, MasterGDB)          # Convert all KMZ and KML files found in the current workspace      for kmz in arcpy.ListFiles('*.KM*'):       print "CONVERTING: " + os.path.join(arcpy.env.workspace,kmz)       arcpy.KMLToLayer_conversion(kmz, outLocation)               # Change the workspace to fGDB location     arcpy.env.workspace = outLocation          # Loop through all the FileGeodatabases within the workspace     wks = arcpy.ListWorkspaces('*', 'FileGDB')     # Skip the Master GDB     wks.remove(MasterGDBLocation)          for fgdb in wks:              # Change the workspace to the current FileGeodatabase       arcpy.env.workspace = fgdb                # For every Featureclass inside, copy it to the Master and use the name from the original fGDB       featureClasses = arcpy.ListFeatureClasses('*', '', 'Placemarks')       for fc in featureClasses:         print r"COPYING: " + fc + r" FROM: " + fgdb          fcCopy = fgdb + os.sep + 'Placemarks' + os.sep + fc         print r"fcCopy = " + fcCopy         print r"MasterGDBLocation = " + MasterGDBLocation         print r"fgdb = " + fgdb         arcpy.FeatureClassToFeatureClass_conversion(fcCopy, MasterGDBLocation, fgdb[fgdb.rfind(os.sep)+1:-4])               # Clean up     del kmz, wks, fc, featureClasses, fgdb      Output from shell showing error:               COPYING: Points FROM: V:\2155\active\215510456\GDB\canal-move-2-golden-gate-blvd.gdb     fcCopy = V:\2155\active\215510456\GDB\canal-move-2-golden-gate-blvd.gdb\Placemarks\Points     MasterGDBLocation = V:\2155\active\215510456\GDB\AllKMLLayers.gdb     fgdb = V:\2155\active\215510456\GDB\canal-move-2-golden-gate-blvd.gdb          Traceback (most recent call last):       File "C:\Users\mperez\Desktop\batch_kml_to_gdb.py", line 46, in <module>         arcpy.FeatureClassToFeatureClass_conversion(fcCopy, MasterGDBLocation, fgdb[fgdb.rfind(os.sep)+1:-4])       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\conversion.py", line 1547, in FeatureClassToFeatureClass         raise e     ExecuteError: ERROR 000354: The name contains invalid characters     Failed to execute (FeatureClassToFeatureClass).


Watershed Delineation

I am trying to delineate just the catchment area of some lakes, and am wondering the correct way to do this. I already have a filled DEM, along with a flow direction and a flow accumulation raster. Is there a way to accomplish this task without the use of pour points? Or do I have to use them. If that is the case, can a pour point be located in the middle of a lake (assuming that the middle of a lake is the highest area of flow accumulation). Whenever I do try to run this data, whether with or without a pour point, I get something that does not look completely right. The catchment area does not encompass the entire lake, and the actual watershed itself does not accurately represent the flow accumulation arrows. Am I doing something wrong, or is there a simple cause to my problem. Maybe if someone could take a quick second to step through the watershed toolset, that would be helpful. Am using ArcGIS 10 SP1, with Spatial Analyst, ArcView license.


Combining several rasters before r.surf.contour?

I have been trying to generate an elevation model from contour lines using first _v.to.rast.attr_ and then _r.surf.contour_. Generally, it works pretty well, execpt for one issue. My data contains a lot of sea without contours, and _r.surf.contour_ spends a lot of time in the sea region where there are no pixels in the raster generated from _r.to.rast.attr_. Actually, I'm running one now on a reasobly large area, and after 24 hours, it is at 70%. The solution for me would be simple. I have sea polygons (and even lake polygons with elevation). I could generate a separatr raster for that using _v.to.rast.attr_. But then I need to combine the two rasters into a single raster before running _r.surf.contour_. How do I do that?


Change color of shape in Layer File

I currently have a layer file - in this case one of the United States. This layer contains a shape for each state so if I were to open the TOC Control and expand the "United States" I would see Alabama, Alaska, etc etc. Currently, if I wanted to I could change the color of all the states through the following code:               IRgbColor rgb = new RgbColorClass();     ColorDialog myColorDlg = new ColorDialog(); ///This is the windows color picker          DialogResult res = myColorDlg.ShowDialog();          if(res == DialogResult.OK)     {        IFeatureLayer featureLayer = layer as IFeatureLayer;        IFeatureClass featureClass = featureLayer.FeatureClass;            rgb.Red = myColorDlg.Red;       rgb.Blue = myColorDlg.Blue;       rgb.Green = myColorDlg.Green;            IGeoFeatureLayer geoFeatureLayer = layer as IGeoFeatureLayer;            ILineSymbol lineSymbol = new SimpleLineSymbolClass();       lineSymbol.Width = 1.0;       lineSymbol.Color = (IColor)rgb;            ISimpleFillSymbol fillSymbol = new SimpleFillSymbolClass();       fillSymbol.Outline = lineSymbol;       fillSymbol.Color = (IColor)rgb;            ISimpleRenderer simpleRenderer = new SimpleRendererClass();       simpleRenderer.Symbol = (ISymbol)fillSymbol;       geoFeatureRenderer.Renderer =  (IFeatureRenderer)simpleRenderer;            myAxMapControl.Refresh();     }      The question now is, how can I change each state separately. I'm aware that if I use the built in TOC control I should be able to do this with ILegendClass; however, I wish to use a different TOC Control.


Programmatically uncheck layer in AxTOCControl

I am running my map in dynamic display mode, and I want to programmatically uncheck a layer that is not a IDynamicLayer that is visible in the AxTocControl -- its just a regular layer file. I thought that `layer.Visible = false;` with a map refresh would work, but bafflingly it does not. I'm using ArcEngine 10 VS2010 & C#


How to add data to relationship table in ArcGIS 10.1 database design?

I have created 2 tables HORSE and VENDOR and a relationship table VENDOR_HORSE   With the foreign key in Horse being the Primary key in VENDOR (VendorID)   and the foreign key in VENDOR being the primary key in HORSE (HorseID).   It is a many to many relationship and ArcGIS automatically creates the link table -.   * yet I had to create the Relationship table which is simple and has extra fields (besides the horseID and vendorID) as Notes (text), Service (coded domain),  and Date (most important to solve many to many matter and have a relational database.   I cannot add data to the VENDOR_HORSE table.   I click on start an edit session, just as I do to add rows to the HORSE and VENDOR tables, with no problems, yet I cannot add rows to the Relationship table.   ESRI help gave instructions for adding rows yet they do not work.   That is,   1. I selected a row in HORSE,    2. I selected a row in VENDOR,    3. then double clicked on OBJECTID to have the table fields appear in the Attribute window and NOTHING. What am I missing? Help! Thanks Bette


Finding Normal to a given point in ECEF coordinates

I have a point of reference called Ground Reference Point (GRP) given in Earth Centred Earth Fixed (ECEF) coordinates as given below: (1.4892e+6, 6.1102e+6, 1.0637e+6) (all distances in meters) I want to find a normal to the earth ellipsoid at the above mentioned GRP again in ECEF coordinates. What is the process to calculate it?


What is a Multilinestring?

What is multiline string in gis? I have found when I use pgrouting certain edges have this geometric property mentioned as multiline string. I am not sure what's the purpose of this geometry and how it actually defines an edge. Any insights?


Correct way to create a DEM from point data in csv files

I know this might seem a somewhat general question, but I have to start somewhere. I have a lot of csv files which contain point data containing height, aspect and slope measurements at a resolution of 12,5 meters. I need to create a dem from this data and have ArcGIS 10 with spatial analyst and 3d Analyst. I did this before with 9.3 but I am not sure if my methodology is correct.   1. Create point shapefiles from the csv file   2. interpolate to raster (here I never know whether to use spline, kriging or some other method)? Last time I did something wrong and rounded all the values up to 1m even though the data was to cm accuracy so this time I want to do it right! If anyone has any tips or advice, please write, Thanks, Rob


Having trouble getting specific items from a list. What am I doing wrong?

I am a total beginner when it comes to python. I received some help already getting this code started but I hit a wall. I have a directory with 200 folders, each with a geodatabase, feature dataset, and point line and polygon feature classes. Each feature class has a field "Label" in the attribute table. I need to be able to run a search through each feature classes' attribute table and return a specific string value. For example, I need to find all feature classes where diabase is in the label field. The output would give me only the feature classes that contain diabase in the label field. I created a temp feature layer from each feature and did a select by attribute to see if get count returns anything. Here's my code:               import arcpy     arcpy.env.workspace = "X:"     ws = arcpy.ListWorkspaces("*","Folder")     arcpy.env.overwriteOutput = True     tempLayer = r"in_memory\templayer"     field = "Label"     value = "diabase"     where = "%s = '%s'" % (field,value)     dhList = []     for w in ws:          arcpy.env.workspace = w          gdb = arcpy.ListWorkspaces("*", "Access")          for fc in gdb:              arcpy.env.workspace = fc              fcl = arcpy.ListDatasets("*", "Feature")              for fcc in fcl:                  arcpy.env.workspace = fcc                  fccl = arcpy.ListFeatureClasses("*", "All")                  for stil in fccl:                      arcpy.MakeFeatureLayer_management(stil, tempLayer, where)                      arcpy.SelectLayerByAttribute_management(tempLayer,"SUBSET_SELECTION")                      count = str(arcpy.GetCount_management(tempLayer).getOutput)                      print count                      if count > 0:                         dhList.append(stil)     for item in dhList:          print item      The output is giving me a list of all of the feature classes in the directory instead of only the feature classes with diabase. What am I doing wrong? Thanks for any and all help in advance.


ArcSDE for ArcGIS Desktop

I have ArcGIS desktop (info) license. I want to know if I can configure SDE, where in I can work with versioning of geodatabases.


How to move Layer to back?

from my Plugin I've loaded a rasterlayer using the following code:               fileName = "/path/to/raster/file.tif"     fileInfo = QFileInfo(fileName)     baseName = fileInfo.baseName()     rlayer = QgsRasterLayer(fileName, baseName)     if rlayer.isValid():         QgsMapLayerRegistry.instance().addMapLayer(rlayer)         ...      Now I wonder how I can move the freshly loaded layer to the back, that it lies behind all previously loaded layers. Thanks and regards


How to align an HDF layer

Forgive me, but I am completely new to GIS. I am using QGIS. I have a raster layer (HDF format) that does not align with other layers. All layers are projected WGS84 (EPSG:4326) and still the problem persists. I know that the HDF layer is defined by rows and columns that need to be converted to longitudes and latitudes but I don't know how to do that.   Also, the HDF file, for some reason, can't be exported as CSV file. ![enter image description here](http://i.stack.imgur.com/gTm0h.jpg)


How can I add all the 4 corners as GCP in an image that I want to reproject?

I am working on a Modis - oceancolor image and I want to reproject it to wgs84. I have the upper left/right and lower left/right values from the metadata of the image and I want to add them all in the command line of `gdal_translate` or `gdal_warp`. But in these two commands I can only add the upper left and lower right lat/long (x,y). Do you have any idea how I can add all the corners of the image in the script?


Does 'r.patch' act only on "loaded" rasters?

Can I run the GRASS command 'r.patch' on raster files which are not "loaded" into the current GRASS session? That is, rasters which are simply in my folder but not in a GRASS location & mapset? Thanks.


How to reproject a raster file in QGIS with datum transformation?

I want to reproject a tiff raster file from projection A (ETRS89/UTM Zone 32) to projection B (DHDN/Gauss-Kruger zone 2). The two projections have a different datum so I have to use a datum transformation (NTv2 BETa2007 in my case). I want to create a new raster file with projection B because I want to use it in another software. So reprojection on-the-fly is not what I need. I have tried Raster > Transform (or similar - I do not know the English menu) but I can not see how to define a datum transformation here. How can I do a permanent reprojection of a raster file in Qgis with a datum transformation?


What is a good way to retrieve geographic data along with imgs and mp3 files?

I'm working in the Django backend of an audio guide for tourism with mobile devices. Basically, the client (Phonegap app for Android and iOS) can follow a route over a map (Leaflet client) and see images or listen audio files in certain points of the route. Now, I want to provide offline service. So, the client can choose a route and _download it_ , meaning _download all the POIs, including images an audio files_. Of course, I can send the coordinates of the POIs in a json, or a gpx file. But what concerns me is the audio files and the images. Some random thoughts:   * The devices can store the coordinates in SQLite, and the audio files and images in the SD card   * Store the audio files and images as BLOBs in SQLite is not an option, because some files can be really big (like 100MB)   * My first approach is to create a JSON with the coordinate points and the name of the files related with them, and compress it along with the mp3 and imgs. Then, send that zipped file to the clients. Sounds... gross. Is there any recommended way to do this? Send geolocated audio and images, basically. Many thanks in advance


GRASS and QGIS- " not recognized...format" but it worked before

Prologue: I used my Ubuntu file viewing GUI to move data files around and "clean house" a bit. I started a new GRASS session and tried to add NED elevation rasters which I have successfully added before. I got the error message "`/home/greg/GRASS/Loc- Oakland/NED_elev_rasters/CopyNED1-9Oaklnd/10959312\10959312\w001001.adf' not recognised as a supported file format." Since the software recognized it before, why the change? Is it because I moved the files? QGIS gave me the same sort of error message, although I had successfully loaded these files before. Thank you.


What is the correct approach to handle mouse events for a tool that is called by a button?

I have a dockable window with a 2 buttons that call 2 different tools (Draw Marker and Select Features), What i want to happen is when the user clicks on the relevant button on the dockable window and then clicks on the map, a onMouseUp event is called and it runs code i need to run. Where does the onMouseUp event need to be placed so this can be done? Thanks


Well it might be a simple question. Given a set of 2D or 3D points, the question is: **How to find the center of geometry of an object?** According to the following figure, the center of geometry differs from the center of mass if it is calculated in the simplest form i.e., homogenous density of mass. The problem appears, indeed, in the computation of those. Commonly, one approach is to average **X** coordinates and **Y** coordinates separately i.e., find an average position to the given points (here in 2D). This may be used as centroid for the set of points representing an object. As shown, _due to the extra vertex along the bottom edge,_ for a simple rectangle the resulting centroid is **(0.5,0.4)** while the correct answer is **(0.5,0.5)**.   Note that the example given is too simple. The problem of interest however is for complex shapes in 2D and objects in 3D for which only coordinates of vertices are available.   BTW, an efficient computational way is of interest. **Update 1:**   Just to mention that I have checked some web links such as Wikipedia's however my current problem is that there are group of 2D and 3D points wish to find a point as representative for those. Thus centroid became of interest. The points are given without any topological information. You may consider them as point cloud. The demonstration here provided to make it clear that the commonly known averaging of coordinates (see for example this) may be incorrect as shown in the example. Hope the point is clear now. ![enter image description here](http://i.stack.imgur.com/hOxTV.png) **Update 2:**   Here are some implementations for comparison:   * **aa** = accepted answer below   * chull = convex-hull of points i.e., the golden polygon   * cent = centroid proposed in Wikipedia and discussed in **aa** as the polygon centroid   * centl = centroid of polyline as explained in **aa** Visually, `centl` looks better representative for the geometry given compared to `cent`. Two others look promising here but usually they are too biased if the dispersion of the points were inhomogeneous as it is a usual case.   And also consider that although convex-hull makes problem reasonably simpler however it may generate too long and too short edges without any symmetrical positioning in the space, that is, awareness is necessary if you do simple averaging (i.e., without weighting) for both cases: entire points (green) or convex-hull polygon vertices (blue). ![enter image description here](http://i.stack.imgur.com/QO3Vg.png) **Update 3:**   One application could be found in this post.


problem to Disable the security in server.dat file

I am trying to remove the security from web services.While seaching , I found that we have to set               <SecurityEnabled>True</SecurityEnabled>                            To          <SecurityEnabled>False</SecurityEnabled>      Now after replacing this `true` with `false` , I saved the file. Now when I restart my computer and reopen this file, It is again set to `<SecurityEnabled>True</SecurityEnabled>` .I am unable to understand why this is happening?


What is the highest obtainable resolution of FREE elevation data in the UK?

I am seeking closure with this question guys. I am aware of various sources of free elevation data ~30+ m, and I have been searching for higher resolution FREE data for a while now. This already exists somewhat (Where to acquire elevation data for UK?), but may have changed since a year. I'm afraid I may know the answer already, but to put an end to my misery and false hope: **What is the highest resolution, freely available (outside of academic institutions), elevation data covering the ENTIRE UK? - is 10 m available?** Thanks.


How to convert FROM Navit to PostGis or SHP?

I have a Navit BIN file which I want to use in PostGis or QGis, so I need to import it to PostGis or convert it to a shapefile. I have found a lot of information on how to convert data TO the Navit format, but nothing on how to do the reverse. Is this possible? Is there an exporter? Many thanks


What's the best way to display thousands of polygons in Openlayers?

I am trying to create an Openlayers map that will display thousands of polygons. And when the user clicks on each, I want some of the metadata to display. Working with this large of a dataset seems like it will be challenging. But I am trying to figure out if there is a standard way to go about this. At this point, I am think I should either   1. display my polygons with WMS and use getfeatureinfo   2. Display with WFS, Load with Strategy.BBOX, and use GetFeature to get meatadata. Is there a logical way I am missing to load all of this data into a map and have a good speed. I was looking at this page and trying to figure out what they did: http://protectedplanet.net/ Thanks for any help!


GeoTools WFS Feature retrieval

I am trying to use geotools to retrieve the list of features served by a WFS. I am following the tutorial provided at http://docs.geotools.org/latest/userguide/library/data/wfs.html. The code that I have is as follows:               // Step 1 - connection parameters     //     Map connectionParameters = new HashMap();     connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", capabilitiesUrl.toString() );          // Step 2 - connection     DataStore data = DataStoreFinder.getDataStore( connectionParameters );          // Step 3 - discouvery     String typeNames[] = data.getTypeNames();     String typeName = typeNames[0];     SimpleFeatureType schema = data.getSchema( typeName );     System.out.println( "Schema Attributes:"+schema.getAttributeCount() );          // Step 4 - target     SimpleFeatureSource source = data.getFeatureSource( typeName );     System.out.println( "Metadata Bounds:"+ source.getBounds() );          SimpleFeatureCollection features = source.getFeatures();     SimpleFeatureIterator iterator = features.features();     while( iterator.hasNext() ){         Feature feature = (Feature) iterator.next();         System.out.println(feature.getName());     }      However, my DataStore object is always null. I have tried this using geotools version 9.1, version 10-SNAPSHOT and version 11-SNAPSHOT. I am using Maven to manage the dependancies. When I use version 11-SNAPSHOT, I keep getting a DataStoreFinder NoClassDefFound on running the above code. When using version 11-snapshot, I cannot see any of the geotools jars in the maven local repository which is probably why this error occurs. However, I have not yet managed to resolve it. I know that geotools can be used to retrieve features as shown above and would appreciate any help in pointing out what I could possibly be doing wrong. Thanks! UPDATE: I have included the pom files below. The first POM results in the following error on running mvn clean install:               Exception in thread "main" java.lang.NoClassDefFoundError: org/geotools/data/DataStoreFinder         at com.envitia.geopackage.geopackagecreator.dataharvestor.WFSDataHarvestor.getFeatureGeometries(WFSDataHarvestor.java:295)         at com.envitia.geopackage.geopackagecreator.dataharvestor.WFSDataHarvestor.getFeatureType(WFSDataHarvestor.java:274)         at com.envitia.geopackage.geopackagecreator.dataharvestor.WFSDataHarvestor.readData(WFSDataHarvestor.java:176)         at com.envitia.geopackage.geopackagecreator.App.main(App.java:22)      POM 1:               <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">         <modelVersion>4.0.0</modelVersion>              <groupId>com.sample.harvestor</groupId>         <artifactId>Creator</artifactId>         <version>1.0-SNAPSHOT</version>         <packaging>jar</packaging>              <name>Creator</name>         <url>http://maven.apache.org</url>              <properties>             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>             <geotools.version>11-SNAPSHOT</geotools.version>         </properties>              <dependencies>             <dependency>                 <groupId>junit</groupId>                 <artifactId>junit</artifactId>                 <version>3.8.1</version>                 <scope>test</scope>             </dependency>             <dependency>                 <groupId>org.geotools</groupId>                 <artifactId>gt-main</artifactId>                 <version>${geotools.version}</version>                 <type>jar</type>             </dependency>             <dependency>                 <groupId>org.geotools</groupId>                 <artifactId>gt-opengis</artifactId>                 <version>${geotools.version}</version>                 <type>jar</type>             </dependency>             <dependency>                 <groupId>org.geotools</groupId>                 <artifactId>gt-api</artifactId>                 <version>${geotools.version}</version>                 <type>jar</type>             </dependency>         </dependencies>         <build>             <plugins>               <plugin>                 <artifactId>maven-assembly-plugin</artifactId>                 <configuration>                   <descriptorRefs>                     <descriptorRef>jar-with-dependencies</descriptorRef>                   </descriptorRefs>                   <archive>                     <manifest>                       <mainClass>com.sample.harvestor.creator.App</mainClass>                     </manifest>                   </archive>                 </configuration>               </plugin>             </plugins>         </build>              <repositories>             <repository>                 <id>maven2-repository.dev.java.net</id>                 <name>Java.net repository</name>                 <url>http://download.java.net/maven/2</url>             </repository>             <repository>                 <id>osgeo</id>                 <name>Open Source Geospatial Foundation Repository</name>                 <url>http://download.osgeo.org/webdav/geotools/</url>             </repository>             <repository> <!--Add the snapshot repository here-->                 <snapshots>                     <enabled>true</enabled>                 </snapshots>                 <id>opengeo</id>                 <name>OpenGeo Maven Repository</name>                 <url>http://repo.opengeo.org</url>             </repository>         </repositories>     </project>      The next POM does not return any errors on mvn install, but on running the application, I get the following error:               Exception in thread "main" java.lang.NullPointerException         at com.envitia.geopackage.geopackagecreator.dataharvestor.WFSDataHarvestor.getFeatureGeometries(WFSDataHarvestor.java:298)         at com.envitia.geopackage.geopackagecreator.dataharvestor.WFSDataHarvestor.getFeatureType(WFSDataHarvestor.java:274)         at com.envitia.geopackage.geopackagecreator.dataharvestor.WFSDataHarvestor.readData(WFSDataHarvestor.java:176)         at com.envitia.geopackage.geopackagecreator.App.main(App.java:22)      This NullPointer is due to the data object being null as mentioned earlier. POM2:               <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">         <modelVersion>4.0.0</modelVersion>              <groupId>com.sample.harvestor</groupId>         <artifactId>Harvestor</artifactId>         <version>1.0-SNAPSHOT</version>         <packaging>jar</packaging>              <name>Harvestor</name>         <url>http://maven.apache.org</url>              <properties>             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>             <geotools.version>10-SNAPSHOT</geotools.version>         </properties>              <dependencies>             <dependency>                 <groupId>junit</groupId>                 <artifactId>junit</artifactId>                 <version>3.8.1</version>                 <scope>test</scope>             </dependency>             <dependency>                 <groupId>org.geotools</groupId>                 <artifactId>gt-main</artifactId>                 <version>${geotools.version}</version>                 <type>jar</type>             </dependency>             <dependency>                 <groupId>org.geotools</groupId>                 <artifactId>gt-opengis</artifactId>                 <version>${geotools.version}</version>                 <type>jar</type>             </dependency>             <dependency>                 <groupId>org.geotools</groupId>                 <artifactId>gt-api</artifactId>                 <version>${geotools.version}</version>                 <type>jar</type>             </dependency>         </dependencies>         <build>             <plugins>               <plugin>                 <artifactId>maven-assembly-plugin</artifactId>                 <configuration>                   <descriptorRefs>                     <descriptorRef>jar-with-dependencies</descriptorRef>                   </descriptorRefs>                   <archive>                     <manifest>                       <mainClass>com.sample.temp.harvestor.App</mainClass>                     </manifest>                   </archive>                 </configuration>               </plugin>             </plugins>         </build>              <repositories>             <repository>                 <id>maven2-repository.dev.java.net</id>                 <name>Java.net repository</name>                 <url>http://download.java.net/maven/2</url>             </repository>             <repository>                 <id>osgeo</id>                 <name>Open Source Geospatial Foundation Repository</name>                 <url>http://download.osgeo.org/webdav/geotools/</url>             </repository>             <repository> <!--Add the snapshot repository here-->                 <snapshots>                     <enabled>true</enabled>                 </snapshots>                 <id>opengeo</id>                 <name>OpenGeo Maven Repository</name>                 <url>http://repo.opengeo.org</url>             </repository>         </repositories>     </project>