OpenLayers WMS to Leaflet with EPSG:2170 projection

This is the original code for OpenLayers 2                       var res = [                 1000.0 / 4.0,                 1000.0 / 8.0,                 1000.0 / 16.0,                 1000.0 / 32.0,                 1000.0 / 64.0,                 1000.0 / 128.0,                 1000.0 / 256.0,                 1000.0 / 512.0,                 1000.0 / 1024.0,                 1000.0 / 2048.0             ];                  var extent = new OpenLayers.Bounds(256000, 0, 640000, 256000);             var mapOptions = {                 controls: [                     new OpenLayers.Control.Navigation(),                     new OpenLayers.Control.PanZoomBar(),                     new OpenLayers.Control.ScaleLine(),                     new OpenLayers.Control.MousePosition(),                     new OpenLayers.Control.KeyboardDefaults()                 ],                 resolutions: res,                 units: "m",                 projection: "EPSG:2170",                 maxExtent: extent             };             map = new OpenLayers.Map('map', mapOptions);             map.setOptions({                 restrictedExtent: extent             });                  layer_dof = new OpenLayers.Layer.WMS("Slovene Ortophoto Images",                 "http://gis3d.urszr.si/pds/wms", {                     layers: "slo-gkr",                     format: "image/jpeg",                     srs: "EPSG:2170"                 }, {                     tileSize: new OpenLayers.Size(512, 512),                     resolutions: res                 });      Now, converting that straight to Leaflet doesn't work:                   var res = [             1000.0 / 4.0,             1000.0 / 8.0,             1000.0 / 16.0,             1000.0 / 32.0,             1000.0 / 64.0,             1000.0 / 128.0,             1000.0 / 256.0,             1000.0 / 512.0,             1000.0 / 1024.0,             1000.0 / 2048.0         ];              var EPSG_2170 = new L.Proj.CRS(             'EPSG:2170',              '+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs', {                 resolutions: res,                 //origin: [-640000, -256000]             }              urszr = L.tileLayer.wms("http://gis3d.urszr.si/pds/wms", {             layers: 'dtk-gkr',             format: 'image/jpeg',             attribution: "URSZR",             crs: EPSG_2170,             tileSize: 512,             transparent: false,         });      The projected coordinates are way off, and as far as I managed to figure this out is that the offset is defined in OpenLayers map extent:                       var extent = new OpenLayers.Bounds(256000, 0, 640000, 256000);      The coordinates in this projection start with zero, but the bounding box on Spatial Reference for this projection is               372543.8943, 5034152.5582, 631496.6208, 5197602.9212      **I'm stumped. What's wrong? How do I correctly configure this projection in Leaflet?** The original site done in OpenLayers is here: http://spin.sos112.si/SPIN2/Javno/               Source: view-source:http://spin.sos112.si/SPIN2/Javno/GIS/GraficniPrikaz.aspx


GML v3 loading with OpenLayers

I rewrote the question to be more readable:   * I saw GML format is just a little more 'evolved' than KML. Am I right? Which format is to be considered more standard, more supported and convenient to invest more on?   * I tried the example here (http://openlayers.org/dev/examples/vector-formats.html) trying to load a GML v3 circle defined like this:              <gml:featureMember xmlns:gml="http://www.opengis.net/gml"     xsi:schemaLocation="http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">     <feature:feature xmlns:feature="http://example.com/feature">         <feature:geometry>             <gml:CircleByCenterPoint>                 <gml:pos>11.979491114616 43.847170472145</gml:pos>                 <gml:radius uom="km">25</gml:radius>             </gml:CircleByCenterPoint>         </feature:geometry>     </feature:feature> </gml:featureMember>      the example program is not able to load this. It seems a limitation of OpenLayers library in general that is not able to properly load some kind of GML files, or what? Am I specifying an invalid GML xml string? Do you know about some limitation on supporting some advanced features of the GML format in OpenLayers?   * The GML v3 type on OpenLayers has only the possibility to load a GML v3 file passing the xml string via the read() method and not specifying the file to be loaded from the server using a HTTPProtocolOptions. Why this? Is there a way which I haven't understood?   * Do you have some working GML file examples which use relative coordinates? Thanks.


How to solve the "Undefined symbols in librouting.dylib" issue on Mac Os X?

I'm trying to create a Homebrew formula to let anybody install pgrouting on his or her mac. I've seen this question: How to fix pgRouting librouting_dd.so: undefined symbol error? I'm also following this documentation: http://www.pgrouting.org/docs/1.x/install_freebsd.html I'm copy-pasting the whole message here:               ==> Installing pgrouting     ==> Downloading http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz     File already downloaded in /Users/ca/Library/Caches/Homebrew     /usr/bin/tar xf /Users/ca/Library/Caches/Homebrew/pgrouting-1.05.tar.gz     ==> Downloading patches     /usr/bin/curl -f#LA Homebrew 0.8 (Ruby 1.8.7-174; Mac OS X 10.6.8) https://gist.github.com/raw/1271301/d3c4db0d2ed68b2e9dd72289b73eecabbc2429b5/pgrouting-mac-os-x.patch -o 001-homebrew.diff     ######################################################################## 100.0%     ==> Patching     /usr/bin/patch -f -p1 -i 001-homebrew.diff     patching file core/src/edge_visitors.hpp     patching file core/src/shooting_star_boost_wrapper.cpp     patching file core/src/shooting_star_relax.hpp     ==> cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/pgrouting/1.05' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.0.4/include/server/' -DBoost_INCLUDE_DIR='/usr/local/Cellar/boost/1.47.0/include/boost/'     cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/pgrouting/1.05' -DCMAKE_BUILD_TYPE=None -Wno-dev -DPOSTGRESQL_INCLUDE_DIR='/usr/local/Cellar/postgresql/9.0.4/include/server/' -DBoost_INCLUDE_DIR='/usr/local/Cellar/boost/1.47.0/include/boost/'      -- The C compiler identification is GNU     -- The CXX compiler identification is GNU     -- Checking whether C compiler has -isysroot     -- Checking whether C compiler has -isysroot - yes     -- Checking whether C compiler supports OSX deployment target flag     -- Checking whether C compiler supports OSX deployment target flag - yes     -- Check for working C compiler: /usr/bin/gcc-4.2     -- Check for working C compiler: /usr/bin/gcc-4.2 -- works     -- Detecting C compiler ABI info     -- Detecting C compiler ABI info - done     -- Checking whether CXX compiler has -isysroot     -- Checking whether CXX compiler has -isysroot - yes     -- Checking whether CXX compiler supports OSX deployment target flag     -- Checking whether CXX compiler supports OSX deployment target flag - yes     -- Check for working CXX compiler: /usr/bin/g++-4.2     -- Check for working CXX compiler: /usr/bin/g++-4.2 -- works     -- Detecting CXX compiler ABI info     -- Detecting CXX compiler ABI info - done     -- Found PostgreSQL: /usr/local/Cellar/postgresql/9.0.4/include/server, /usr/local/lib/libpq.dylib     Boost headers were found here: /usr/local/Cellar/boost/1.47.0/include/boost/     Output directory for libraries is set to /usr/local/Cellar/postgresql/9.0.4/lib     -- Found PGROUTING_CORE core: /tmp/homebrew-pgrouting-1.05-OhBx/pgrouting-1.05/core/src     Installation directory for libraries is set to /usr/local/Cellar/postgresql/9.0.4/lib and for SQL files is set to /usr/share/postlbs     -- Configuring done     -- Generating done     -- Build files have been written to: /tmp/homebrew-pgrouting-1.05-OhBx/pgrouting-1.05     ==> make     make      Scanning dependencies of target routing     [ 16%] [ 33%] Building C object core/src/CMakeFiles/routing.dir/astar.o     Building C object core/src/CMakeFiles/routing.dir/dijkstra.o     [ 50%] Building C object core/src/CMakeFiles/routing.dir/shooting_star.o     [ 66%] Building CXX object core/src/CMakeFiles/routing.dir/boost_wrapper.o     [ 83%] Building CXX object core/src/CMakeFiles/routing.dir/astar_boost_wrapper.o     [100%] Building CXX object core/src/CMakeFiles/routing.dir/shooting_star_boost_wrapper.o     Linking CXX shared library ../../lib/librouting.dylib     Undefined symbols:       "_SPI_freetuptable", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_heap_formtuple", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_elog_start", referenced from:           _finish in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _finish in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _finish in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_pfree", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_Float8GetDatum", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_init_MultiFuncCall", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_BlessTupleDesc", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_prepare", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_fnumber", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_MemoryContextAlloc", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_errmsg", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_repalloc", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_end_MultiFuncCall", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_getvalue", referenced from:           _shortest_path_shooting_star in shooting_star.o       "_per_MultiFuncCall", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_errstart", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_cursor_fetch", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_gettypeid", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_cursor_open", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_getbinval", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_errfinish", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_finish", referenced from:           _finish in dijkstra.o           _finish in astar.o           _finish in shooting_star.o       "_RelationNameGetTupleDesc", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_CurrentMemoryContext", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_connect", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_elog_finish", referenced from:           _finish in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _finish in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _finish in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_errcode", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_DatumGetFloat8", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_tuptable", referenced from:           _shortest_path in dijkstra.o           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o           _shortest_path_shooting_star in shooting_star.o       "_pg_detoast_datum", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o       "_SPI_processed", referenced from:           _shortest_path in dijkstra.o           _shortest_path_astar in astar.o           _shortest_path_shooting_star in shooting_star.o     ld: symbol(s) not found     collect2: ld returned 1 exit status     make[2]: *** [lib/librouting.dylib] Error 1     make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2     make: *** [all] Error 2     ==> Exit Status: 2     http://github.com/mxcl/homebrew/blob/master/Library/Formula/pgrouting.rb#L18     ==> Environment     HOMEBREW_VERSION: 0.8     HEAD: f2acf83b0e0f344b89411fb884af5dfaacf890eb     HOMEBREW_PREFIX: /usr/local     HOMEBREW_CELLAR: /usr/local/Cellar     HOMEBREW_REPOSITORY: /usr/local     HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew     Hardware: dual-core 64-bit penryn     OS X: 10.6.8     Kernel Architecture: i386     Ruby: 1.8.7-174     /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby     Xcode: 3.2.6     GCC-4.0: build 5494      GCC-4.2: build 5666      LLVM: build 2335      MacPorts or Fink? false     X11 installed? true     ==> Build Flags     CC: /usr/bin/gcc-4.2     CXX: /usr/bin/g++-4.2     LD: /usr/bin/gcc-4.2     CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe     CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe     CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include     LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib     MAKEFLAGS: -j2     PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig          Error: Failed executing: make      If `brew doctor' does not help diagnose the issue, please report the bug:         https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue      Thanks for your help! * * * For those interested, you can checkout my Homebrew fork here: https://github.com/charlax/homebrew I have added two formulas: pgrouting and gaul. Hope that helps! If everything's right, you should be able to install pgrouting like this (you need to add my two formulas before):               $ brew install pgrouting


Limit construction tools listed for an edit template to custom edit tool

Is it possible to limit the construction tools available for a specific feature class to a custom edit tool? I'm porting a 9.3 extension to 10, and would like to move tools off an old toolbar and into the Construction Tools panel. I've ported one tool over. However, I want the tool to only show when the feature class it is inteded to work with is set as the current edit template. In addition, I want to hide the standard construction tools that are available. The feature class has a class extension associated with it. I've been able to use the ClassID within the IEditEvents5.OnCurrentTemplateChanged event to determine if the current edit template is the correct feature class. But all I can do with the tool is enable it or disable it. I want to be able to hide the custom tool all together for all other feature classes. In addition, I want to hide the standard tools that are displayed as well, limiting the users options to just the custom edit tool. If I can't make this work I'll just go back to placing the tools on a toolbar again, but I would like to be able to intergrate the tools into the native editing environment if possible.


How can I limit range of the thumbs in esri/dijit/TimeSlider

From the example, range between those two thumbs is unlimited. So, I need some thing like this               timeSlider.setThumbRangeLimit(1);  //one year      or something that limit the range only 1 year. I have tried to use the single thumb but it didn't work(Look at the `Time:` field). I think it needs the range for time. So, do someone has any solution to achieve this? Thanks in advance :D


Local Coordinate to Geocentric

The ultimate question, I need a transformation matrix to take a point in local space representing a roughly 500m x 500m place in New Mexico centered at -108.619987456 long 36.234600064 lat. The final output needs to be in geocentric coordinates and I can during initialization get any number of points on the map such as the corners, center, western most along the center etc. During run time I would like to have a transformation matrix that can be applied to a position in local space expressed in meters and get back an approximate GCC coordinate. The center of the point in GCC: -1645380 -4885138 3752889   The bottom left corner of the map in GCC: -1644552, -4881054, 3749220   During run time I need to be able to multiply (-250, -250, 0) with the transformation matrix and get something close to (-1644552, -4881054, 3749220). I've spent more than a week trying to research a solution for this and so far nothing. Given an identity matrix as our starting position and orientation. Then using geotrans and the known lat, long, and height of the starting position I get an x,y,z geocentric coordinate. A vector from the origin of (0,0,0) gives both the up and translation for the matrix. However, I need the forward and right so that I can pass a distance in meters from the origin into the transformation matrix and get a roughly accurate GCC. Do I have all of the inputs I need to calculate the right and forward? Inputs   Origin: 0, 0, 0   Global: -1645380, -4885138, 3752889   Up (Normalized): Global - Origin   Desired Outputs   Right: ? ? ?   Forward: ? ? ?   So with the right and forward added to the up and translation I already calculated I would have a transformation matrix. I could then apply the matrix to a vector of say (50, 50, 0) and get something within about 0-3 cm of the output if I feed the lat/long back into geotrans. This matrix would only ever be used small maps of about 500m x 500m so the curvature of the earth is negligible. In reply to whuber, I don't know your level of experience so I will start with the very basics.   An identity matrix is a 4x4 matrix that you can multiply by a vector and it returns the vector unchanged. Such as below. 1 0 0 x=0   0 1 0 y=0   0 0 1 z=0   0 0 0 1   The x, y, and z of the matrix are how much to translate the vector by and the first 3 rows and columns are the rotation. Below is a tranformation matrix that does nothing to the orientation of a vector but does translate. This is what you would want for two axis aligned worlds in different locations. 1 0 0 13   0 1 0 50   0 0 1 -7   0 0 0 1   If you were to multiply a vector of (10, 10, 10) with the above transformation matrix you would get an output of (23, 60, 3). My problem is the axes are not aligned and the "plane" of the world I am trying to get the local coordinate converted to is projected on the ellipsoid of the earth. Geotrans is library that you can use to pass a coordinate from one system such as geodetic or GDC (lat, long, height) and get back another such as geocentric or GCC (x,y,z). For example: If my game world was representing a map centered exactly on the prime meridian and equator the transformation matrix would look something like below. I am just guesstimating the Y and Z rotations and might have them flipped and/or the wrong sign. 0 0 1 6378137   0 1 0 0   1 0 0 0   0 0 0 1


mapinfo - Scaling both the raster and vector

Is there any way to scale both all that I have drawn and the raster image to the scale of 1:20 ? I accidentially scaled it wrong to 1:18 and 1:21. My teacher says it is possible but has a high probability of getting errors. It would be easier if I knew coding/programming but sadly I don't. I just don't want to draw everything all over again. It took me months. If there was just some tool that would fix all my files, that would be so lovely.


Set 500 subtypes in ArcGIS 10.0 Desktop from a csv list

Does anyone know of a way I could import a long list of Subtypes from a csv list and if there is a maximum number of subtypes that one can import? My list consists of biotops and contains 500 entries. For data entry purposes in ArcGIS, it would be advantageous to have these a subtypes. But in reality maybe 500 is too many for ArcGIS. Has anyone had a similar case?


Field calculator error and Geoprocessing results window empty

![enter image description here](http://i.stack.imgur.com/XsCV1.jpg)I need to use the field caculator for a new field that I have just added but I keep getting the following error: ![enter image description here](http://i.stack.imgur.com/3fDNk.jpg) The problem is that when I open the Geoprocessing Results window is just completly empty, which is so weird, I don't know what to do and I need to use the field calculator to keep going with my work The field is a short integer and is just equal to another field called OBJECTID


Changing the selection color in the flexviewer 2.4?

I am under the impression that by changing the 4th color (in this case 0x000000) will change the Selection color. However, when I go use the search tool, my results are still displayed in the old color. You used to be able to set the color in the Identify tool.               <style>     <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>     <alpha>0.8</alpha>


How to bind GraphicsLayer to RadGridView?

I'd like to bind an Esri WPF GraphicsLayer to Telerik's RadGridView control. Does anyone have any examples showing how to do this? Examples showing how to do it with Silverlight would also be useful.


SAP Integration in ESRI

I looking a way to integrate ESRI solutions with SAP solutions. I have seen APOS http://www.apos.com/ESRIGIS/ but don't have any experience with integration betweend ESRI and SAP. So then maybe someone who had similar problem can give any hint.


"Wrapper" script or "wrapper" web app for mapserver?

So I have been reading up on http://mapserver.org/cgi/wrapper.html and was wondering if there are any more substantial examples of creating a full-fledge web application (using python and, if appropriate a python web framework) to handle incoming GET and POST requests for a dedicated "mapserver.mydomain.com" WMS application. Does such an approach make sense or will the "simple shell script" given in the example in http://mapserver.org/cgi/wrapper.html suffice? Though frankly, I am not sure how the shell script is going to interface with the httpd server to handle GET/POST requests. In particular, it may make sense to implement something like a python tilecache for the mapserver instance so the shell script might not be sufficient?


DBMS and ArcSDE Architecture for Large (Mostly Non-Spatial) Dataset

I have ~1000 fixed points representing data collection stations with multiple sensors, and a csv that is ~4.5GB of values in the format:               id     pointid  sensor  measdatetime      measvalue     50345  500      tempa   1/1/2011 13:55    72.81     50346  501      tempb   10/31/2011 14:00  75.65     55457  500      gaght   10/31/2011 01:00  6.56      (The data is similar to USGS stream gauges, but from a different network and different format.) I am somewhat familiar with geodatabase design, but have little experience with the capabilities of the different DBMS's that work with ArcGIS. I'm considering using a variation of the Marine Data Model for the geodatabase design, but am a bit fuzzy about the DBMS ArcSDE Architecture I should use. It seems that hardware wise, I'll want a dedicated machine for DBMS and SDE with a direct gigabit lan connection to a desktop machine running ArcInfo. For cost and "openness" sake, I'd like to use postgreSQL with postGIS (Followed by MS SQL Server Express, as I'm more familiar with T-SQL), but am not sure of the implications because of having such a large dataset. Also, from what I've researched, PostGRE has much better built in "windowing" for queries (eg. calculating a moving-window 2-week tempa average). If it makes a difference, I'd like to be able to load a given dataset entirely into RAM if I know I will be using it extensively for a specific work session. (Similar to This Helpful Answer) ## To The Point:   1. Is there a performance reduction by using PostGIS, since there is only a 32-bit version of SDE for it? Can I use 64-bit PostGRE, authorize it with 32-bit SDE, then use a direct connection to PostGRE to avoid a 32-bit "bottleneck"?   2. Is there an advantage to keeping the bulk of the data "non-spatial", so I could have 64-bit PostGRE do the queries, then join the results to the points in ArcMap?   3. Is there a better overall approach to managing a large amount of data using postGRE, considering ArcSDE's 32-bit limitation? Other considerations:   * I am using ArcInfo 10.0 with SP3, and have an EDN membership, so I can experiment fairly freely with minimal cost. I also have MS SQL Server 2008 R2 for developers, if needed.   * The desktop machine will obviously need to be windows, but I can run windows or linux for the DBMS machine if there's an advantage.   * There will be a number of static queries (eg 2-week moving average) that I may store the results of, but I would also like to be able to perform a specialized query quickly if needed. (eg. What is the minimum of the daily mean temps from stations 003, 007, and 104, betweem 1/1/2011 and 1/31/2011.)   * I've read this guide, but find it to be mostly ambiguous and not useful for finding any pros or cons regarding specific scenarios (Lots of info, but little useful guidance. Am I really supposed to believe that there is NO difference in performance by using or not using the ArcSDE service?)


IFeatureBuffer - performance considerations (ArcObjects)

I'm trying to optimize my code to make it faster. I have a loop that reads some string input and creates points with the help of IFeatureBuffer and IFeatureCursor. If I create the buffer inside tho loop, it slows the code down.               For i = 0 To Counter       pFBuffer = pFClass.CreateFeatureBuffer       ...       pFBuffer.Value(iField) = ...       pFCursor.InsertFeature(pFBuffer)     Next      If I move `pFBuffer = pFClass.CreateFeatureBuffer` above the loop (i.e. create the buffer once only) it works significantly faster. However, I have to "clear" the buffer at the end of each iteration, as in some cases it stores values from previous iterations. So the question is: how can I clear the buffer, so that I won't need to create it at each iteration? Are there any other drawbacks or things to consider?


Postgis Grid Points on Boundary Issue

Hi all hoping someone can help me out with this issue. I've got a table of polygons which are grid squares which get overlayed on a map. These are used when querying data so that points get grouped into each grid square. All this works fine till a point is on the boundary between the grid squares. I've included an example of this below. If I use ST_Contains I get no results as the point isn't contained within any of the polygons. If I use ST_Intersects the point intersects with the boundaries of multiple grid squares which isn't suitable. Is there a way I can ensure that the point is only considered to be in one polygon? In are previous system before migrating to using postgis we used the PNPOLY algorithm that ensured this.               DROP TABLE IF EXISTS areasTemp;         CREATE TEMP TABLE areasTemp         (           id integer,           areacode character varying(10),           polygon geometry         );         INSERT INTO areasTemp VALUES (634,'1x50',ST_GeomFromText('POLYGON((1 50,2 50,2 51,1 51,1 50))', 4326)),         (663,'0x51',ST_GeomFromText('POLYGON((0 51,1 51,1 52,0 52,0 51))', 4326)),         (633,'1x51',ST_GeomFromText('POLYGON((1 51,2 51,2 52,1 52,1 51))', 4326)),         (664,'0x50',ST_GeomFromText('POLYGON((0 50,1 50,1 51,0 51,0 50))', 4326));      -               SELECT * FROM areasTemp WHERE ST_Contains(ST_GeomFromText('POINT(1 51)', 4326), polygon);      0 rows retrieved               SELECT * FROM areasTemp WHERE ST_Intersects(ST_GeomFromText('POINT(1 51)', 4326), polygon);      4 rows retrieved


How to publish web map in ArcIMS

i have made web map by ArcIMS 9.3, so i want to publish it, How.....????. thank you.


Creating a new Feature Class (ArcCatalog)

I have ArcGIS 9.3 and when in ArcCatalog, when I R click to create a Feature Class (turn FC), it is greyed out. Do you need a particular license or ArcEditor/Info to have it? I went into the toolbox, and when I click the Turn Feature Class in the toolbox, it says i don't have the proper extension/license for it. A little help here, please. Thanks, Zoran


Enabling time aware layers using arcpy

Is it possible to enable time aware on a layer programmatically? I can add a time-enabled layer to a non-time aware data frame as shown here: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s300000023000000.htm However, how can I get the layer to be time enabled in the first place (programmatically)? I see that it is possible in arcobjects but I would rather not get into that. Thanks!


How to create a Google Maps with draggable routes with fixed markers

I have a webapp where I show a route on a map, I pass two address and show the route on map, so I'd like that this route should be draggable but the points A and B shoud be fixed. How to do this?


How to write GML parser with Geotools?

I wrote a Parser for a GML file from the OS Mastermap with geotools 8.4. With one part I still have a problem. This sniplet of the xsd:               <complexType name="RoadLinkType">         <complexContent>             <extension base="osgb:AbstractFeatureType">                 <sequence>                     <element name="polyline" type="gml:GeometryPropertyType"/>                     <element name="directedNode" type="osgb:directedNodeAssociationType" minOccurs="2" maxOccurs="2"/>                 </sequence>             </extension>         </complexContent>     </complexType>      The part from the gml file:               <osgb:RoadLink fid='osgb4000000023204016'>         <osgb:polyline>             <gml:LineString srsName='osgb:BNG'>                 <gml:coordinates>516609.000,257678.000 516615.000,257733.000 516618.000,257786.000</gml:coordinates>             </gml:LineString>         </osgb:polyline>         <osgb:directedNode orientation='-' xlink:href='#osgb4000000027916595'/>         <osgb:directedNode orientation='+' gradeSeparation='1' xlink:href='#osgb4000000028203009'/>     </osgb:RoadLink>      It gets parsed nearly right, i.e. the polyline is correct (I get a class com.vividsolutions.jts.geom.LineString) but I only get one (instead of two) directedNode. My code:               GML gml = new GML(Version.GML3);     CRSAuthorityFactory crsFac = ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG", null);     CoordinateReferenceSystem osgbCrs = crsFac.createCoordinateReferenceSystem("EPSG:27700");     gml.setCoordinateReferenceSystem(osgbCrs);     SimpleFeatureIterator iter = gml.decodeFeatureIterator(in);     while (iter.hasNext())     {         SimpleFeature feature = iter.next();         System.out.println("id: " + feature.getID());         System.out.println("polyline: " + feature.getAttribute("polyline"));         Object dnode = feature.getAttribute("directedNode");         System.out.println("directedNode: '" + dnode + "'\t" + dnode.getClass());     }      And the output:               id: osgb4000000023204016     polyline: LINESTRING (516609 257678, 516615 257733, 516618 257786)     directedNode: '{orientation=-, href=#osgb4000000027916595}' class java.util.HashMap      What am I doing wrong? Why don't I get both directedNode? How can I do the binding to real Java Objects?


How to uninstall and re-install a stable version?

I just posted about a DEM problem after installing the latest nightly build...now I am completely screwed. I uninstalled the latest nightly build and associated files, hoping to resort back to the stable version, which had been working great...until my great idea of checking out the developer version. I just want to get the stable version up and running again. I thought I could just uninstall everything, then reinstall, then bingo...but it's not happening. Maybe I am missing some files somewhere that I never deleted? Any help would be most appreciated. Just so you know, I am a computer idiot...only very basic skills when it comes to technical troubleshooting. Oh, and I'm running Mac OS X 10.8 Mt. Lion on a 2007 intel based macbook pro.


Mouse unclick event in mapbasic?

How can I respond to mouse unclick in mapinfo using mapbasic? Is there any event triggered when the mouse in unclicked? For example at the end of drawing a line when the mouse button is released.


How to use QgsVertexMarker in a python plugin?

I am trying to display a vertex marker for a QGIS python plugin I am writing. I am getting a the following error... `'NameError: global name 'QgsVertexMarker' is not defined'`               canv = self.iface.mapCanvas()     canv.setExtent(rect)     marker = QgsVertexMarker(canv)     marker.setCenter(QgsPoint(x,y))     canv.refresh()      What am I doing wrong? Thank you


Storing SRID:4326 data as Geometry or Geography?

I used OGR2OGR to import SRID 4326 point data into MSSQL Server. Didn't realize that it defaults to creating a geometry column instead of detecting the data as 4326 and creating a geography column. I know the code to get around this so no issue there. The data as is in a geometry column shows up just fine in QGIS. So do I actually need to put the data in a geography column? thanks!


PostGIS Function both work fine

I create two function both work fine same solve, but one of them, take to much time (which one use "temporaly"). Is very important because I will run in several times the funcion. Please any one can help me.               Function 01          {       CREATE or REPLACE FUNCTION Estandarizar_Direcciones_Calles(varchar, varchar)          returns table(stastatus character varying(5), cantidad bigint)      AS     $BODY$     DECLARE  p_tipoproceso ALIAS FOR $1;          p_nombprohilo ALIAS FOR $2;         _iddi character varying(25);         _cod_ubigeo character varying(10);         _via character varying(10);         _nomvia character varying(254);         _numcuadra numeric;         _numcontador numeric;         _tipcainfo character varying(10);         _calleinfo character varying(254);         _tipurinfo character varying(10);         _urbasinfo character varying(254);         _avstatus character varying(5);         curs1 CURSOR FOR Select b.iddi,b.cod_ubigeo,b.via,b.nomvia,b.numcuadra         from bbva_espartaco b where b.nomvia <>'XXXX' and b.urbzona ='' and b.av_geostatus is          null and b.av_stastatus is null and av_hiloproceso=$2 ;               BEGIN            open curs1;         loop             FETCH curs1 INTO _iddi,_cod_ubigeo,_via,_nomvia,_numcuadra;         if not found then             exit ;         end if;              if p_tipoproceso = '1' then           insert into tempviasurbas (INFO, IORIGEN)           SELECT regexp_split_to_table(standard_calles(_cod_ubigeo,_numcuadra,_nomvia), E'\\|'),$2;         else           insert into tempviasurbas (INFO, IORIGEN)           SELECT regexp_split_to_table(standard_calles(_cod_ubigeo,0,_nomvia), E'\\|'),$2;         end if;              SELECT INTO _tipcainfo cast(info as character varying(10))          FROM tempviasurbas WHERE iorder % 5 = 1;         SELECT INTO _calleinfo cast(info as character varying(254))          FROM tempviasurbas WHERE iorder % 5 = 2;         SELECT INTO _tipurinfo cast(info as character varying(10))          FROM tempviasurbas WHERE iorder % 5 = 3;         SELECT INTO _urbasinfo cast(info as character varying(254))          FROM tempviasurbas WHERE iorder % 5 = 4;              _numcontador:=0;         if _tipcainfo <> '' then            _numcontador:=_numcontador + 1;          end if;         if _calleinfo <>'' then            _numcontador:=_numcontador + 1;          end if;          if _tipurinfo <> '' then            _numcontador:=_numcontador + 1;          end if;          if _urbasinfo <>'' then            _numcontador:=_numcontador + 1;          end if;              if _numcontador = 0 then            _avstatus:='NC';         elseif _numcontador = 1 then            _avstatus:='IC';         elseif _numcontador = 2 then            _avstatus:='SC';          elseif _numcontador = 3 then            _avstatus:='IC';          elseif _numcontador = 4 then            _avstatus:='CC';          end if;              update bbva_espartaco set zvia=_tipcainfo,znomvia=_calleinfo,ztipurb=_tipurinfo,         zurbzona=_urbasinfo,av_stastatus=_avstatus where iddi = _iddi;              delete from tempviasurbas;         ALTER SEQUENCE tempviasurbas_iorder_seq RESTART WITH 1;              end loop;         close curs1;                   RETURN QUERY select c.av_stastatus as stastatus, count(c.*) as cantidad         from bbva_espartaco c where c.av_stastatus not in ('MU','NU','IU') group by c.av_stastatus;     END;      $BODY$        LANGUAGE plpgsql VOLATILE STRICT       COST 100;     ALTER FUNCTION public.Estandarizar_Direcciones_Calles(varchar, varchar)       OWNER TO postgres;     }      Function 02 This the new one and take to much time.               {     CREATE or REPLACE FUNCTION Estandarizar_Direcciones_Calles(varchar, varchar)          returns table(stastatus character varying(5), cantidad bigint)      AS     $BODY$     DECLARE  p_tipoproceso ALIAS FOR $1;          p_nombprohilo ALIAS FOR $2;         _iddi character varying(25);         _cod_ubigeo character varying(10);         _via character varying(10);         _nomvia character varying(254);         _numcuadra numeric;         _numcontador numeric;         _tipcainfo character varying(10);         _calleinfo character varying(254);         _tipurinfo character varying(10);         _urbasinfo character varying(254);         _avstatus character varying(5);         _nombtemptab character varying(50);         _nombtempcns character varying(50);         curs1 CURSOR FOR Select b.iddi,b.cod_ubigeo,b.via,b.nomvia,b.numcuadra         from bbva_espartaco b where b.nomvia <>'XXXX' and b.urbzona ='' and          b.av_geostatus is null and b.av_stastatus is null and av_hiloproceso=$2 ;               BEGIN              _nombtemptab:='temp' || $2;         _nombtempcns:=_nombtemptab || '_iorder_key';              EXECUTE 'CREATE TEMPORARY TABLE  ' ||  _nombtemptab || '          (           iorder serial,           info character varying(255),           CONSTRAINT ' || _nombtempcns  || ' UNIQUE (iorder)         )';                   open curs1;         loop             FETCH curs1 INTO _iddi,_cod_ubigeo,_via,_nomvia,_numcuadra;         if not found then             exit ;         end if;                   if p_tipoproceso = '1' then           EXECUTE 'insert into ' || _nombtemptab || ' (INFO)  SELECT regexp_split_to_table           (standard_calles(''' || _cod_ubigeo || ''',' || _numcuadra || ',''' || _nomvia || '''), E''\\|'')';         else           EXECUTE 'insert into ' || _nombtemptab || ' (INFO)  SELECT regexp_split_to_table           (standard_calles(''' || _cod_ubigeo || ''',0,''' || _nomvia || '''), E''\\|'')';         end if;              EXECUTE 'SELECT cast(info as character varying(10)) FROM '          || quote_ident(_nombtemptab) || ' WHERE iorder % 5 = 1 ' into _tipcainfo;         EXECUTE 'SELECT cast(info as character varying(254)) FROM '          || quote_ident(_nombtemptab) || ' WHERE iorder % 5 = 2 ' into _calleinfo;         EXECUTE 'SELECT cast(info as character varying(10)) FROM '          || quote_ident(_nombtemptab) || ' WHERE iorder % 5 = 3 ' into _tipurinfo;         EXECUTE 'SELECT cast(info as character varying(254)) FROM '          || quote_ident(_nombtemptab) || ' WHERE iorder % 5 = 4 ' into _urbasinfo;                   _numcontador:=0;         if _tipcainfo <> '' then            _numcontador:=_numcontador + 1;          end if;         if _calleinfo <>'' then            _numcontador:=_numcontador + 1;          end if;          if _tipurinfo <> '' then            _numcontador:=_numcontador + 1;          end if;          if _urbasinfo <>'' then            _numcontador:=_numcontador + 1;          end if;              if _numcontador = 0 then            _avstatus:='NC';         elseif _numcontador = 1 then            _avstatus:='IC';         elseif _numcontador = 2 then            _avstatus:='SC';          elseif _numcontador = 3 then            _avstatus:='IC';          elseif _numcontador = 4 then            _avstatus:='CC';          end if;              update bbva_espartaco set zvia=_tipcainfo,znomvia=_calleinfo,ztipurb=_tipurinfo         ,zurbzona=_urbasinfo,av_stastatus=_avstatus where iddi = _iddi;              EXECUTE 'TRUNCATE ' || _nombtemptab || ' RESTART IDENTITY'  ;              end loop;         close curs1;              EXECUTE 'drop table ' || _nombtemptab ;                   RETURN QUERY select c.av_stastatus as stastatus, count(c.*) as cantidad         from bbva_espartaco c where c.av_stastatus not in ('MU','NU','IU') group by c.av_stastatus;     END;      $BODY$        LANGUAGE plpgsql VOLATILE STRICT       COST 100;     ALTER FUNCTION public.Estandarizar_Direcciones_Calles(varchar, varchar)       OWNER TO postgres;     }


Coordinate grid not showing in Composer

I went through every answer that I found here, but am either missing something in them or the question has not been asked. I have a very simple map consisting of four layers, namely contour lines, roads, farm portions and farm names. Three of the four are on the WGS84 system while the road layer is in some other user defined file. It looks like this in the Metadata section: +proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs The selected CRS of the canvas is CRS 84, EPSG 4326 I do not know whether that means anything at all, but there it is! :-) Now, in the Composer, I simply Add the canvas as a map and go to the Item properties tab, where I tick the box at Show grid. And NOTHING happens on the map. I have no idea what to do with the stuff that open up to get the map to show the coordinates in either X and Y or Decimal or anything at all, even after having typed anything in every space I could! Where could I be doing something wrong, please? QGIS 2.2


Measure length within a grid

I have a grid and some lines within a grid and I was wondering how to measure the length of the lines inside the grid. I can use the measure tool for a straight line, however in the future I will not have straight lines. Is there still a way to find the length of the line? I've tried using the tabulate intersection tool only to receive a "the geometry is not M aware error". Thanks for your help!


What is the procedure to publish a WMS using Geoserver?

I wanted to be able to load a network connection in Google Earth (or Google Maps) to display daily updated maps using Geoserver. I want something very simple but I have never published web maps before. Can anyone explain the steps required to do this? * * * Update: Meanwhile i managed to learn most part of it. Now i only need to know how to perform spatial analysis and publish the results all automatically.


mongoDB query not working as expected

My mongoDB collection has all three types of shapes. A point is stored as               {      'CE_NO': '_',      'E_NAME': 'RAILWAY BOOKING CENTER',       'SRCTYPE': 'Facility',      'geom': {              'coordinates': [                              77.6221694946289,                              12.93125057220459                             ],              'type': 'Point'},      'EMAIL': '_',       'ID': 2.0,       'WEBSITE': '_',       '_id': ObjectId('53329166a6e10b0b68beaeb9'),       'LOCALITY': 'KORAMANGALA',      'SUB_CAT': 'BOOKING CENTER',      'FAX': '_',       'ROAD_NAME': '17TH MAIN ROAD',       'CATEGORY': 'TRANSPORTATION',       'TELEPHONE': '_',      'PINCODE': '_'     }      Similarly, LinString type is stored in the form:               {     'CE_NAME4': '_',     'RD_SURF': '_',      'ENTRY_BAR': '_',     'PLOTSIZE': '_',     'SRCTYPE': 'Arterial',     '_id': ObjectId('53329164a6e10b0b68bea88f'),     'LM_1': '_',     'ENDPNT_X': 77.707634,     'ENDPNT_Y': 13.020506,     'ONEWAY': '_',     'ROAD_NAME': 'Old Madras Road',     'RD_W_CAT': '_',     'BUSI_4': '_',     'CATEGORY': '1',     'LM_4': '_',     'BUSI_2': '_',     'LENGTH': 675.57,     'LOCALITY': 'Krishnarajpur',     'RH_PLOT2': '_',     'PINCODE': '560036',     'RH_PLOT1': '_',     'AREA': '_',     'COM_SUR': '_',     'LM_3': '_',      'LH_PLOT1': '_',     'LH_PLOT2': '_',     'STARTPNT_X': 77.702347,     'STARTPNT_Y': 13.017308,     'ID': 1,     'CE_NAME1': '_',      'CE_NAME2': '_',     'CE_NAME3': '_',     'LM_2': '_',      'BUSI_3': '_',     'geom': {              'type': 'LineString',              'coordinates': [                              [                               77.70234680175781,                               13.017308235168457                              ],                              [                               77.70301055908203,                               13.017770767211914                              ],                             ]                },      'BUSI_1': '_'     }      I have created a 2dsphere index as shown:               db.<collection>.ensureIndex({"geom":"2dsphere"})      I ran the following query:               location = db.BLR_all.findOne({ $and: [{"geom.type":"Point"},{"LOCALITY":"KORAMANGALA"}]})     db.runCommand({geoNear: 'BLR_all', near: location.geom, maxDistance: 200, shperical:true})      The purpose of the above query was to retrieve all the geometries that fall with 200m of the 'location'. Next I want to filter the above query to display only the Point types that fall within the 200m mark of the 'location'. So I included the query field in my runCommand, as shown               db.runCommand({geoNear: 'BLR_all', near: location.geom, maxDistance: 200, query: db.BLR_all.find({"geom.type":"Point"}), shperical:true})      But this returns an empty result. Is the syntax of the second runCommand statement correct? Kindly provide some simple example if possible on how to apply filters in runCommand. Thank you.


How to convert a shapefile to a grid file

I was wondering whether anyone might be able to tell me in layman's terms how to convert a polygon layer to a Grid file in ArcGIS 10.1 or ArcGIS 10.2?


GIS Area question

I am running this Sum(Area(obj, "sq km")), area(obj,"sq km"), count(*) from a table Now both areas are not the same for the objects. What one is correct? On a created layer with 1 object I made, the values are the same, on the OS MASTER map it gives two different results.


How do I convert MultiLines to MultiPolygons using Postgis

In postgis I'm using the following query to buffer lines to polygons:               UPDATE rivers       SET poly = ST_Multi(ST_Buffer(lines, 0.01))       where id = 1;      The column 'lines' is a MultiLine and the column 'poly' is a MultiPoly. In record #1 'lines' contains 92 overlapping Line types. I would expect the result of St_Buffer to be a MultiPoly, but it is just a Polygon (If I run the above query without St_Multi I get a sql error. What am I doing wrong?


setup Mapserver WMS from tile files

I'm totally new to Mapserver and I've been banging my head trying to figure out how to mount a WMS server that will seed images of a small geographical area to a OpenLayers HTML page. I already installed Mapserver on windows (MS4W) and "mapserver -v" shows: **'SUPPORTS=WMS_SERVER'** so that's done. Then I used **JTileDownloader** to get the tiles from the area I'm interested in. I ended up with folders "13" and "14" (guess that the zoom level) full of *.png file inside the folder c:\TMP\MyZone The next steps seems to be to create an index file from the tiles with gdaltindex witch I manage to install, but I have no idea how to use. While on the **c:\TMP\MyZone** folder I tried: > gdaltindex PR1314.shp > > gdaltindex PR1314.shp *.png > > gdaltindex PR1314.shp 13\*.png But none of them worked so I don't kwon what to do, I read a lot articles in Mapserver wiki how-to's, but the amount of info is overwhelming and I don't understand half of what I'm reading. So to recap, I just need a WMS that will seed the tiles I already downloaded. What should I do next? Thanks.-


Recommended driverless GPS loggers?

There are a bunch GPS loggers out there, but a good portion need software to download the data onto a computer. Some of the software is Windows-only, but others are Mac-compatible (what I need). However I'd rather not deal with such software in the first place. I ran across what I think are called "driverless" loggers: when you plug them into the computer they simply show up as a (FAT) drive where you can then simply read the text file (usually in NMEA format). I've run across the following units   * AMOD AGL3080   * Columbus V-900/990 (uses removable SD cards)   * Sony GPS-CS1/3 (discontinued, AFAICT) Has anyone used these types of devices? How well do they work (especially with Mac OS 10.7+)? Any advice on particular devices (either to buy or avoid)? I'm not really interesting in full-blown GPS units (Garmin, TomTom) as I don't need the mapping functionality (and extra bulk). I also don't want to have a phone app, because (a) I don't have a smartphone, and (b) even if I did, I wouldn't want to run down its battery. A small logger that saves the position every 1-10s that's light enough to carry is what I'm looking for. The Garmin GPS watches also need special software, so in that regard I'd rather not use them. The main purpose of this will be to keep a log of where I've taken photographs. I'm not _necessarily_ looking to tag the actual JPEG/raw files (especially the latter), but rather using Lightroom (which uses GPX, I know) to correlate photo and location, and then add the tag to the EXIF files on final export if desired (or just keep the information in the database for future reference). I originally asked this question over at photo.se, and it was suggested that gis.se may be a better place.


Layers fail to draw when generating tile cache in AGS

I recently created an MXD-based map service on AGS 9.3.1 SP2. The map seems to render fine as a dynamic service, but when I convert to a cached service and attempt to generate tiles, the operation fails:               ERROR 000569: Failed to generate cache. All server contexts failed to cache map.     Failed to execute (ManageMapServerCacheTiles).      The following lines show up in the server error log:               <Msg time='2011-06-30T17:27:25' type='ERROR' code='103800' target='service.MapServer' methodName='Map.Draw' machine='hostname' process='3248' thread='2756'>Streets 1-2: The operation was attempted on an empty geometry.</Msg>     <Msg time='2011-06-30T17:27:25' type='ERROR' code='10003' target='service.MapServer' machine='hostname' process='3248' thread='2756'>Failed to draw layer Streets 1-2</Msg>      Frankly I'm not sure where to go from here. As I said earlier, the service renders fine in a dynamic configuration. Any ideas?


How to list ActiveView SelectionChanged event delegates in ArcObjects .NET?

I currently have an issue in an ArcObjects ArcMap add-in where my event handlers are seemingly-randomly being unhooked from the event I'm trying to catch. I've spent some time looking for a way to list all delegates currently assigned for the event but I can't find a way to call Delegate.GetInvocationList() from the event interface. When my add-in is created I execute the following to respond to the ActiveView SelectionChanged event:               IActiveViewEvents_Event activeViewEvent = (IActiveViewEvents_Event)ArcMap.Document.FocusMap;     activeViewEvent.SelectionChanged += new IActiveViewEvents_SelectionChangedEventHandler(this.onSelectionChanged);      Now I know that this event handler will be lost when the active view changes so I also have this:               IDocumentEvents_Event documentEvent = (IDocumentEvents_Event)ArcMap.Document;     documentEvent.ActiveViewChanged += new IDocumentEvents_ActiveViewChangedEventHandler(this.onActiveViewChanged);      which calls the previous code to re-add the SelectionChanged event handler. At seemingly random intervals my application stops responding to the SelectionChanged event. I'm stopping on all CLR errors so I'm sure it's not a silent exception that's disabling my add-in. What I'd really like is to be able to inspect the delegates assigned to the SelectionChanged event and see if mine needs re-adding, but so far no joy. Any suggestions on what might be going wrong, or how to inspect the assigned event handlers would be VERY much appreciated! **EDIT:** I've since figured out a pattern to the madness. My tool will only run within an edit session if features are selected. One way I can replicate this behaviour is to 1) start an edit session 2) select some features 3) run my tool - copies selected features from one layer to another 4) stop editing (it doesn't matter whether I save my edits or not) 5) Now the selection changed event is no longer handled Can anyone tell me why starting and then stopping editing would detach my selection changed event handlers?


Determine Projection

I was given a shapefile at work with the information that it is in Lambert Azimuth Equal Area (LAEA) projection (EPSG 9820). After some research on the web, I found out that EPSG 9820 is a generic EPSG for all LAEA projections [1].   The *.prj like this:                PROJCS["LAR_LambertAzimuthalEqualArea",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Latitude_Of_Origin",-10.0],UNIT["Meter",1.0]]      Is there a way how I can figure out the EPSG code based on the *.prj file with open source tools? [1] http://www.osgeo.org/pipermail/gdal-dev/2008-January/015519.html


Stacked point representation in KMLs

I cross posted this in the Google Earth forum but they changed the format there and I'm not sure I like the format. In my dataset I sometimes have multiple locations at a single point. GE will represent this as a single dot until you click on the dot and then you get a scattering of all the points at that location. Is there anyway to script into the KML a sizing on the initial dot viewed to represent how many dots are on that location? (ex. 1-3 small dot, 4-6 med dot, 7-9 large dot)? Thanks


Creating chart from openlayers map

Hi I have a web map application which displays wms layers from geoserver. I am looking to add a functionality which will allow users to click on multiple map objects. The application will then generate a bar chart based on the data of the selected objects and presented it to the user. Any hints or guidance on how to achieve this would be greatly appreciated.


Toward a protocol for encoding vector data as image

This is a follow up to this question: How to create Vector Polygons at the same amazing speeds GISCloud is able to render them? In his answer, Yagi outlines a rationale for encoding geographic information in an image format and decoding it in the browser. He observes that "Currently, to do this, you have to roll your own". He also observes that there's currently no standard for this. Given the awesome performance being demonstrated, it seems like the community might benefit from a standard. From my understanding of the problem, it sounds like a standard way of dealing with it could be implemented. Call it B-WFS. My question, then: what would a useful protocol for encoding vector data as images look like? Is there something making it too complex to tackle usefully, or is it just a case of "no one's done this yet"?


Comparing two spatial datasets statistically

I'm new to this forum. I'm working on the following problem - I have two datasets. Let's call it dataset A and B. Both of them will contain a set of points like               A1,LonA1,LatA1     A2,LonA2,LatA2     ..     ..      and               B1,LonB1,LatB1     B2,LonB2,LatB2     ..     ..      I also have link data for both A and B like A1->A2, A1->A3. So, I can essentially create a graph. I want to statistically compute how similar the two datasets (graphs) are. I want to say something dataset A is X% similar to dataset B. I'm using coupled node edge scoring to compute similarity matrix and then use Hungarian algorithm to compute similarity between the graphs created. I was wondering if there is something simpler that I could do to do this. Thanks!


FWTools ogr2ogr command does not seem to recognise dim parameter

I am trying to convert a 3D shapefile to 2D via FWTools shell. This is the command I am trying               ogr2ogr REGC2013_GV_Clipped_lonlat_2d.shp REGC2013_GV_Clipped_lonlat.shp -dim 2       Which returns the Usage - there is no mention of the dim parameter in the usage. It does not output a new shapefile. I have managed to convert a shapefile from map projection to lonlat coordinates using this               ogr2ogr REGC2013_GV_Clipped_lonlat.shp -t_srs EPSG:4326 REGC2013_GV_Clipped.shp      but if I add the -dim 2 it does not work and I get the usage returned. I am using Windows 7 and this is the version info               C:Users\xxxxx\Desktop\Plotting>gdalinfo --version     GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19      thank you


Python Error Message with OpenLayer Plugin

I have just recently downloaded QGIS version 1.9.90-Alpha, Alpha, 5155176. I then went to install the OpenLayers plugin. That successfully downloaded and installed, or so I thought, but when I went to use it I get an error message. It says the TypeError is: 'sip.methoddescriptor' object is not callable Does anyone know what this means or how I can fix it? I am using Python version 2.5.2 Thanks! This is the error:               An error has occured while executing Python code:     Traceback (most recent call last):       File "C:/Users/czuck/.qgis/python/plugins\openlayers_plugin\openlayers_plugin.py", line 48, in addLayer         self.__plugin.addLayer(self)       File "C:/Users/czuck/.qgis/python/plugins\openlayers_plugin\openlayers_plugin.py", line 197, in addLayer         QgsMapLayerRegistry.instance().addMapLayers([layer])     TypeError: 'sip.methoddescriptor' object is not callable      Python version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] QGIS version: 1.9.90-Alpha Alpha, 5155176 Python path: `['C:/OSGeo4W/apps/qgis-dev/./python', 'C:/Users/czuck/.qgis/python', 'C:/Users/czuck/.qgis/python/plugins', 'C:/OSGeo4W/apps/qgis- dev/./python/plugins', 'C:\\\OSGeo4W\\\bin\\\python25.zip', 'C:\\\OSGeo4W\\\apps\\\Python25\\\DLLs', 'C:\\\OSGeo4W\\\apps\\\Python25\\\lib', 'C:\\\OSGeo4W\\\apps\\\Python25\\\lib\\\plat-win', 'C:\\\OSGeo4W\\\apps\\\Python25\\\lib\\\lib-tk', 'C:\\\OSGeo4W\\\apps\\\qgis- dev\\\bin', 'C:\\\OSGeo4W\\\apps\\\Python25', 'C:\\\OSGeo4W\\\apps\\\Python25\\\lib\\\site-packages', 'C:\\\OSGeo4W\\\apps\\\qgis-dev\\\python\\\plugins\\\fTools\\\tools']`


Dividing a line into 250m segments

I am currently working on a hydrology project where I am trying to break a stream network into 250m segments. The problem is that the streams are not all adjacent, as I have clipped the NHD file to include only perennial streams in my watershed. What I have been doing is taking these different, unconnected line features and merging them into one stream using editor. I then have been using the "divide line by length" add in found here: http://www.arcgis.com/home/item.html?id=d5d27ee47330434b9a96b91136a0118f. What this tool is doing however is spliting the whole set into 250m segments, but not necessarily keeping the new segments adjacent to each other. The tool is combining segments that do not measure up to 250m with portions of other lines that also do not add up, but on totally unconnected streams. I have also tried to use the split tool in editor. I have been splitting by distance (250m), but it is only creating one new feature of that length, not breaking it up the entire merged stream. Any help would be much appreciated! Thanks


ArcSDE 10: How to read/write to Oracle with ST_GEOMETRY using Java

I found the following in the deprecation plan of ArcGIS 10.2: > ArcGIS 10.2 will be the last major release to support the ArcSDE SDK with > the ArcSDE C and Java APIs. Today many other options are available for > developers, including SQL, which is available as a result of the widespread > adoption of spatial types... In our recent Java/Oracle project, we want to write/read Features to an Oracle DB, which uses ST_GEOMETRY instead of Oracle's SDO_GEOMETRY. So my questions is:   1. Is it a bad idea to use the Java SDE API when starting from scratch?    2. If SQL is the alternative - how can I do this? Shouldn't there be JDBC Support for ST_GEOMETRY in Oracle? I could not find anything like that.   3. If there is no JDBC Support - isn't the SDE API the only path to go currently? I don't see "many other options".


Toolbox from 10.0 causes an ArcGis 10.1 crash

I'm trying to open a toolbox prepared in ArcGis 10.0 in ArcGis 10.1 but it crashes the entire application. No error message is shown. Any ideas what might cause the problem? Or how to debug it?


How can I add button to the QGIS toolbox or create my own toolbox?

I want to create a button and add it to the QGIS toolbox or alternatively create my own toolbox and add the button here. A plugin should be started when the user clicks the button.


download and installation of sample data

I have downloaded the sampe dataset under "my documents". When I extract the contents of the zip file, the only folders that are actually installed, are "gml", "gps" and "shapefiles". Thus, "climate", "csv", "grassdata" and "raster" do not get extracted correctly. Does anyone have an idea of what is going here?


Dynamic Contour generation and project on google maps

Is it possible to generate contour map layer at runtime and overlap or project on google maps. I am using google map api v3 and want to generate contour map layer using data from sql server and project on google map. Thank you in advance.


how to find 20 closest points efficiently

Say I want to find 20 closest business near me.               My table structure is like this:              BusinessID  varchar(250)    utf8_unicode_ci         No  None        Browse distinct values  Change  Drop    Primary     Unique  Index   Fulltext         Prominent   double          No  None        Browse distinct values  Change  Drop    Primary     Unique  Index   Fulltext         LatLong     point           No  None        Browse distinct values  Change  Drop    Primary     Unique  Index   Fulltext         FullTextSearch  varchar(600)    utf8_bin        No  None        Browse distinct values  Change  Drop    Primary     Unique  Index   Fulltext     With selected: Check All / Uncheck All With selected:     Print viewPrint view Propose table structurePropose table structureDocumentation     Add new fieldAdd field(s) At End of Table At Beginning of Table After     Indexes: Documentation     Action  Keyname Type    Unique  Packed  Field   Cardinality Collation   Null    Comment     Edit    Drop    PRIMARY BTREE   Yes No  BusinessID  1611454 A            Edit    Drop    Prominent   BTREE   No  No  Prominent   0   A            Edit    Drop    LatLong BTREE   No  No  LatLong (25)    0   A            Edit    Drop    sx_mytable_coords   SPATIAL No  No  LatLong (32)    0   A            Edit    Drop    FullTextSearch  FULLTEXT    No  No  FullTextSearch  0                 There are 1.6 million bizs. Of course it's stupid to compute distance for all of them and then sort it. That's where geo spatial index kicks in right? So what SQL comman I need to cast? Note:   1. I am using **mysql myisam** spatial index. However I did not specify this before. So I will accept those who answer it to show my appreciation and ask another question.   2. I do not want to compute distance for the whole table   3. I do not want to compute distance for any region which are still inefficient   4. I do want to compute distance for reasonable number of points because I want to sort the points by distance and be able to display point 1-20, 21-40, 41-60, etc.


How to work with flt & hdr files

I have been working on a vector-based spatial analysis in R using shapefiles. I wish to use some environmental data that is downloadable, however it is only available in raster format (FLT & HDR files). I have no experience of working with rasters. How can I work with these files and combine with the shapefiles for further analysis?


QGIS doesn't create the correct projections when creating new shp files

I received shapefiles exported from ArcGIS with EPSG:2227 as the CRS, which should be: > +proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 > +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 > +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs When I loaded it into QGIS, it says that it is a user defined CRS with the `lat_1` and `lat_2` mixed up and they have slightly different `x_0` and `y_0` values: > +proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 > +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000001 +ellps=GRS80 > +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs Even when I reproject the .shp from the user CRS to EPSG:2227 and then load it back into QGIS, it says that it is a user-defined CRS. Has anyone else seen this happen?


How to update geometry in ArcObjects?

I'm just starting with ArcObjects and I want to update coordinates of geometry vertices. Specifically, I want to swap X, Y coordinates for each vertex of polygons (which can be multipart and have inner rings).   I've found web help topic Updating geometry of existing features where `ITransform2D` interface is suggested. But it's methods does not seem solve my problem directly. I think I can use `Move` method, but it requires calculating dx and dy. Is it possible to do coordinate replacement in ArcObjects like in Python `vertex.X = vertex.Y` but without recreating geometry? (this is quite tricky in Python for polygons with inner rings) Any code snippet is highly welcome:) * * * EDIT: I adapted @vinayan code, but it does nothing. What do I miss?               protected override void OnClick()             {                 IMxDocument mxDocument = ((IMxDocument)(ArcMap.Application.Document)); // Explicit Cast                    IContentsView currentContentsView = mxDocument.CurrentContentsView;                 IFeatureLayer featureLayer = (IFeatureLayer)currentContentsView.SelectedItem; // Explicit Cast                 IFeatureClass featureClass = featureLayer.FeatureClass;                           //Get the Feature or FeatureCursor as you like..                 IFeatureClass pFC = featureClass;                 IFeature polygonFeature = pFC.GetFeature(1);                      IPointCollection pPtsColl = (IPointCollection)polygonFeature.ShapeCopy;                      //swap X and Y                 double tempValue;                 IPoint pPoint;                      for (int i = 0; i < pPtsColl.PointCount; i++)                 {                     pPoint = pPtsColl.get_Point(i);                     tempValue = pPoint.X;                     pPoint.X = pPoint.Y;                     pPoint.Y = tempValue;                 }                      //Update Feature                 polygonFeature.Shape = (IGeometry)pPtsColl;                 polygonFeature.Store();             }


Black zones after tiling two tiff files

I have two Geotiff files. with one side overlapping. Each Geotiff is surrounded by a black frame. ![How the two geotiff looks like](http://i.stack.imgur.com/eIXxR.png) I have created an Image Pyramid with Geoserver 2.3.0 but when I try to see the layer on OpenLayers, the layer borders appear in black, so I can't see correctly the layer, because of thats black borders.It looks like tiles in the pyramid already has black zones inherited from the original tiffs. I've followed these steps: First I have execute the next command on tiles to convert to Image Pyramid:               gdal_translate -a_nodata 0 <origin.tif> <target.tif>      When I have executede this command, I executed the next one:                gdal_retile.py -levels 3 -ps 2048 2048 -co "TILED=YES" -co "BLOCKXSIZE=256" -co "TILED=YES" -co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256" -targetDir tiles --optfile tiles.txt -s_srs EPSG:32719 -targetDir tiles --optfile tiles.txt      After that I try to make the Image Pyramid with Geoserver, but the result is the same that at first, I preview the layer on Openlayers and it appears with black borders. I think Image Pyramid plugin is properly configured:   * InputTransparentColor: #000000   * OutputTransparentColor: #000000   * SUGGESTED_TILE_SIZE: 512,512   * USE_JAI_IMAGEREAD: true I don't know what I must to do. Any help, please???


How to retrieve the per-feature value rendered when IGeoFeatureLayer.DisplayAnnotation is true (ArcObjects with C#)?

In another area of my application I'd like to display the per-feature label value rendered when Labeling is turned on in ArcMap, i.e. when IGeoFeatureLayer.DisplayAnnotation becomes true. I have a list of items of type IFeature from say myFeatLayer. I am able to retrieve the layer-level labeling properties, including text formatting, with:               IGeoFeatureLayer geoLayer = (IGeoFeatureLayer)myFeatLayer;     IAnnotateLayerPropertiesCollection anno = pGeoFeatureLayer.AnnotationProperties;     IElementCollection iecp;     IElementCollection iecup;     IAnnotateLayerProperties props;     anno.QueryItem(0, out props, out iecp, out iecup);     ILabelEngineLayerProperties leprops = props as ILabelEngineLayerProperties;     ITextSymbol text = leprops.Symbol;      What I don't know is necessarily how to query an IFeature, and with what (leprops.Expression?), to retrieve the actual _value_ of what will be rendered near each feature by the labeling engine. Thanks in advance.


Why legendLayerActions is not available in QgsLegendInterface

There's a reason why QgsLegendInterface (the python interface to QgsLegend) doesn't expose: QList< LegendLayerAction > QgsLegend::legendLayerActions( QgsMapLayer::LayerType type ) const method? it could be useful to allow more powerful menu costomization allowing parsing current active actions. thanks


Using ArcGIS Polygon to Raster tool does not divide resulting raster on cells?

I try to create raster composed of small (5x5 m) cells (pixels) from a polygon in ArcGIS-10. I created a polygon (as a single object), and use Feature to Raster Tool and Polygon to Raster tool (of Conversions tools). I assigned "output cell size" as 5 m. In both tools the program creates raster but without cells, so as a single object. The attribute table of the final raster has 1 line with Value = 1 and Count = 61394. So, as I understand, it has 61394 cells with value = 1, but for some reason the program does not divide it into the cells themselves. My first polygon and the data frame have UTM Coordinate system, so all data - in metres. What I have to do for create this raster correctly? My ultimate goal - to cut my first big polygon (that was created as a single object) by grid of equal small cells 5x5 m. I went toward the creation raster at first, because I didn’t find a direct way.


How to easily enter a point feature in ArcGIS? (arcmap10)

My job requires me to enter point features into ArcGIS 10 which correlate to underground RFID markers that mark underground telecom infrastructure. Right now, the workflow requires someone to go out, find a marker, and then draw sketch with measurements to objects on the ground that are visible from an aerial photo to use as reference points. Then, I take measurements off those same reference points in ArcGIS to find the spot where I need to put the point feature. I use the normal measuring tool for this, which has a serious drawback. I've found no way to keep my measurement lines on the screen (or drop a temporary marker or something) when I switch to the edit feature tool to actually drop in the point. Since the points are often out in the middle of streets or fields, I can't just "eyeball" it. This process is too imprecise already. The workaround I've come up with is using a sticky note and sticking it on my monitor with the corner pointing at the spot where the point should go before I switch tools. There has to be a better way. Any suggestions? I'd also be interested to hear if there are workflows out there using GPS devices like the Trimble Geoexplorer 6000 series which people have found to be fast enough to justify the investment in the equipment. What we're doing now is labor intensive and error prone. Help me convince my boss to drop $5k on a sub-decimeter GPS! Thanks!


Can python read the value of a cell in a spreadsheet? The simplest example would be a script that ran a buffer tool on a given shapefile. For the distance parameter, instead of just using a number like '1000', the script would point to a value in a cell of a spreadsheet (libre or open office preferred). _If_ there was then a way to trigger the script from the spreadsheet by way of a button, that would be the next step (then the _next_ step would be to have a map control inside the spreadsheet to see the updated results!) Just to give some insight into where I'm going with this: I'd like to use a spreadsheet as an analysis 'dashboard' where users could run analysis with different parameters - what would proximity around parks (grocery stores, etc.) be at 1/2 mi vs 1/4 mi...then another sheet in the spreadsheet would have a breakdown of the demographics within that proximity. Thank you!


ArcObjects - Finding the intersection of a polyline and polygon?

I have a polyline and polygon. The polyline will intersect the polygon at two or fewer points. I would like to get these intersection points as X and Y values. **EDIT** : Here is a quick code sample using ITopologicalOperator based on the answers below. It's a quick chop job, but it'll help get others started.                       Public Function GetPolygonIntersection(ByVal pLine As IPolyline, ByVal pPolygon As IPolygon) As IPoint                       Dim pGeom As IGeometry             Dim pTopo As ITopologicalOperator = pLine             Dim pPoints As IPointCollection             Dim pPoint As IPoint = Nothing                  If Not pTopo.IsSimple Then pTopo.Simplify()             pGeom = pTopo.Intersect(pPolygon, esriGeometry0Dimension)             If pGeom.IsEmpty Then                 Return Nothing             End If                  If pGeom.GeometryType = esriGeometryMultipoint Then                 pPoints = pGeom                 If pPoints.PointCount = 1 Then                     pPoint = pPoints.Point(0)                 End If             End If                  Return pPoint         End Function


flex 2.3.1 Simpleinfowinwidget deprecation

I have been using the simpleinfopopup widget and recently read that it is being deprecated with 2.3.1.   1. What are the positives and negatives of the popup you are using in flex?   I also have been trying to implement the link_field without success in this popup.   2. Have you had any success getting a url link in your popups?


How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used within the shell script to automate the creation of hillshades.               for f in *.tif     do       echo "Processing $f"     gdaldem hillshade $f $f-hillshade" -z 1.0 -s 1.0 -az 315.0 -alt 45.0 -compute_edges -of GTiff     done      I'm new to OSgeo4W and shell scripting. I'm working off this example as a starting point. When I call the shell script within the OSgeo4W I get an error message that Windows can't open the file and then it gives me an option to use the web to find the correct program or to manually select a program to use. I had assumed that OSgeo4W installed everything I would need to run shell scripts in Windows. What am I missing?


Project WGS84 to Google using MapGuide and WKT

I'm having trouble projecting a simple WGS84 formatted layer over google maps. I can't find a good WKT "API" that not only shows parameters, but explains what each parameter is. The coordinate system of the MapDefinition I am using is:               GEOGCS[         "GCS_WGS_1984",         DATUM[             "D_WGS_1984",             SPHEROID["WGS_1984",6378137.0,298.257223563]         ],         PRIMEM[              "Greenwich",              0.0         ],         UNIT[             "Degree",             0.0174532925199433         ]     ]      The PROJCS that I started writing but won't validate:               PROJCS[         "Popular Visualisation CRS / Mercator",         GEOGCS[             "GCS_WGS_1984",             DATUM[                 "D_WGS_1984",                 SPHEROID[                     "WGS_1984",                     6378137.0,                     298.257223563                 ]             ]             PRIMEM[                 "Greenwich",                 0.0             ]             UNIT[                 "Degree",                 0.0174532925199433             ]         ],         PROJECTION["Mercator_1SP"],         PARAMETER["central_meridian",0],         PARAMETER["scale_factor",1],         PARAMETER["false_easting",0],         PARAMETER["false_northing",0],         AUTHORITY["EPSG","3785"],         AXIS["X",EAST],         AXIS["Y",NORTH]     ]      For some reason mapguide won't validate this. What am I doing wrong?


Open source Cloud GIS

I'm looking for an open source cloud GIS solution. Current situation: Up to 100gb of data stored in file geodatabases that is updated daily. Data is used to create maps as well as geoprocessing tasks. Ideally I only want one copy of the data however it needs to be shared across multiple companies working on the project who will also be adding new data and updating old. The GIS users are using ArcGIS Desktop v10.1 but for the rest of the project team I would like to have a data viewer that can do simple tasks such as measure and buffer. If we could create a few custom tools for the data viewer that would be great. So my main criteria is Data storage:   * Store large volumes   * Good access from anywhere    * Quick and easy to update   * Manageable from custom front end?   * Easy to share data   * Secure   * Backed up   * Permission levels Data viewer:   * Good symbology   * Transparency   * Good base mapping   * Deal with different projections   * Fast   * 2D and 3D?   * ID tool   * Link through to documents/images   * Add simple tools   * Zoom and measure   * View CAD and GIS, raster, vect, TIN   * Good access   * Create features    * Add in data and coords   * Permission levels  I am hoping to achieve a solution that is cost effective and well supported. I'm thinking it will be a bolt together solution made up of multiple components but I just don't know where to start - any advice welcome! Many thanks * * * There are better options than file geodatabases for storing the data which are better suited to multiple access but I can't remember what they are called (still an ESRI database)? Happy to use large database functionality attached onto them such as SQL or Oracle - would this help? I don't have ArcGIS Server only desktop which we'd like to remain using.... Surely open-source elements can still use ESRI desktop? I haven't had much joy with decent viewers either - the only two nice ones I have seen are Autodesks Infrastructure Modeller (Autodesk 360) and Google Earth Builder.... I know there is a price to pay for those two but if there is nothing open source that matches then I would be willing to pay. Apparently ArcGIS Online doesn't allow you to even interrogate raster images which would be no use to us as we deal with height data a lot. Hence this is probably going to be a miss match of all sorts of software but I'm sure I can get something working? I would also like a customised metadata editor rather than the nasty one in ArcCatalog... Something that would log the incoming data in a database and also apply that same metadata to the feature classes in the geodatabases automatically. I don't like producing lose XMLs like you get with shapefiles. Am I just setting unrealistic targets with pie in the sky dreaming or do you think something is achievable? Many thanks :)


Is it possible to run a spatial query in QGIS 2.0 across multiple layers using a user-specified radius from a point?

I would like to be able to click on a point on a map to select all vector features (from multiple layers) within a specified radius of the point. Can anyone point me in the direction of how to do this please? The Spatial Query plugin selects only features from 1 layer at a time, and the search radius is only attainable by creating a point, then creating a buffer polygon and using the buffer polygon as a reference feature. Therefore I would have to run this plugin for each layer I'd like to select from. I'm hoping there might be a more simple/less time consuming method. Ideally I would like to be able to run this spatial query from shapefiles displayed in the QGIS 2.0 GUI, but if it's not possible, the shapefiles are eventually being exported to a PostgreSQL database, so some advice on how to run this type of spatial query from a PostgreSQL database would be really useful also, as I have very limited experience in using them. Thanks.


How to convert a microstation cell library into a format usable in ArcGIS?

I am in the process of standardising symbology across CAD and GIS and have decided to use the symbols we currently used for points in microstation. These are stored in a cell library. Does anyone know how I can create a style or a font out of these cells and therefore use microstation symbols in ArcGIS?


How to setup Eclipse for gvSIG?

I was working on setting development workspace for GvSIG. I referred to https://confluence.prodevelop.es/display/WSS/GvSIG+Installation. While compiling a simple program it says "extension directory is empty". In that tutorial it does not explain how to add extensions in extension directory. Is their any good tutorial on how to setup development environment for GvSIG or does anyone have experience with this?


The units of getArea() on a multipolygon within a shapefile

I am using GeoTools to find area and intersections of shapefiles. GeoTools uses the JTS geometry library (Vivid Solutions) and that has functions to getArea() but unfortunately I am not able to determine the units. Basically I get the multipolygon and iterate through the GeometryCollection and getArea() on each individual geometry within. All documentation suggests the units are returned based on what the input data is. But unfortunately my original shapefiles do not have the .PRJ file (I even created one) and also programmatically tried to reproject to an equal area projection (with a standard Molleweide projection via a wkt file and set to meter units) but the returned area just does not make sense. Any thoughts on what the units maybe? Or is this the right approach to computer areas of shapefiles?


Optimising map cache creation performance in ArcGIS for Server 10.2.1

I'm relatively new to ArcGIS for Server, so I hope that someone is able to point me in the right direction in case what I've been doing isn't good practice. I have 2 boxes with ArcGIS for server 10.2.1, both on the same site. Both boxes have 4 processors and 16gb RAM. Both boxes run on Windows Server 2008. ![enter image description here](http://i.stack.imgur.com/b7k2h.jpg) The site is used to both provide a couple of base map services to a small amount of users (<5) and to generate cache tiles for future services. I am currently generating cache tiles for a mapping service (~50GB). I would have expected to see the CPU usage on the 2 boxes running quite high. But it tends to be sitting between 15% and 30% on each box. The maximum instances for the caching tools is set to 6. ![enter image description here](http://i.stack.imgur.com/cn8RX.jpg) The maximum number of instances per machine is set to 3. ![enter image description here](http://i.stack.imgur.com/Of9ou.jpg) Am I wrong in assuming that I should be seeing a higher usage of the CPU? Have I not put in the correct figures? Or is my set-up not best practice? i.e. should I be using one site just for serving maps and another site just for caching? I think I've followed the guidelines mentioned here and here. But I'm pretty sure that the caching is running slower than it should. After 19 hours it has only cached 1.17% of all my tiles. ![enter image description here](http://i.stack.imgur.com/fAcJV.jpg) Any best practice suggestions much welcome. UPDATE: After 21 hours the CPU usage on both machines is down to nothing: machine 1: ![enter image description here](http://i.stack.imgur.com/E4TbD.jpg) machine 2: ![enter image description here](http://i.stack.imgur.com/w66k5.jpg) The cache status "in progress" bar on the server is still moving, but the cache % hasn't increased in the last 2 hours.


CartoDB API to make a table public after an import?

I am currently using the import API to import my layer data into CartoDB from another application. My question is whether there is a way to make this table PUBLIC using an API instead of the UI?


Force openlayers to not use browser cache for tiles refresh

I use OpenLayers.Layer.XYZ to display tiles from TileStache server without using the cache option of the server. However, I notice that the tiles stay in cache (probably the browser cache) until the whole page is refreshed with Ctrl-F5. If I want to redraw the XYZ layer, it does not works because the map use the browser cache. Is there a way to force the map to not use that cache? So could refresh the layer by asking fresh tiles from the server.               var map = new OpenLayers.Map('map',               { projection: new OpenLayers.Projection("EPSG:3857"),                 numZoomLevels: 20 });          var tiledLayer = new OpenLayers.Layer.XYZ('TMS',                     "{{ tmsURL }}1.0/layer/{{ shapefile.id }}/${z}/${x}/${y}.png?"+ new Date().getTime());          map.addLayer(tiledLayer);     tiledLayer.redraw(true); //does not make new GET requests to the server


OpenLayers transform EPSG 27700 coordinate to Google 900913

Community, I'm currelty capturing my mouse click event and trying to transform the coordinates into Long Lat. I need to get at the Long Lat as strings so I can build a url and throw it at Google Street view. Current transform code only prints the BNG coords.               lonlat = map.getLonLatFromPixel(e.xy);          brit = new OpenLayers.Projection("EPSG:27700");     google = new OpenLayers.Projection("EPSG:900913");          lonlatclone = lonlat.clone()     lonlatclone.transform(brit, google)     //alert("You clicked near " + lonlatclone.lat + "N," + +lonlatclone.lon + "E");      Thanks!


Are there Bookmarks with selection highlighted in QGIS?

I have a search query on the attribute table which highlights the features and then zooms to that particular layer. I take a bookmark for this particular view with the selection being highlighted. But later when I see the same bookmark it does not highlight those selected features.Any settings or any other plugin for this.