texts: Setting toolbar server control currenttool to none with ArcObjects and ArcGIS Server?

texts:
I am only using the map control and two toolbars on a custom webadf application.

One toolbar contains the standard map navigation controls.

The other toolbar is only one toolitem which references a class in app_code:

Here is the markup:

 <div>
                <esri:Toolbar ID="tbSelectParcelToolBar" runat="server" Height="36px" Width="155px" BuddyControlType="Map" Group="tbSelectParcelToolBar_Group" ToolbarItemDefaultStyle-BackColor="White" ToolbarItemDefaultStyle-Font-Names="Verdana" ToolbarItemDisabledStyle-BackColor="White" ToolbarItemDisabledStyle-Font-Names="Verdana" ToolbarItemDisabledStyle-ForeColor="Gray" ToolbarItemHoverStyle-BackColor="White" ToolbarItemHoverStyle-Font-Bold="True" ToolbarItemHoverStyle-Font-Italic="False" ToolbarItemHoverStyle-Font-Names="Verdana" ToolbarItemSelectedStyle-BackColor="White" ToolbarItemSelectedStyle-Font-Bold="True" ToolbarItemSelectedStyle-Font-Names="Verdana" WebResourceLocation="/aspnet_client/ESRI/WebADF/" TextPosition="Right" CssClass="tbSelectParcelToolBar" ToolbarItemDefaultStyle-CssClass="tbSelectParcelToolBar" ToolbarItemDefaultStyle-Font-Overline="False" ToolbarItemHoverStyle-CssClass="tbSelectParcelToolBar" ToolbarItemSelectedStyle-CssClass="tbSelectParcelToolBar" ToolbarItemDefaultStyle-Font-Bold="True" Alignment="Left" ToolbarItemDefaultStyle-Font-Size="10pt" ToolbarItemDisabledStyle-Font-Size="10pt" ToolbarItemHoverStyle-Font-Size="10pt" ToolbarItemSelectedStyle-Font-Size="10pt">
                    <ToolbarItems>
                        <esri:Tool ClientAction="Point" DefaultImage="~/images/SelectParcel_ButtonDefault.gif" JavaScriptFile="" Name="SelectParcel" ServerActionAssembly="App_Code" ServerActionClass="SelectParcel" Text="Select Parcel"/>
                    </ToolbarItems>
                    <BuddyControls>
                        <esri:BuddyControl Name="CCSDemoltionTrackerEditMap" />
                    </BuddyControls>
                </esri:Toolbar>

After I use my tool once I want to set the current tool back to "MapPan"

The code below does select the Pan tool but on the client my select tool is still the cursor and the current active tool.  What am I missing here??

           ESRI.ArcGIS.ADF.Web.UI.WebControls.Map adfMap = CCSDemoltionTrackerEditMap;

        string newCurrentTool = "MapPan";
        adfToolbar.Focus();
        adfToolbar.CurrentTool = newCurrentTool;

        ESRI.ArcGIS.ADF.Web.UI.WebControls.ToolbarItem toolbarItem;
        toolbarItem = adfToolbar.ToolbarItems.Find(adfToolbar.CurrentTool);

        ESRI.ArcGIS.ADF.Web.UI.WebControls.Tool currentTool;
        currentTool = toolbarItem as ESRI.ArcGIS.ADF.Web.UI.WebControls.Tool;

        // Set Map Current tool - server
        ESRI.ArcGIS.ADF.Web.UI.WebControls.MapToolItem mapToolItem;
        mapToolItem = adfMap.ToolItems.Find(adfToolbar.CurrentTool) as ESRI.ArcGIS.ADF.Web.UI.WebControls.MapToolItem;

        adfMap.CurrentToolItem = mapToolItem;

        // Set current tool on the client (sync toolbar and map controls in browser)

        string setActiveToolScript = string.Format(@"

// Set toolbar current tool - client

var toolbar = Toolbars['{0}'];

var currentToolField = $get(toolbar.currentToolField);

currentToolField.value = '{1}';

toolbar.selectTool();

toolbar.refreshGroup();

// Set map current tool - server

var clientAction = toolbar.items['{1}'].clientAction;

var clientFunction = clientAction + ""('{2}', '{1}', {3}, '{4}')"";

eval(clientFunction);

",

             adfToolbar.ClientID,
             currentTool.Name,
             adfMap.ClientID,
             currentTool.ShowLoading.ToString().ToLower(),
             currentTool.Cursor);

        ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult cr;
        cr = ESRI.ArcGIS.ADF.Web.UI.WebControls.CallbackResult.CreateJavaScript(setActiveToolScript);


texts:
The Calculate UTM Zone tool is listed amongst the Tools that are not available in ArcGIS Pro at version 1.4.
A workaround when needing UTM zones to be calculated would be to use the Calculate UTM Zone tool from ArcGIS Desktop but is anyone aware of a workaround for calculating UTM zones on a machine when only ArcGIS Pro (with its ArcPy) is installed?


texts: Storing different shapefiles as "one" in QGIS?

texts:
I converted OSM data to SpatialLite with ogr2ogr and loaded the resulting files (multipolygons, lines, multilinestrings, points) in QGIS (2.18). I added a river-polygon; then I styled the layers.

Now I'd like to share the results with my collegues.

Is there a way of storing these layers and their styles in one single file?

Alternatively, what would be the most appropriate format to share my results?


texts: How do I batch export maps for sub regions of a dataset with qgis?

texts:
I have a national level dataset consisting of polygons, polylines, points and rasters. I would like to export a map for every sub region (border defined by a polygon shapefile). Is there a simple way of doing this in QGIS?

Eventually I would like to be able to offer each sub region as stand alone maps in multiple formats and resolutions.

Many thanks for any suggestions!


texts: Unknown Old Coordinate System of the Phillipines

texts: I am reading a report made in 1979 and the coordinates show N 46,400 and E 47, 600. This is in the Philippines. Would anybody know what the coordinate system was used in this numbers? Thanks.


texts: Are there duplicate Zip codes in the US?

texts:
I am testing a solution for a tax calculation system, and some states have zip code ranges with specific taxes, so I need to know if there are zip codes that correspond to different locations.  One part of the system uses different combinations of city/zip to find the county, because some locales have taxes that vary by county.

Are there zip codes that correspond to more than one location but are separate from each other, possibly in different states or counties?

I know that a zip code can span cities and/or states but I want to know if there are zip codes that are completely autonomous of one another but share the same code.

Is there a way that I can find up-to-date information about this?


texts: Apply transformation to layer on the fly when using tools like Buffer

texts:
I know that you can have an on-the-fly transformation on a layer when rendering on the canvas, but is there a way to run a tool like Buffer where the layer should be re-projected on-the-fly just before buffering? For example, I have points in WGS84 but I want to buffer them in the linear unit of a specific national grid, or perhaps of the project default CRS.
I have looked around online for this but it is difficult to find any sources which are not referring to the normal "on-the-fly" transformations used when rendering the layer on the canvas.


texts: Hosting public Survey123 Survey with Student trial license?

texts:
I am trying to create / host new surveys in Survey123 with a 1-year student license. Right now when I try to create a survey at https://survey123.arcgis.com/surveys I get the statement: "You don't have access to this feature. Required privileges: publish hosted feature layers | create new item". Similarly, if I try to link Survey123 Connect (the desktop version of Survey123) to my ArcGIS Online account, it says I do not have permission. The end goal is to create a public survey to crowd source data.

I have talked to Esri multiple times. Each time they say I should be able host public surveys but cannot help me figure it out because I have a student license.

Can this be done with this license?


texts: Rounding labels of raster values in QGIS 3.8

texts: In QGIS 3.4 raster values were in label form rounded to 2 decimal places regardless of exact values of the given raster. Is there a possibility to reduce labelling of raster values in QGIS 3.8 to 2 decimal places regardless of exact values as in QGIS 3.4 ?


texts: How to read file geodatabase with Binary field in R?

texts:
Short version: how can I get into R the dataset available at this link?  (you need to log in to download, but registration is free)

The dataset that is downloadable at that link expands to a directory; as pointed out in the comments, this is an ESRI file geodatabase, and the important stuff is in a subdirectory. The format was reverse engineered and is readable by GDAL:

$ ogrinfo eschscholzia_minutiflora_twisselmannii/data/v93/tempgdb.gdb
Had to open data source read-only.
INFO: Open of `eschscholzia_minutiflora_twisselmannii/data/v93/tempgdb.gdb'
  using driver `OpenFileGDB' successful.
1: Eschscholzia_minutiflora_ssp_twisselmannii (Multi Polygon)

However, reading this into R results in:

  x <-readOGR('eschscholzia_minutiflora_twisselmannii/data/v93/tempgdb.gdb',
       'Eschscholzia_minutiflora_ssp_twisselmannii')

Error in readOGR("eschscholzia_minutiflora_twisselmannii/data/v93/tempgdb.gdb",  :
Unsupported field type: Binary

Another tack, using ogr2ogr, produces a shapefile:

$ ogr2ogr --mapFieldType Binary=Integer test_output eschscholzia_minutiflora_twisselmannii/data/v93/tempgdb.gdb/
Warning 6: Normalized/laundered field name: 'FOOTPRINT_Length' to 'FOOTPRINT_'
Warning 6: Normalized/laundered field name: 'FOOTPRINT_Area' to 'FOOTPRIN_1'
Warning 1: Value 121687920 of field FOOTPRINT_ of feature 0 not successfully written. Possibly due to too larger number with respect to field width
Warning 1: Value 925496867120400 of field FOOTPRIN_1 of feature 0 not successfully written. Possibly due to too larger number with respect to field width

but the resulting shapefile doesn't seem to have the information in it.  Or, maybe I don't know the right way to read it into R?


texts: Identifying connections/ intersections of vectors

texts: I would like to identify which vectors connect/ intercept within the same layer. In more detail I have 1000s of vector lines and I would like to identify which lines are connected to each other without manually clicking on each trail to identify the vector id. Is there a method that I could use that saves me time on manually doing it?


texts: Convert aerial image world file between coordinate systems

texts:
I have a set of aerial image tiles with world files in one coordinate system (NZTM - ESPG:2193) and would like to generate a set of world files for those SAME images in another coordinate system (NZ Mt Pleasant 2000 - ESPG:2124).

I have a little experience with QGIS, which I hope I might be able to use to achieve this goal.  I can obtain an SHP file with tile outlines for both input and output coordinate systems, and I've worked out how to extract tiles from the image files using gdaltindex.  Is there a way to "reverse" the gdaltindex to extract world files (eg jgw or similar) from a SHP file of image tiles?

With quite a large number of images (nearly 7,000), I would like to avoid doing a warp or other conversion to the images themselves.  This means that the new world files will need to have some rotation included to complete the conversion.


texts:
I am trying to display my shapefiles.shp with ol3edit template. On OpenGEO Suite I have successfully created an ol3edit application.I'm in possession of the ol3editApplication.war but the shapefiles.shp that I have loaded through the pgShapeLoader do not appear on the map, I can only see the default template map.

What I need help with, is to display the shapefile.shp I have loaded with pgShapeLoader on the template application I have created.


texts: How to calculate X and Y projected coordinate in batch processing

texts:
I have more than 1000 shape files (all are point features). They were initially in WGS 84. I projected them in UTM. Then through batch processing I added X, Y fields in each table. But all the X, Y fields are now empty or rather filled with 0. I need to calculate X, Y projected coordinate through batch processing and fill newly added X, Y fields. I checked in calculate field option for batch processing under data management tool. But don't see any calculate geometry option there. Where can I find the tool in the tool box so that I can use it for batch processing all my tables to calculate X, Y in meters.
I am using ArcGIS


texts: Linking polyline features on web map to Google Chart?

texts: I would like to display a line chart and (leaflet) map beside each other on a web page. When I turn off a series on the chart the associated polyline feature (river) should turn off on the map. I am having trouble finding examples of this functionality. Is it possible?


texts: I have too many dt0 files containing shear wave velocity at 30 (vs30). I have added the files as raster at QGIS. but I need to convert it to tiff in order to work easier. how can I do so?


texts: How to specify precision of a float in a mapserver template?

texts:
This GetFeatureInfo query will give you this result:

Evaporation = 1.0149659 mm

The template that produces the result is this:

<!-- mapserver template -->
[metadata_variable_name] = [value_0] [metadata_unit]<br>

How can I have it round the output to one decimal point? I.e. I want it to produce this instead:

Evaporation = 1.0 mm


texts: Opening TileMill from Ubuntu launcher after building from source

texts:
I build TileMill from source following this tutorial. Now I can open it by going to the folder cd ~/tilemill and run node index.js. This all works fine. But I want to open it using the Ubuntu launcher. What do I have to change to do that?

I am on Ubuntu 13.10 and use TileMill Version 0.10.1


texts: Is it possible to convert from Microsoft's format to WKB?

texts:
Microsoft chose to create its own binary storage format for spatial data and it is not valid for use with any of SQL's OGC WKB functions.

Has anyone run across code to translate from Microsoft's proprietary binary format to OGC's Well Known Binary format?


texts: How to calculate which US counties border the ocean?

texts:
I have a shapefile with boundaries of US counties. I want to figure out one seemingly simple thing - which counties are on the Atlantic ocean? NOAA maintains a list of coastal counties, but this includes counties that are on the "coastal watershed", which is not quite the same thing (I'm basically trying to identify counties with a coastal view). The same problem comes up when I try to use a NOAA GIS file with coastal boundaries.

It seems like the simplest way to do this would be to calculate whether a county has any border that is not shared with another county. Then I could throw out states that don't border the ocean (to eliminate the Great Lakes) and manually eliminate Texas counties that border Mexico. But I can't figure out how to do this calculation.


texts: Classification, Change detection and NDVI Using (landsat2 MSS), (landsat5 TM), (Landsat7 ETM+) and (Landsat8 OLI)

texts:
I have 5 Landsat images for the same study area. One of them in 1975 (Landsat 2 MSS), two in 1985 and 1995 (Landsat 5 TM) and one in 2005 (Landsat 7 ETM+) and the last one in 2014 (Landsat8 OLI). I want to produce land cover for every time and produce Normalized Vegetation Index (NDVI) and compare the results between for the periods (1975, 1985, 1995, 2005, and 2014). LandsatTM5, Landsat 7 ETM+ and Landsat8 OLI are easily comparable because they have common bands. I am wondering how can I make change detection and deals with Landsat 2 MSS?
To be informed the resolution for (Landsat 2 MSS) is 60m and the other sensors their resolution 30m how can I deal with this problem?


texts: Posting attribute/field values by points on the map view

texts:
To see a attributes/field values of point(s) or a polygon most usually  is to select (i) icon and then clicking on a point or a polygon and then table with values shows on the right.
Is it possible to post attribute/field data by the points/polygons in the map view (up-right corner of the point itself)?


texts: How to control the order of appearance of markers using leaflet?

texts:
I'm plotting out markers from GeoJSON files onto my Leaflet map. Some of these markers overlap so now I want to control the order of appearance of these markers so that one type always sits above the others. How do I do this? Is it possible?

The marker that I want to be on top of everything is also moving around in the map  (see url below). I've noticed that sometimes it's above the other markers and sometimes below.

I tried creating layer groups but nothing really happened...?

Here's the map:
http://www.oskarlin.com/hike2013/


texts: Checkboxes turn off layers within a mapservice, and I want them to make the layers visible?

texts:
This webmap project I keep working accesses mutilple layers within a couple different mapservices. I would like to learn how I can load the layers without them drawing. I've recently incorporated check boxes instead of links to turn each layer on and off. They work but in the reverse way I want them to.

I've not been able to figure out how to keep the layers from drawing until I select a checkbox.

here is a link..

http://www.co.frederick.va.us/planning/newmap1copy2.html


texts: List of land cover classes in particular area and use them as an item for ui.Select

texts:
I would like to identify the list of land cover classes in particular area and use them as an item for ui.Select. And I would like to use below given label for identified land cover values. I have drafted a code, but I am facing with an error.  Is anyone can help me to improve it?

https://code.earthengine.google.com/74284d0174febea1be10a4dd9dccffc6?as_external

Error:

    var block = ee.Geometry.Polygon(
            [[[10.884499359130846, 50.55773169053401],
              [10.884499359130846, 49.37053314015084],
              [13.433327484130846, 49.37053314015084],
              [13.433327484130846, 50.55773169053401]]]);

    var dataset = ee.ImageCollection('MODIS/006/MCD12Q1')
      .select('LC_Type1')
      .filterDate('2018-01-01','2018-05-01');

    var landcover = dataset.first();
    var block_landcover = landcover.clip(block);

    var Vis = { min: 1.0, max: 17.0,
      palette: [
        '05450a', '086a10', '54a708', '78d203', '009900', 'c6b044', 'dcd159',
        'dade48', 'fbff13', 'b6ff05', '27ff87', 'c24f44', 'a5a5a5', 'ff6d4c',
        '69fff8', 'f9ffa4', '1c0dff']};

    Map.addLayer(block_landcover, Vis, 'Land cover');

    print(block_landcover);

    var block_landcover_vec = block_landcover.reduceToVectors({
      geometry: block,
      crs: landcover.first().projection(),
      geometryType: 'polygon'
    });
    print(block_landcover_vec);

    Map.addLayer(block_landcover_vec);

    var land_cover_types = ee.List(block_landcover_vec.aggregate_array('value'));

    var land_cover_select = ui.Select({
                  items: land_cover_types,
                  placeholder: 'Select a Mask',
                  onChange: function(value) {
                    var land_cover_value = value;
                    },
                  style: {width: '200px'}
                  });

print(land_cover_select);

    [{label: 'Evergreen Needleleaf Forests', value: '1'},
    {label: 'Evergreen Broadleaf Forests:', value: '2'},
    {label: 'Deciduous Needleleaf Forests', value: '3'},
    {label: 'Deciduous Broadleaf Forests', value: '4'},
    {label: 'Mixed Forests', value: '5'},
    {label: 'Closed Shrublands', value: '6'},
    {label: 'Open Shrublands', value: '7'},
    {label: 'Woody Savannas', value: '8'},
    {label: 'Savannas', value: '9'},
    {label: 'Grasslands', value: '10'},
    {label: 'Permanent Wetlands', value: '11'},
    {label: 'Croplands', value: '12'},
    {label: 'Urban and Built-up Lands', value: '13'},
    {label: 'Cropland/Natural Vegetation Mosaics', value: '14'},
    {label: 'Permanent Snow and Ice', value: '15'},
    {label: 'Barren', value: '16'},
    {label: 'Water Bodies', value: '17'}]


texts: Does the ArcGIS Online "Spatial Analysis Service" require data to be hosted on ArcGIS.com?

texts:
I'm exploring the new-ish ArcGIS.com Spatial Analysis Service.

  The Spatial Analysis service contains a number of tasks that allow you
  to perform common spatial analyses on your hosted data.

I'd like to use it to aggregate attributes from a variety of sources against a target layer - similar to the Union geoProcessing command.

Does "your hosted data" mean that the spatial analysis service requires all data sources to be stored in ArcGIS.com?

The documentation also states:

  These tools allow end-users to easily perform analysis against layers
  hosted in Online as well as other layers they have access to


texts: How to do fuzzy maps (FUZZY module in IDRISI) with QGIS/GRASSGIS?


texts: How can I add KML to OpenLayers from remote server

texts:
Possible Duplicate:
  Problems adding KML layer in OpenLayers

I'm trying to add the following KML to my Openlayers project:
http://www.marinetraffic.com/ais/ge_marinetraffic.kml

using this code:

function init() {
        map = new OpenLayers.Map('map');

        var wms = new OpenLayers.Layer.OSM();

            var sundials = new OpenLayers.Layer.Vector("sundials", {
            projection: map.displayProjection,
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                url: "sundials.kml",
                format: new OpenLayers.Format.KML({
                    extractStyles: true,
                    extractAttributes: true
                })
            })
        });

        var marine = new OpenLayers.Layer.Vector("marine", {
            projection: map.displayProjection,
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
            url: "http://www.marinetraffic.com/ais/ge_marinetraffic.kml",
                format: new OpenLayers.Format.KML({
                    extractStyles: true,
                    extractAttributes: true

                })
            })
        });

        map.addLayers([wms, sundials, marine]);
        map.addControl(new OpenLayers.Control.LayerSwitcher());
        map.zoomToMaxExtent();
    }

and I don't see the KML.
In Chrome I get error :

  XMLHttpRequest cannot load http://www.marinetraffic.com/ais/ge_marinetraffic.kml. Origin localhost:57551 is not allowed by Access-Control-Allow-Origin.

so I tried saving the KML locally , but still nothing showed (maybe because KML has urls inside it).

Is there a way to show it on the map ? (probably proxy?!) if so , Can someone please post example for the easiest/fastest way to do it .

thank you.


texts:
This question is somewhat similar to this one: How to efficiently access files with GDAL from an S3 bucket using VSIS3?, except I am trying to access bucket files from Google Cloud Storage, with Python. I am using GDAL 2.3.1, so I should be able to use the VSIGS virtual driver.

According the the example I came across, it looks like this simple piece of code should work:

from osgeo import gdal

ds = gdal.Open('/vsigs/my_bucket/image.tif') # doesn't work
ds = gdal.Open('gs://my_bucket/image.tif') # doesn't work either

But I keep getting a "file not found" error, so it looks like GDAL does not understand that I'm trying to open a GCS file. What am I missing?

Notes:

gcloud is properly installed and configured on my computer (the
command gsutil ls gs://earthengine-public/ works properly).
I'm working inside a Python virtual environment, so that might be the
issue there.


texts: Combining two raster layers with ArcGIS Raster Calculator?

texts:
So I am trying to join/merge two raster layers that have values of either 1 or 0. I am using the following command in in ArcGIS Raster Calculator:

Con(("urban" == 1) | ("mixed" == 1), 1, 0)

The new raster layer is missing cells from the "urban" raster layer, I have no idea why this is happening.

I have also tried the following commands with the same result:

("urban" == 1) | ("mixed" == 1)

or

removing all the cells equal to 0 in both layers and then:

"urban" + "mixed"


texts: One meter accuracy for all of Continguous US: how is this possible?

texts:
On the webpage about the projection EPSG:5071 (NAD83(HARN) / Conus Albers), it is said that the accuracy:

  Remarks: Accuracy 0.1 to 0.2m in California, 0.05-0.11 in Oregon,
  elsewhere better than 0.05m.

The WKT says that it is a Albers_Conic_Equal_Area projection. But no projection can preserve distance everywhere. My questions are:

How can a projection achieve sub-meter accuracy over such a large geographical extent?

What exactly does the "accuracy" (of 1 meter or 0.1 meter) referred to in epsg.io mean? Do they mean that distance is only off by no more than a meter in the contiguous US? If not, how much is distance off here in the worst case?


texts: How to geo-reference a tif image knowing corner coordinates

texts:
I am trying to create a stacked tiff image out of 6 tiff images. Each one of them represents a different band.
When I try to do that, I get an error that the photos are not geo-referenced, which is true,
because the corner coordinates of the photo are only known after calculations.
My question is, how can I geo-reference these photos in order to create a stacked
tiff image, given that I know the corner coordinates along with the rest of metadata (image resolution, altitude etc.)?
This is the code I (plan to) use to create my stacked tiff image:
my_bands = "my_tif_photo_band*[1-6]*.tif"
stack_band_paths = glob(my_bands)
stack_band_paths.sort()

arr_st, meta = earthpy.spatial.stack(stack_band_paths, nodata=-9999)

I guess it can be done with gdal but didn't find an answer yet.


texts: Shapefile creation for GeoServer from cruise track, and serve as layer in Leaflet

texts:
I am new to both GeoServer and shapefile, today only I installed (GeoServer) on my CentoOS, I am familiar with Leaflet, I am looking for solution to draw huge cruise track which are already there in both database (mariadb) as well as in CSV file

So currently situation is like this, I have CSV file with many columns examples

latitude    longitude   track_id
-35.325     90.125      c1
...         ...         c1
....        ...         c1
-35.31      90.126      c2
...         ...         c2
....        ...         c2

I would like to use them in Leaflet like below, and want to show cruise track

http://{s}.somedomain.com/blabla/{z}/{x}/{y}.png

So my question is

How do I convert these data to shapefile and deploy them in GeoServer

( what are the tools I can use preferebly CLI to convert CSV to shapefile )
So within GeoServer is it possible to retrieve cruise track of individual trackid using some query like below at least REST API

http://{s}.somedomain.com/blabla/c1/{z}/{x}/{y}.png
                                 ^
                           Here c1 is trackid,
                          serve cruise track from track id c1


texts:
I am using an EasyButton for showing a sidebar in a Leaflet map. Now I want to restrict the functionalities inside the sidebar in that way, that they only are accessible when the sidebar is opened. My plan was to ask for the current state of the easybutton, but I apparently don't know exactly how.

Here the code for the easyButton:

navi_button = L.easyButton({
 states:[{
    stateName: 'openSidebar',
    icon: 'fa fa-route',
    title: 'Navigation öffnen',
    onClick: function(control){
        sidebar.show();
        control.state('closeSidebar');
        }
    },{
    stateName: 'closeSidebar',
    icon: 'fa fa-route',
    title: 'Navigation schließen',
    onClick: function(control){
        sidebar.hide();
        control.state('openSidebar');
        }

    }]
});
navi_button.addTo(map);

Then it should follow like that (incorrect code):

if (navi_button.state() ==  openSidebar){
...[sidebar functions]...
}
else{};

Is there a way to get the current state of an easybutton?


texts:
Is it possible in QGIS to make a geometry blink?

With blinking I mean making a geometry or group of geometries appear and disappear every N milliseconds.


texts: How to do supervised image classification in saga with the help of R script or Python script

texts:
I am using Ubuntu 12.04 and want to do image classification in SAGA. SAGA has numerous classification algorithms which is not present in GRASS and QGIS. I am new to SAGA, but more accustomed to work on R or python. I installed RSAGA package in R, but could not find any command to do image classification. Please let me know how to do image classification in SAGA through an R/python/shell scripts.

Thanks,
Karthik K.


texts: ArcMap trace the creation/moving/deletion events by windows user

texts:
I want to check whether there is a way to trace the creation, moving and deletion in the editing session by windows currently logged in user. What I only know now is how to trace the creation/moving/deletion events by database user and displayed in attribute table of the layers under the monitoring.

I am using ArcMap 10.2.2.


texts: Configuring image popups in a Silverlight application

texts:
My Silverlight application contains a points layer which contains paths to a folder of geotagged photos. These points were generated using the GeoTagged Photos to Points tool. I chose not to import the photos into the file gdb. When I view the layer in ArcMap and configure popups to display the path as a URL, clicking on a point pops up a preview of the image instead of the default popup (showing the actual value of the Path field).

Inside my application (built using the ArcGIS Silverlight viewer), the popups only show the path to the image. There does not seem to be an option to configure it as a link instead. In order for the actual image to be displayed, would I have to select the option to add the photos as attachments to the SDE gdb?


texts: I am frustrated by the seeming difficulty of calculating x,y coordinates in QGIS 3. As a longtime user of ArcGIS I find Esri much easier for this. However, I like QGIS and think in many ways it is more powerful. So, how does one easily enter x,y coordinates in a shapefile attribute table with QGIS 3, and furthermore be able to select units, e.g. decimal degree, lat/long, etc.?


texts: Toggle editing tool block when apply filters

texts:
I'm using QGIS 2.18 on Windows 10,
When I apply a filter on a layer, the editing tool comes into disabled.

Someone can help me?


texts: Nearest Neighbor Analysis returning 0 for Observed Mean Distance

texts:
I am working in QGIS 2.18.14 to which i am fairly new. I am trying to perform a nearest neighbor analysis, however it returns 0 for the observed mean distance. the expected distance is also an absurdly small number:

Observed mean distance: 0.0
Expected mean distance: 8.02080627703e-05
Nearest neighbour index: 0.0
Number of points: 78
Z-Score: -16.8957775986

When I measure the distances between points using the Measure Line Tool i get normal values around 5-20 meters. My best guess is that since my points are in Lat-Long, it's performing calculations in lat-long instead of in meters, but i don't know why it would do that or how i could fix it. All layers are in the same CRS (WGS 84 EPSG:4326). with on-the-fly crs transformation off.


texts: Define catchment boundaries with GIS using R

texts:
Using a DEM, I want to define catchment boundaries for a given location on a river. Basically, what area drains into this point. In ArcMap, I can do that with flowacc and other tools; but I'd like to do that in R.
I know how to import a DEM raster in R but that's about it.


texts:
I have a forest area, where I need to identify all the dividing lines between tree stands. I have a different amount of rastar files (RGB, NIR, DTM, DSM), and need an output with the boundaries as a shapefile. I would prefer if it came out as lines, but polygons is okay.
So, I need to identify the blue lines in the picture for a large forest area (the example is drawn from a normalized DSM, but I have other data available). These blue lines are just my quick drawing, but it needs to be more precise. The method does not need to be perfect, but identify the most significant changes in the vegetation.


texts: GeoServer - longitude/latitude is out of bounds

texts:
We could see the below error from GeoServer when zooming out the map, because the bbox sending request more than the MONGO DB accepted range(-180,-90,180,90).

"Query failed with error code 2 and error message 'longitude/latitude is out of bounds"

But our data is within the range, do we need to do any configuration or any workaround.

The below URL is not working:

http://localhost/geoserver/mongoworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng8&TRANSPARENT=true&LAYERS=mongoworkspace%3Asample11&exceptions=application%2Fvnd.ogc.se_inimage&TILED=false&CRS=EPSG%3A4326&STYLES=&WIDTH=1454&HEIGHT=728&BBOX=-127.96875%2C-255.5859375%2C127.96875%2C255.5859375

The below URL is working:

http://localhost/geoserver/mongoworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng8&TRANSPARENT=true&LAYERS=mongoworkspace%3Asample11&exceptions=application%2Fvnd.ogc.se_inimage&TILED=false&CRS=EPSG%3A4326&STYLES=&WIDTH=1454&HEIGHT=728&BBOX=-63.984375%2C-127.79296875%2C63.984375%2C127.79296875


texts: Assign polygon to the nearby points in ArcMap

texts:
I'm a new user to ArcGIS and I'm trying to match a polygon to a point that's nearby. To be more specific, the blue area are the census tracts that get polluted. The green spots are the factories, the potential sources of the pollution. I would like to take every census tract and match it with the nearby factory (basically assuming the nearby factory is the culprit). If the census tract itself contains one factory, I want them to get matched. If the census tract itself contains more than one factory as in the highlighted area on the image, I'd like this census tract get matched to all the factories within it. If the census tract itself contains no factory, I'd like to match it with the closest factory.

I tried 'Join' from 'Join and relates' and 'Spatial Join' and 'Near' from the toolbox. It looks like 'Spatial Join' does what I want (one to many, closet). But when the census tract has two factories in it, it only gets matched to one of them, not both. I also exported the attribute table of the spatial join and the one to many match is still not there.

I'm not sure what I did wrong or maybe it can be achieved by some other function that I'm aware of. I'm currently working with ArcGIS desktop 10.3


texts: How to select a specific area (in a polygon form) determined by some value range in a raster band?

texts: For example, I want create a vector layer with polygons that represents all areas where the elevation is between 500 and 600. Someone has any idea to help me? I'm using PyQgis 2.2.


texts: Need WFS-T for field work on GeoServer/PostGIS

texts:
I'm using a Boundless install of OpenGeo Suite on Ubuntu Server 12.04 with Tomcat 7.
I need to allow remote access to update from the field. I can edit features fine on network, but not remotely.

*Originally added:
"I found this tutorial http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html on the topic, but couldn't find the httpd.conf file anywhere."

This info proved irrelevant to the problem*


texts: Create points where 5 unique forest age class polygons meet

texts: I am working with a polygon layer of forest age data (one shapefile with many features representing forest stands of different ages) trying to identify places where forest stands in 5 different age classes meet to make grouse habitat management decisions. It would be helpful to automatically generate points where these specified stand boundaries meet. Any suggestions? Thanks!


texts: Is topology stored explicitely in vector layers or is it derived from stored geometry information?

texts:
In vector layers, different types of information are stored like:

Geoemtry
Attribute data
Meta data (like filename, projection etc.)
Spatial indices

However, what about topology? Is it an explicit type of information and stored as such in the underlying file or database? Thus something like: "feature no. 7 borders feature no. 6 starting from vertex 54 up to veretx no. 87, corresponding to vertices 103 to 136 of feature 6". Or is topology just an implicit information - one that is derived from the geometry of the features present - quite similar to the length of a line or the area of a polygon that can be deduced from the geometry, even if it is not stored as attribute.
As this question seems to be software specific, I am asking specifically about using Geopackage files in QGIS - however, every answer that addresses the general principles is welcome as well.


texts: QGIS GDAL toolbox - can't edit console call

texts:
I've noticed a few answers for QGIS/GDAL questions that show how one can edit the console call e.g. https://gis.stackexchange.com/a/159577/76240
Im using QGIS Essen 2.14.3 via OSGeo4W on Windows 7, and I can't see the pencil button indicated so I'm stuck editing a call in notepad and pasting it into the OSgeo4w shell.
Is there an option somewhere I need to change to enable in-tool editing? Has the option simply been removed?


texts: Converting DXF to ESRI Shapefile using ogr2ogr

texts:
I like to convert this DXF file to ESRI Shapefiles. I tried the following command:

ogr2ogr -f "ESRI Shapefile" test.shp Umweltzone-Neu-Ulm.dxf

... which output the following warnings and errors:

  Warning 6: Normalized/laundered field name: 'ExtendedEntity' to 'ExtendedEn'
  Warning 6: Normalized/laundered field name: 'EntityHandle' to 'EntityHand'
  ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shapefile.
  ERROR 1: Unable to write feature 1 from layer entities.
  ERROR 1: Terminating translation prematurely after failed
  translation of layer entities (use -skipfailures to skip errors)

Inspecting the file with ogrinfo does not give a helpful advice for me:

ogrinfo -so -al Umweltzone-Neu-Ulm.dxf
INFO: Open of `Umweltzone-Neu-Ulm.dxf'
      using driver `DXF' successful.

Layer name: entities
Geometry: Unknown (any)
Feature Count: 3
Extent: (573038.389500, 5359699.934800) - (576023.432710, 5361356.286500)
Layer SRS WKT:
(unknown)
Layer: String (0.0)
SubClasses: String (0.0)
ExtendedEntity: String (0.0)
Linetype: String (0.0)
EntityHandle: String (0.0)
Text: String (0.0)

Also, from the Extent I am guessing that the EPSG code is different to 4326. But which?

What is the correct command to perform the conversion?

Related

ogr2ogr coverting DXF to shapefile, why am I losing part of the feature?
Specifying element type for DXF creation using ogr2ogr


texts: I have saved a style as qml file. I try to set the style for a raster layer in python directly. For this, I use function "loadNamedStyle". After the call, the color themes are updated in my model but the description text under the raster layer is still not updated. My question, how can I refresh the information?


texts: How would you explain what a shapefile is?

texts:
How would you explain what a shapefile is to someone who is not already a GIS-professional but is interested in learning more?

Shapefiles are one of the most common GIS data storage formats. However shapefiles are as I have understood not really a single file but instead a set of files, containing as a minimum a

.shp-file storing the actual geometry features (Point, Polyline, Polygon, and Multipoint) addressed here for example.

and a

.dbf-file storing the so called "attributes" (and being a database file format developed in the 80'es if I'm not mistaken).

and a

.shx-file being kind of an index putting all of these attributes together with the

Moreover each shapefile (set of files) only contains a single type of vector GIS data being either of the type Point, Polyline, Polygon and Multipoint and hence I suppose it is common to work with several shapefiles simultaneously when manipulating them in for example ArcGIS or QGIS.

I find all of this a bit confusing and therefore my question.


texts: How do I open a Geotag (.jpg) Photo in ArcGIS 9.3 (or photo to point)? In 10 and above versions it shows an ArcPhoto option in Data Management tools, but not in Arcgis 9.3.


texts: Adding controls to OpenLayers maps - is this good code

texts:
I have multiple OpenLayers maps, each map gets a subset of controls that I use across all maps. In the past I have added controls in the traditional way, for each control.

var control = new OpenLayers.Control.xxx({ options: whatever });
MAP.addControl(control);

I am considering defining an object that would contain most/all of the controls that I might use. That object would be is a .js file would be loaded into each web page. I would then add the controls I need for that page.

the control object, that is in the control.js file

var MY_controls = {
    scale:  new OpenLayers.Control.Scale(),
    mousePosition :new OpenLayers.Control.MousePosition({numDigits:6}),
    panZoomBar: new OpenLayers.Control.PanZoomBar(),
    ctrl_zoomin: new OpenLayers.Control.ZoomBox({ disable:true }),
    ctrl_zoomout: new OpenLayers.Control.ZoomBox({out:true,disable:true})
};

then on each page I would do something like this

array = ['scale','mousePosition','panZoomBar'];
for ( var x=0; x < array.length; ++x ) {
    MAP.addControl(MY_controls[array[x]]);
  };

Is this good code?


texts:
I am using the point cluster symbology in QGIS and have defined the size of each point based on the cluster size using @cluster_size in the size assistant.

It looks great on my map, but I cannot figure out how to add the size symbology for the variable to my legend in the map composer to create a map for a presentation/publication.


texts: Getting coordinates of ways in *.pbf file?

texts:
I would like to extract some lines and polygons from OSM data (In the format of .pbf). After using osmosis I can get a osm file with all the elements like this:

<way id="102670197" version="1" timestamp="2011-03-04T12:10:15Z" uid="49111" user="Markus B" changeset="7453788">
    <nd ref="1185769039"/>
    <nd ref="1185769259"/>
    <nd ref="1185768938"/>
    <nd ref="1185768893"/>
    <nd ref="1185769039"/>
    <tag k="sport" v="tennis"/>
    <tag k="leisure" v="pitch"/>
</way>

I understand that if I use Overpass API I can get the coordinates according to https://stackoverflow.com/questions/25297077 but I am wondering whether I can use some osm tools to get the coordinates from the .pbf file.


texts:
I am searching for a way to convert the european DEM (EU-DEM https://www.eea.europa.eu/data-and-maps/data/eu-dem#tab-european-data) to (xy)z. In fact I'd only like to obtain the z-data (elevation). Input format is geoTiff.

I tried the conversion geoToff to xyz using the "gdal2xyz" plugin. The only problem - disk space. Even converting "small" geoTiffs (~200MB) of course results in a huge xyz-file >20GB. I want to convert a input-file size 22.3GB (!)

Basically I don't need the x and y, only the z (elevation). Each z-Point could be addressed by selecting the correct line in the output-file.

A litte background: This dataset (csv/txt) will be used in a microcontroller (80MHz, ~100kB RAM) application from a SD-Card. I will have a basic file system (FatFS) where I can jump to a desired line.

How do I convert to a "z-file"?


texts: Multiple AND operators in CASE function in QGIS field calculator not returning results

texts:
I am trying to evaluate three attribute fields and return a different value. When I try this expression I get no return.

CASE
WHEN (Att_A =1) AND (Att_B = 2) AND (Att_C = 3) THEN 40
END

When I try it with 2 I get a return.

CASE
WHEN (Att_B = 2) AND (Att_C = 3) THEN 40
END

Can you not evaluate three items in a case statement in QGIS or am I doing something wrong?


texts: Applying color ramp to gradient fill in ArcMap?

texts:
I know that you cannot apply color ramps to the outline of a polygon, so essentially what I want to do is add a gradient fill with the inner color of the polygon being "no color", and then apply a color ramp to the outer color of the gradient fill.

This would help achieve classification of the polygons while still allowing the interior of the shape to be transparent.

Is there any way to achieve this by creating a custom style?


texts: Creating several maps showing different layers but same area using QGIS?

texts:
I know about the print composer's atlas generation tool, which allows users to create multiple maps that show the same layers/features but different geographical areas.

What I am looking for is a workflow that would optimize the creation and updating of a number of maps (probably around 10, potentially more) that would cover the same area but show different shapefiles/layers and therefore have different titles and slightly different legends.

Right now my proposed workflow is the following:

Load all layers (in the same file)
New print composer
Select layers for Map 1
Add legend, text boxes, title, etc.
Save as template as Map1.qpt
Export as PDF
Repeat steps 3 to 6 for Map 2, 3, etc.

When I need to update the maps I would do the following:

Re-export layers and layer styles as necessary (for layers other than the base map)
Select layers for Map 1
Load print composer
Add Items from Template (Map1.qpt)
Export as PDF
Repeat steps 2 to 5 for Map 2, 3, etc.

Would it more efficient to create one QGIS file for each map instead?

Whenever I update the maps I have to re-export a number of shapefiles so using duplicate layers and layer groups would not be ideal either--not to mention that it can get pretty confusing.


texts: Using the conditional branch algorithm in QGIS modeler gives unexpected results

texts:
I'm trying to implement the new conditional branch algorithm in a model with the following statements:
if( @Udtræk_til_grøfter_OUTPUT  > 0, true, false)

if( @Udtræk_til_grøfter_OUTPUT  <= 0, true, false)

The "branching" works fine, it runs either if they are true, however, it is not consistent with what I know is in the data I feed it with. So I'm suspecting the @Udtræk_til_grøfter_OUTPUT variable doesn't contain what I thought it did. Come to think of it, it probably contains an array with rows? It is the output of an extract by expression algorithm:

What I want to do is get the number of rows in that extraction and match it against the above condition, but I'm not sure how to do that?


texts: Any high-level GIS library for python from the point of view of a data-scientist?

texts:
I am a data-scientist (an applied economist) and I have often to deal with data that includes spatial attributes.

I am hence interested in using spatial data, rather than producing spatial attributes.

Typical operations are attribute merging for vector data or pixel computations for raster data.

My colleagues use extensively R for these operations. My workflow is however in Python, and I am looking for a high-level python library that would allow me to keep a consistent workflow.

In particular I already managed to integrate data analysis with Python using the pandas library, and I wonder if there is a high level library that integrates the various GIS tools to provide a high-level unified interface. In all cases I am looking for script-based solutions, to work with Jupiter, rather than GUI programs like QGIS.

These are the libraries I have already evaluated and the reasons why they don't fit my needs:

GeoPandas
This is  the closest library to my needs, but it is still immature compared with R (e.g. it's not possible to set the legend position in the map, there is no extensive documentation for the API..) and only vector operations are supported (no rasters).
QGIS Python bynding (PyQGIS)
Aside the dependence on user-specific Qgis installation path, the main problem is that it requires to adapt the script to consider GUI specific elements (like the concepts of application, canvas,..) that complicate pure scripting tasks.
Python/GDAL, Shapely, Matplotlib basemap toolkit, Fiona
These are all relatively low-level libraries that do specific tasks that possibly would be used by a higher-level library.


texts: QGIS automatically inserts segments when editing polygon nodes

texts:
I have created a shapefile with multiple polygons. When I attempt to move one of the veritices with the node tool new sements automatically appear that cross the polygon and even cross the opposite poygon border to a vertex on another polygon. I can sometimes clean this up and toggle editing off.  Then I "Check plygon validity" and there are no errors, but when I toggle editing again the offending segments reappear. I started again with a new QGIS project and a new shapefile layer (not snapping to the "bad" layer) and got the same problem at another location. Same problem occurs if "avoid intersecting polygons" is on or off. Snapping distance is set to 10 m, distance is >100m to the vertices that the new lines automatically go to. One, two, or three new lines may radiate from the same "offending" vertex.

Working with this new layer and project, if I close QGIS and reopen, the shapefile looks good, but the probelm reappears when I start to edit the node.  I was able to delete the offending node, but it will reappear when I edit vertices weith the node tool. Help!  (V 1.8, Windows). I don't recall this happening with v 1.6.


texts: Pyqgis script to join delimited text layer on KML and create graduated symbols

texts:
I need to create multiple maps from QGIS which have the same procedure and so wanted to write a script. I found little help in terms of how to join delimited text layer to a KML vector layer(of geohashes) and create a graduated style based on counts for each geohash.

I need help on writing pyqgis commands and create a script for the following actions done in QGIS.

Steps in qgis:

1) Load KML file
python:

vlayer = QgsVectorLayer("C:\Users\HOME\Desktop\Test.kml", "Test", "ogr")

2) Add delimited text layer on KML vector layer

3) Create graduated symbols based on counts at geohash

What would be the commands to achieve steps 2 and 3 in python?


texts: how to judge the side from a point to a linestring

texts: I'm working with NTS (NetTopologySuite), I get point geometry and a directed linestring, how to judge the side of the point locate with the linestring? one the left side, right side, or just on the linestring?


texts: Editing coordinates of CityGML Building?

texts:
I'm looking for the most efficient method of editing coordinates for a building in a CityGML file. My setup:

I have a base CityGML file with a set of buildings in a defined area of the community I'm working in.
I am trying to merge a new building from a different CityGML file to my base CityGML file.

My initial idea was to change the coordinates of the new building by editing the CityGML file in order to match it to the base CityGML file, and then simply copy and paste the appropriate parts of the CityGML file into the base CityGML file.

However, I discovered that because every face of the building has its own coordinates, this would be a very tedious process. I have to be able to iterate the location of the new building in the base CityGML file, so I'm looking for the best method of doing this.

Any recommendations?


texts: Confidence in pan-sharpened classification?

texts:
I pan-sharpened one Landsat Image on ERDAS using the resolution merge resource, with brovey transform and nearest neighbor techniques. But I was told that in terms of land-use classification, it would be a mistake doing it, since pan-sharpening creates false pixels that would add erros.

Is that true?


texts:
I am trying to learn ArcObjects through .Net with the help ESRI website and I copied one code snippet from ESRI help.arcgis.com and pasted it in my code. I am seeing this error message.

  The type or namespace "converter" does not exist in esri.arcgis.adf

I do not understand this error. Please help me to solve it as I am new to this ArcObject.

I am using Arcgis 10.0 with .net framework 3.5

public override void OnMouseDown(int Button, int Shift, int X, int Y)
    {
        // TODO:  Add DrawGraphicLine.OnMouseDown implementation
        //Get the active view from the application object (that is, hook).
        IActiveView activeView = GetActiveViewFromArcMap(m_application);

        //Get the polyline object from the user's mouse clicks.
        IPolyline polyline = GetPolylineFromMouseClicks(activeView);

        //Make a color to draw the polyline.
        IRgbColor rgbColor =    ESRI.ArcGIS.ADF.Converter.ToRGBColor(Color.FromArgb(255, 0, 0));

        //Add the user's drawn graphics as persistent on the map.
        AddGraphicToMap(activeView.FocusMap, polyline, rgbColor, rgbColor);

        //Only redraw the portion of the active view that contains graphics.
        activeView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
    }


texts:
I tried finding latest images of Landsat 5 in Earth Explorer of path 202 row 24 and the latest result is from 10/2011.

Isn't Landsat 5 operational or at least been around after 2011?


texts: Network Analyst not creating all junctions

texts:
I have a road network that I have added and merged with a KML into a shapefile that I'm trying to create a network with. However, when I build the network, I receive errors "The features's geometry has zero length" and "The edge feature is too small to participate in snapping and may not be connected to other features"

Then upon further inspection after the network has been built, I see that I'm missing many junctions where there was the existing road network and where I merged the KML with the street network. I'm not too sure how to fix this. Attached are some screenshots.The dot not on the line segment is just from another layer I forgot to turn off.


texts: QGIS won't install on Mac OSX, during install says "The Installation Failed."

texts:
I have installed the requirements:

GDAL Complete 1.11 framework package
Matplotlib Python module

and I've made sure these requirements are properly installed by checking library/frameworks and /Library/Python/2.7/site-packages.

When I go to install QGis I get an error message stating "The installation has failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance."

I am running El Capitan 10.11.


texts: Google Earth Engine: Linear Regression problem to download the image

texts:
I made this code to get a Linear Regression using the function SAVI in my own collection but it is not working.
Does anyone know why?
 // Simple regression of year versus NDVI.

  // Define the start date and position to get images covering SatgeArea,
  // Bolivia, from 2000-2010.
  var start = '2000-01-01';
  var end = '2014-12-31';

  var region = table

  // Filter to Collection
  // time of year to avoid seasonal affects, and for each image create
  the bands
  // we will regress on:
  // 1. A 1, so the resulting array has a column of ones to capture the
  offset.
  // 2. Fractional year past 2000-01-01.
  // 3. SAVI.
  // 4. Mask Clouds
  var col = imageCollection
    .sort('system:time_start')
    .filterBounds(region)
    .map(function(image) {
      var date = ee.Date(image.get('system:time_start'));
      var yearOffset = date.difference(ee.Date(start), 'year');
      var savi = image.expression(
        '(1 + L) * float(nir - red)/ (nir + red + L)', {
          'nir': image.select('B4'),
          'red': image.select('B3'),
          'L': 0.5
        });
      var mask = image.select(['cfmask']).neq((1, 2, 3, 4));
      return

      ee.Image(1).addBands(yearOffset).addBands(savi).toDouble().updateMask(mask);
    });

  print(col)
  // Convert to an array. Give the axes names for more readable code.
  var array = col.toArray();
  var imageAxis = 0;
  var bandAxis = 1;

  // Slice off the year and ndvi, and solve for the coefficients.
  var x = array.arraySlice(bandAxis, 0, 2);
  var y = array.arraySlice(bandAxis, 2);
  var fit = x.matrixSolve(y);

  // Get the coefficient for the year, effectively the slope of the long-term
  // NDVI trend.
  var slope = fit.arrayGet([1, 0]).clip(region);

  Map.addLayer(slope);

  // Export the image, specifying scale and region.
  Export.image.toDrive({
    image: slope,
    description: 'SAVI_slope_jan',
    scale: 30,
    maxPixels: 1e9,
    region: table
  });

Im using my own collection (images from LE7_SR and LT5_SR) and my own geometry (table).
I can map the result (slope) but I cannot download and if I try with a normal collection (ee.ImageCollection) I can. Does anyone know why I cannot download the image from my own collection?


texts: I am looking to check how up-to-date a feature class is by using our latest parcel update.  I am wanting to check "owner" field with "Owner_1"...I am using field calculator to grab the last name in "owner" and find the same name in "Owner_1" regardless of capilization issues then to return 0 if the same and 1 if different in field "NAME_CHK".... I have attached a pic of what I am dealing with...the fields are not well kept so many issues!


texts: Analysis method for Vegetation category change

texts:
I have a data set showing vegetation change over a 100 year period. The data is categorical (ie. Conifer, Deciduous, Mixedwood, Grassland, Shrub, Open Canopy forest, non vegetated). Each cell in my data set represents a hectare. The data is discontinuous (I can only see 59% of the actual landscape, as some parts are hidden from view), and there is no data source to fill the holes.

I can account for all of the landscape change that is reversed succession (ie. anything that went from Coniferous to grassland) with ancillary data about known disturbances (fire, development, roads etc). I now want to understand what has driven the forward succession of some key transitions (ie. areas that were grassland in 1909 may now be Conifer, or Deciduous, etc). I have topographic data, solar insolation, natural subregions as predictors.

I am currently stuck trying to understand what analysis method I can use to model this relationship
(ie. For Vegetation = Grassland in 1909, and for Vegetation = more advanced than grassland in 2008, what are the driving forces and correlates).

I am seeking ideas for analysis methods...
 preferably ArcGIS, but I can dig into other software if necessary


texts: Where has the 'distance matrix' tool gone in QGIS 2.18.0?

texts: Today I installed QGIS 2.18.0 and I wondered, where has my 'distance matrix' - Tool gone?


texts: Can a computer with ArcGIS Server connect to SQL Express in a different domain?

texts:
As you can see in my diagram, we have ArcGIS set up with 2 other computers for load balancing. We also have SQL Express 2008 but it's under a different domain. My manager's goal was to a) register data on the AGS which is stored in SQLE2008; b) have the other work computers also be able to see the registered data; c) copy data stored in SQLE2008 to the main AGS when publishing (when not registering the data, obviously!)

I know it's all easy enough to do when the SQLE2008 is in the same domain but I'm a bit lost now with these new goals. Is what we're after even possible?


texts: Do I need the standalone GRASS app if I have the GRASS Plugin and Processing toolbox enabled in QGIS?

texts:
What processing abilities does the standalone GRASS GIS application have that aren't available in the QGIS GRASS plugin/toolbox?

I'm trying to understand whether you would need/want the standalone at all if using the GRASS plugin/processing modules in QGIS. I am using QGIS 3.4.3 on Mac OS Sierra.


texts: Packaging Python script for end user to run

texts:
I have a Python script that I have made to some basic data management tasks.  I want to package up a Python script in a nice user friendly way for an end user to run, they do not know how to run Python scripts and I need them to input some parameters in an easy way i.e. say a filename.

What is the best way to do this?


texts: Formula to determine polygon points of a bounding box created from this equation

texts:
I have a series of points making a linestring
I am trying to detect when a user is within a few meters of any section on the linestring with a tolerance factor
For this, I use this java code (unsure of terminology for this equation, will update question when I know )
The code tests if point (x3,y3) falls (roughly) within the line between the two points

    public Boolean isBetween(Location a1, Location b2, Location c3, Double tolerance) {
    Double x1, y1, x2, y2, x3, y3;
    //tolerance = 000000010; <= provides about 20m tolerance
    x1 = a1.getLongitude(); // bounding point
    y1 = (a1.getLatitude());
    x2 = b2.getLongitude();//bounding point
    y2 = b2.getLatitude();

    x3 = c3.getLongitude(); //test this point
    y3 = (c3.getLatitude());

    Double px = x2 - x1;
    double py = y2 - y1;
    float norm = (float) (px * px + py * py);
    Double u = ((x3 - x1) * px + (y3 - y1) * py) / norm;

    if (u > 1) {
        u = (double) 1;
    } else if (u < 0) {
        u = (double) 0;
    }

    Double x = x1 + u * px;
    Double y = y1 + u * py;

    Double dx = x - x3;
    Double dy = y - y3;

    Double dist = Math.pow(((dx * dx + dy * dy) * (dx * dx + dy * dy)), .5);
    //Log.d("dbug", "distance= " + dist);
    if (dist < tol) {
        //Log.d("dbug", "is within points= True");
        return true;
    }
    // Log.d("dbug", "is not within points");
    return false;

} //end isbetween

This returns a true/false if the point is within a tolerance of the line (usually 10~20m)
What I need is the effective bounding box coordinates,
Of course creating a bounding box by adding and substracting decimals to the latitude and longitude is ineffective, because the shape changes dramatically as the bearing of the points moves away from north/south to east west and the tolerance is very broad in the middle of the two points

The database that I'm forced to use elsewhere only has isPointWithingPolygon so I need to be able to provide such rectangle.
What formula should I use to determine such points?


texts:
I am using ArcGIS for Desktop 10.1 and Server 10.1 on my machine Windows 7.

I am newbie in python &  running simple python script for UniqueValuesSymbology it running fine if I use mxd as “current” but if I update with full mxd path then it’s not updating the layers symbology and did not show any error.

JSFiddle code 1 (using mxd path as current)

import arcpy
mxd = arcpy.mapping.MapDocument("current")
lyr = arcpy.mapping.ListLayers(mxd, "Population")[0]
if lyr.symbologyType == "UNIQUE_VALUES":
  lyr.symbology.valueField = "SUB_REGION"
  lyr.symbology.addAllValues()
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
del mxd

JSFiddle code 2  (using complete mxd path )

import arcpy
mxd = arcpy.mapping.MapDocument("D:\\ArcGIS_Data\\data\\y1.mxd")
lyr = arcpy.mapping.ListLayers(mxd, "Population")[0]
if lyr.symbologyType == "UNIQUE_VALUES":
  lyr.symbology.valueField = "SUB_REGION"
  lyr.symbology.addAllValues()
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
del mxd

I researched on Google, web help and ArcPy syntax for mxd_path still not getting any clue & Python path is perfect in environmental variables

The reason of using mxd path is that I want to make this script automatic using windows scheduler.


texts: Clustering the WGS84 point features (projection transformation aspects)

texts:
My question is quite trivial and was discussed many times before (like here) but in our case it has the confounding extra requirements...

The list of sparsely  distributed 2d point features is stored in Postgis table. The points are described with the pair of (lat, lon) geographical coordinates (WGS84, srid=4326). This data is passed through the Django ORM to the clustering software in order to determine the locations with high density of points. And it seems that this software (yet not chosen, but obviously it should be scipy or scikit-learn) consumes only pure data (but not a distance matrix).

Thus that's a problem, 'cause in our case

we are required to limit the cluster diameter with a given amount of metric units (for instance, less than 10 kilometres) while our data contains the WGS84 geographical units only;
it's impossible to project our WGS84 data to any of zonal UTM projection, since the data is widespread distributed all over the hemisphere (and there is no "global" UTM projection for all I know).

Now I'm looking for the approach which could meet the mentioned requirements and could produce the clusters with a desired features (see #1) for a given WGS84 data.


texts: How I can set appropriate configuration for each WMTS layer with EPSG:4326 (automatically in openLayers v6)?

texts:
When I want to add my WMTS layer via this method (how to manually create the configuration for accessing a WMTS.) in OpenLayers sometimes I get 400 (Bad Request) error from GeoServer 2.18.0 and sometimes it work's fine without error!,This is becasue extent, In same area I must change extent manually for each layer! each time I will add,I found out OpenLayers can get correct and appropriate configuration for each layer dynamically via GetCapablities response this link and then I changed my code based on OpenLayers document, but I don't know why I still get this 400 (bad request) error? How I can get correct configuaration and extent coordinate for each WMTS layer automatically?
    var parser = new ol.format.WMTSCapabilities();
    var url = 'http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetCapabilities';

    fetch('http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetCapabilities',{
         method: 'GET', // *GET, POST, PUT, DELETE, etc.
            mode: 'cors', // no-cors, *cors, same-origin
            cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
            credentials: 'same-origin', // include, *same-origin, omit

      headers: {
          'Authorization': 'Basic ' +btoa(`${geoUserName}:${geoPass}`),
            'Content-Type':'text/html',
            'Access-Control-Allow-Origin': '*',

        },

    }).then(function(response) {
      return response.text();
    }).then(function(data) {
      var result = parser.read(data);
      var options = ol.source.WMTS.optionsFromCapabilities(result, {
        layer: `${geoServerWs}:${layers_}`, //`${geoServerWs}:${layers_}`
        matrixSet: 'EPSG:4326',

      });

       console.log('options', options);
         var wmtsLayers=[
        new ol.layer.Tile({

           source: new ol.source.WMTS(options),
           opacity: 1,

        })
      ];
})

this is my WMTS getcapabilities response
SysInfo:Debian 10 x64,OpenLayers V6, GeoServer 2.18.0


texts:
I have been given some utility plant maps for a project my company is working on but they don't come with a projection listed (they are in PDF format, but I will strip them down, make them transparent, probably change to png or tiff.). I'd like to add them as a raster layer in QGIS 3.4 for reference and planning, but I am running into some problems.

I have tried using the georeferencer and cannot get any of the methods to work without grossly distorting the maps, or not giving me accurate enough results.

What I would like to do is:
1. Find out what projection these maps are in.
2. Set my project crs to the same.
3. Import the rasters (undistorted).
4. Set my project CRS back to what I am typically using.

Is there a good method for doing this?
Because of the source of these files, I am presuming that they are in an actual projection, however, they may have been intentionally skewed.

Project CRS is EPSG:104199

Sample map to import:

EDIT: Added more images.

Linear Input

Linear Output

Polynomial 3 Input

Polynomial 3 output


texts:
I am currently building a housing complex mapping in my regency with PHP, Leaflet.draw and MySQL to store the data.
My problem is, how to save the polygon coordinates into MySQL?
I am extremely new to GIS and I hope the answers is not too confusing.


texts: Determining Highest Position in QGIS for raster stacks with 10+ images?

texts:
I want to follow up on this question from last year

Emulating ArcGIS Highest Position tool in QGIS?

Here the question is if QGIS has a tool like the "highest position" tool in ArcGIS, where, in a layer stack, the tool will return the position or index value of the raster with the highest value for each cell. For example, if the third raster in a 10 raster stack has the highest value for a particular cell, than that cell will have the value 3.

The solution in the above question, rather elegantly, uses the Raster calculator. However, if you're trying to find the highest position for all cells in a layer stack with 10 or more images, this particular solution becomes difficult. Is there any other solution to this in QGIS that can be used for raster stacks with 10+ images?

I found a solution using R, and wanted to report that, but would like the question to stay open, because I think it is important to see if there is a solution to this using QGIS.

Anyway, through some web-searching, I found this email thread on an R site, asking more or less the same question as I did.

https://stat.ethz.ch/pipermail/r-sig-geo/2013-October/019572.html

It looks like the author of the R raster package (among others) offered insights here. So, anyway, using the Raster package on R (and Rgdal), the following code, which I have appropriated directly from the link above, worked for my purposes:

The following code, using "stackApply", produced a max value composite of the layer stack, with the number of "1's" in the "indices" corresponding to the number of layers in the stack.

max_NDVI <- stackApply(raster_data, indices=c(1,1,1,1,1),max)

The following code produced an index of max values, such that the pixel value = the number of the layer in which the max value occurred for that pixel in the layer stack. You have to create a function using "which.max".

miwhichmax <- function(x,na.rm=TRUE) which.max(x)

index_max <- stackApply(raster_data,indices=c(1,1,1,1,1),miwhichmax)

As I said, this suited my purposes, but I'm not sure how good this approach would be for someone who has a truly large layer stack, for example if you're trying to index daily MODIS data.


texts: Changing bad coordinates of GeoJSON shape to coordinates of another GeoJSON shape?

texts:
I have two GeoJSON file one with true coordinates, one with wrong coordinates with labels. They both refer to the same geographical object: districts in Georgia. I would like to convert the coordinates of the second one to the coordinates of the first one so I can plot the labels on a web-based mapping tool.

I plotted them on QGis. The good GeoJSON file is the green one. As one can see on the bottom right-hand corner the coordinates are crazy.

How to make the coordinates of the red shape to match the coordinates of the green?
Is there a tool on QGis to change the coordinates of a shape to match the one of another?

Both files are available here if you have any other ideas.

Here is an excerpt of the file with the wrong coordinates (red):

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              4854546.154083,
              5284008.666675
            ],
            [
              4855951.745246,
              5283252.476637
            ],
            ...
            [
              4854546.154083,
              5284008.666675
            ]
          ]
        ]
      },
      "properties": {
        "id": 69898,
        "parent_id": null,
        "common_id": "Georgia",
        "common_name": "Georgia",
        "has_children": true,
        "shape_type_id": 1,
        "shape_type_name": "Country",
        "value": "No Data",
        "color": null,
        "title_location": "Country: Georgia"
      }
    }
  ]
}

One can see the crazy longitudes and latitudes.

Here is an excerpt of the file with the good coordinates :

{
  "type": "FeatureCollection",
  "name": "georgia",
  "crs": {
    "type": "name",
    "properties": {
      "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
    }
  },
  "features": [
    {
      "type": "Feature",
      "properties": {
        "GID_0": "GEO",
        "NAME_0": "Georgia"
      },
      "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                41.73014069,
                42.07485962
              ],
              [
                41.73014069,
                42.07458496
              ],
              ...
              [
                45.78749466,
                41.23017502
              ],
              [
                45.7786026,
                41.23553848
              ]
            ]
          ]
        ]
      }
    }
  ]
}


texts: What are the standard values of the GPSMAPDATUM attribute in the exif standard?

texts:
I'm working on an application to read the exif georeferenced metadata of some photos.
I would like to know all the possible values of the attribute GPSMapDAtum. Do you know where to find a list with all the standard values?


texts: Joining lines by X,Y and Z coordinates for TerraExplorer using FME?

texts:
My task is to generate 3D polygons from line data, which will then be imported into TerraExplorer 3D presentation software. Problems arise when there are overlapping lines in 2D space, but which have different Z values.

I am primarily using GeoMedia, but I also have access to FME.

The line features are divided into four categories: 'Roof edge', 'Building line' (generalised), 'Top of sloping roof', 'Roof edge inside the building body' and 'Bottom of roof edge inside building body'. (This is data from Norway, by the way. The names are way snappier in norwegian.)

The first three are easy to polygonize. But to ensure the 3D polygon is correct with sloping roofs, I need to make the lines join to each other based not only on X and Y coordinates, but also on Z value.

This is the starting situation. The red, purple and orange lines are 'Roof edge', 'Building line' and 'Top of sloping roof'

Green is 'Roof edge inside building body' and underneath it is 'Bottom of roof edge inside building body'. The labels are the Z values for each nodepoint in the lines.

I need to make sure that 'Roof edge' connects to either 'Roof edge IBB' or 'Bottom of roof edge IBB' based on which of those it has the same Z value as.

This is what happens when I generate polygons from all available lines in GeoMedia. It extracts the Z value from the top or bottom line seemingly at random. I could do this manually and select only the relevant line for the polygon part, but that is not an option when I'm supposed to generate 3D buildings for a medium sized city.

I'm not sure GeoMedia will help me any further in this process.

Can FME help with 3D object generating from 3D lines and snapping to 2D-equal 3D lines?

I am not Python fluent.


texts: Export PostGIS line to AutoCAD with graphical direction information

texts:
Some time ago I managed to export from PostgreSQL to AutoCAD DXF format a line (LINESTRING) using ogr2ogr program with a PostgreSQL Query, and it works (I can visualise it by the QuantumGIS).

Now I really need to, in some way, export graphical information about the direction of that line, like little arrows on the line.

First I tried with the OGR Style Feature "Symbol", trying to include a query field OGR_STYLE with the content similar to SYMBOL(c:#00FF00,id:"points.sym-45,ogr-sym-7",a:X.xx). But I realised that the DXF driver does not understand and draw this features.

So then I changed radically my idea and now I am trying to export, apart from the line, another DXF file with little triangle polygons simulating the direction of the line, the little arrows.

First I get all the points of the line by PostGIS ST_DumpPoints function
Then I get every point with its next point with WINDOW PostgreSQL method.
Then I get the direction from the point to its next point by PostGIS ST_Azimuth function
And finally, to draw the little arrow triangle polygon, I need to get the 2 other points from the final one of the pair, locating them to X distance back from the original, with the direction obtained multiplied to -1 and +X and -X (respectively for each of the 2 new points).
Then I would be able to make the little triangles with that 3 points by PostGIS ST_MakePolygon function

Here it is the idea of Query that I would use with the ogr2ogr command  -sql parameter, like ogr2ogr -f DXF line_directions.dxf "PG:host=192.168.1.* user=**** password=**** dbname=****" -sql "THE QUERY"

SELECT ST_MakePolygon(ST_MakeLine(ARRAY[point1, point2, point3])) AS the_geom
FROM (
    SELECT *, next_point AS point1, ST_Project(next_point, 10, ((orientation + 1) * (-1))) AS point2, ST_Project(next_point, 10, ((orientation - 1) * (-1))) AS point3
    FROM (
        SELECT *, ST_Distance(point, next_point) AS distance, ST_Azimuth(point, next_point) AS orientation
        FROM (
            SELECT geom_id, path[1] AS path, geom AS point, lead(geom) OVER (PARTITION BY geom_id ORDER BY path ASC) AS next_point
            FROM (
                SELECT a.geom_id, (ST_DumpPoints(a.geom)).*
                FROM (
                    SELECT id AS geom_id, line AS geom
                    FROM my_lines_table
                    WHERE line IS NOT NULL
                ) AS a
            ) b
            ORDER BY path ASC
        ) c
        WHERE next_point IS NOT NULL
    ) d
) e;

I know that in PostGIS 2.0 there is the ST_Project function that would help me to do it but I am working with the PostGIS 1.5.3 and I can't upgrade it.

Any help?


texts: Creating a shapefile within a zip file with Fiona

texts:
According to the Fiona documentation "Fiona lets you read and write zipped Shapefiles."

But I can't find any examples of writing (with Windows file paths). Trying this...

with fiona.open('output_shp.shp', 'w', 'ESRI Shapefile', schema, vfs='zip://output.zip') as o:
    # Write

DriverError: /vsizip/output.zip/output.shp is not a directory.


texts:
I created web map with qgis2web. Everything works fine but for all my attributes which are integer, the map shows the value "NULL".
What can I do?


texts: QGIS Routing between two Points without Roads

texts:
I'm using QGIS 1.8 and i need to analyze possible routes for roman roads. Is there a Possibility to show routes which comply special criteria, e.g. straightest way between two points, or path which is not higher than 50m...
Since i search for possible roman roads, there are no streets with which QGIS can work. My idea is, it should analyze the map by my own criteria to find the routes. Is there any Plugin or function to do that?


texts:
I have one single layer that consists of different polygons. In the attribute table all the polygons are summarized in one feature (see picture for both).

I am looking for a way to split up the polygons and to create for every closed polygone a new feature (in the next step i want to calculate the area and remove the small dots you can see in the picture to clean it up). Its like the opposite of dissolve.
It should look something like this:


texts: How to perform spatial queries on polygons in mongodb?

texts:
I will build a GIS system based on polygons, not just points.
I wanted to use mongodb or postgis.

how do this in mongodb?

Query A - get the center of a polygon

Query B - distance between two polygons

Query C - list of polygons that are part of a third that I specify

Query D - near distance of the polygon

support SRID?


texts: Minimum hardware requirements of server for host ArcGIS Server / QGIS / GeoServer?

texts:
I want to buy server on (Hetzner or other) for host the OpenLayers map on site. Well, I do not understand what the performance should be the server. I know that it depends on many factors (size, format, cache and etc), but how can I calculate it? For example.

20 GB data TIFF, cache 3GB png

And what other factors should I consider?

I think the use of a ArcGIS server, QGIS or other doesn't matter.
Thanks


texts: How to re-project the EASE (Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?

texts:
I have nc files. from the metadata ,the projection is cylindrical and the resolution is 25 km:

           indrical
                 NC_GLOBAL#ease_resolution=25
                 NC_GLOBAL#history=none
                 NC_GLOBAL#institution=SMOS CATDS Processing Chain
                 NC_GLOBAL#netcdf_version_id=3.6.2
                 NC_GLOBAL#product_version=1.0
                 NC_GLOBAL#references=DDI CATDS - Ref. CAT-DDI-CT-00020-CG
                 NC_GLOBAL#source=CATDS L3 SM Filtrering Processor
             NC_GLOBAL#title=L3-SM P11p : Preliminary Daily Retrieval Map
                               Corner Coordinates:
                    Upper Left  (    0.0,    0.0)
                    Lower Left  (    0.0,  586.0)
                    Upper Right ( 1383.0,    0.0)
                    Lower Right ( 1383.0,  586.0)
                    Center      (  691.5,  293.0)

I want to reproject it to WGS84 with a resolution of 0.25 * 0.25 degree. I used this code:

                    import os
              for doy in range(1,367):
inputFile='D:\\358\\2010SMOSl3_sm'+str(doy)+'.nc'
inputDataset='NETCDF:\"'+inputFile+'\":Soil_Moisture'
    gdalcmd='gdalwarp -of "ENVI" -ot Float32  -srcnodata -32768 -dstnodata -9999   -te -180 -90 180 90 -overwrite  '+inputDataset+' '+outputFile
     os.system( gdalcmd)

but I got an error:


texts: How to intersect two polygon-layers in PostgreSQL/PostGIS?

texts:
EDIT:

according to the instructions given by @raphael I created a new, smaller test-set. the old, obsolete original question is now at the bottom of this post

1) Imported two shapefiles into postgresql/postgis:

layer1 with 39 polygons

layer2 with 79 polygons

I used the pgadminIII plugin for the import of the shapefiles. Option is enabled for automatically generating a spatial index.

2) ran

analyze layer1;
analyze layer2;

3) ran

select *,ST_IsValidReason(geom)  from layer1
where ST_IsValid(geom) = false;
select *,ST_IsValidReason(geom)  from layer2
where ST_IsValid(geom) = false;

both layers are valid!

now I have 2 tables with spatialtype MultiPolygon in the database

see screenshot2:
layer1 = blue
layer2 = yellow

4) now ran

create table layer3
as
SELECT layer1.id, layer1.bev,
       ST_COLLECT(ST_INTERSECTION(layer1.geom, layer2.geom))
FROM layer1, layer2
WHERE ST_Intersects(layer1.geom, layer2.geom)
GROUP BY layer1.id,layer1.bev;

5) ran

select sum(bev) from layer1;

returns 56462

and

select sum(bev) from layer3;

also returns 56462

select count(*) from layer3;

returns 39

so all seems ok

but when I import layer3 into qgis I only have 27 polygons !!
(see screenshot 3)

6) ran

select *,ST_IsValidReason(st_collect)  from layer3
where ST_IsValid(st_collect) = false;

delivers no invalid rows !!!

and

select count(st_collect) from layer3;

delivers 39

so what I am doing wrong?

edit2:

the following seems to work:

create table layer4
as
SELECT layer1.id, layer1.bev,
      st_union(ST_INTERSECTION(layer1.geom, layer2.geom))
FROM layer1, layer2
WHERE ST_Intersects(layer1.geom, layer2.geom)
GROUP BY layer1.id,layer1.bev;

but I must confirm, that I dont really understand why  ..., a simple explanation for a mere mortal ??

old, now obsolete original question:
I have 2 layers:

layer #1 named burgenlandzsp has 382 polygons (= red in screenshot)

layer #2 named siedlungsraum_singleparts_burgenland has 897 polygons (= green in screenshot)

Problem: I need to create a new layer which contains only the parts of layer#1 which intersect with layer #2.

I tried to do this in PostGIS with the following command:

create table bglsiedlungsraum as
select
   burgenlandzsp.id,burgenlandzsp.name,burgenlandzsp.zsp,
   burgenlandzsp.bev,
   ST_intersection(burgenlandzsp.geom,
                   siedlungsraum_singleparts_burgenland.geom) as geom
from burgenlandzsp,siedlungsraum_singleparts_burgenland
where ST_intersects(burgenlandzsp.geom,
                    siedlungsraum_singleparts_burgenland.geom);

I expected to get a new table(layer) with a multigeometry of 382 multipolygons, but it did not work

after about one hour this query "crashed" my hp-laptop (6mb ram, win10 64 bit, 4 cores @1,6 GHz)


texts: How to handle geometry change in vector layer?

texts:
I'm building a plugin in Python that manage some lists of WKT from different intern sources (web services, bd, etc..). I can display every source without any problem.

For displaying them, I use a QVectorLayer of type "memory" (in QGIS 1.7.4 by the way).

I would like the user to be able to edit a feature (the geometry) when it's possible, and I would change the value according to the source.

So I was very interested by:

void QgsVectorLayer::geometryChanged(QgsFeatureId fid, QgsGeometry &geom)

Doc is here

But when I write this:

layer.geometryChanged.connect(self._geometryChanged)
[...]
@QtCore.pyqtSlot()
def _geometryChanged(self, fid, geom):
    [...]

I've got this error:

AttributeError: 'QgsVectorLayer' object has no attribute 'geometryChanged'

Any idea How I could do it?

Is there any better documentation about inner elements in QGIS?


texts: Has anyone successfully used Generate Near Table to create a table of distances between all polygons in a layer?

texts:
I'm trying to find the shortest edge-to-edge distance between polygons in a layer. An example is a table of the distances from county to county in a state. I'm attempting to use the generate near table tool. I set the proximity to 0 and made sure to de-select only the nearest neighbor. It runs for a few hrs, but when its finished, the ouput only returns the distance of the 1 nearest neighbor, which is 0 because they are touching each other. Any help would be much appreciated!

-Kevin


texts: How can I release the lock file on a DBF after removing its join to a FeatureLayer using ArcObjects?

texts:
I found another post with two different answers on how to remove the join between a feature layer and a standalone table, but neither method successfully removes the lock file (filename.dbf.COMPUTERNAME.####.####.sr.lock) as viewed in Windows explorer. I'm testing this by creating the join in ArcMap via right-clicking on a feature layer and creating a join through the Joins and Relates context menu item. The join is between a feature class in a personal and/or file geodatabase and a DBF table (not a shapefile). The DBF table is not loaded in the TOC.

Actually, Kirk's method may work but as it's written it produces an exception, and when "fixed" it (RemoveJoins1 below) the code runs but the join remains (and consequently the lock also remains). The other answer (RemoveJoins2 below) that uses IDisplayRelationshipClass successfully removes the join, but the lock file still remains.

Additional info: if I remove the join using the Joins and Relates context menu item and don't remove it using ArcObjects, then the lock file is released. So something in the code sample is causing ArcMap to keep the lock file even though the join is removed.

Any ideas how the lock file can be removed/released?

Public Sub RemoveJoins1(ByVal joinedLayer As IFeatureLayer)
    Dim dTable As IDisplayTable = CType(joinedLayer, IDisplayTable)
    Dim rqTable As IRelQueryTable = TryCast(dTable.DisplayTable, IRelQueryTable)
    If Not rqTable Is Nothing Then
        Debug.Print("source: {0}", CType(rqTable.SourceTable, IDataset).Name)
        Debug.Print("dest: {0}", CType(rqTable.DestinationTable, IDataset).Name)
        joinedLayer.FeatureClass = CType(rqTable.SourceTable, IFeatureClass)
    Else
        Debug.Print("there are no joins")
    End If
End Sub

Public Sub RemoveJoins2(ByVal joinedLayer As IFeatureLayer)
    Dim dTable As IDisplayTable = CType(joinedLayer, IDisplayTable)
    Dim rqTable As IRelQueryTable = TryCast(dTable.DisplayTable, IRelQueryTable)
    If Not rqTable Is Nothing Then
        Debug.Print("source: {0}", CType(rqTable.SourceTable, IDataset).Name)
        Debug.Print("dest: {0}", CType(rqTable.DestinationTable, IDataset).Name)

        Dim drClass As IDisplayRelationshipClass = CType(joinedLayer, IDisplayRelationshipClass)
        Dim rqTableInfo As IRelQueryTableInfo = CType(rqTable, IRelQueryTableInfo)
        drClass.DisplayRelationshipClass(Nothing, esriJoinType.esriLeftInnerJoin)
    Else
        Debug.Print("there are no joins")
    End If
End Sub


texts: QGIS Filtering Multiple Values using Query Builder

texts:
In the "Query Builder" I can currently filter on value from the "Values List", but I'd like to be able to filter for multiple values at once.

How can I go about doing this using the SQL and "Operator's Section"?


texts: Running total of line length while drawing in ArcGIS for Desktop

texts:
Is there a way to display the running total length of a line while editing and drawing a new line in ArcGIS for desktop?

I have a pdf with hand drawn lines representing hedgerows and the total length that each should be. These are not straight so using CTL + L to create a straight line segment doesn't quite cut it. I just want to see a running total while drawing the line, is it possible?


texts: Does anyone knows if there is a Right angled triangle symbol into ArcMap standard symbology? I've found only isosceles triangles.


texts: Label is appearing two times for some areas. How i can solve the problem, label should be shown one time for one area

texts: I am working with ArcGIS. In some areas of the map labels are shown twice or three times for the same name and the same area. I want to have one single label for each area.


texts: Proj4js: Is this correct implementation of Azimuthal Equidistant relative to an arbitrary center?

texts:
If I wanted to interpolate points along a Great Circle Arc, it makes sense that either endpoint of the Great Circle is a satisfactory starting place. Next, I suppose I'll need a projection to preserve distances along the Great Circle. Unless someone corrects me, I think an Azimuthal Equidistant projection centered on either endpoint of the Great Circle would work.

From Wikipedia, with respect to an Azimuthal Equidistant projection "all points on the map are at proportionately correct distances from the center point", and additionally, it's "useful for showing airline distances from [the] center point of projection".

I suspect I can implement the Azimuthal Equidistant in Proj4js, but I've never really customized a projection before, so basically I'm just curious whether I'm doing it properly..

Now if I go to SpatialReference.org and search for Azimuthal Equidistant, I see both north and south pole-centered customizations of the projection. Respectively, they're implemented in Proj4js like so:

North Pole Azimuthal Equidistant:

Proj4js.defs["ESRI:102016"] = "+proj=aeqd +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";

South Pole Azimuthal Equidistant:

Proj4js.defs["ESRI:102019"] = "+proj=aeqd +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";

It follows that the only value changing in either projection is the latitude, itself, +lat_0=, which changes from 90 to -90. So I'm pretty sure I just need to set these +lat_0 and +lon_0 appropriately, and bingo--the Azimuthal Equidistant is properly defined.

So with all of this said..

Is this a valid way to define an Azimuthal Equidistant projection relative to a specific place, like Columbia, South Carolina? (Lon: -81.020742, Lat: 34.008654)

Proj4js.defs["CUSTOM:10001"] = "+proj=aeqd +lat_0=34.008654 +lon_0=-81.020742 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs";

I hate to ask such a Yes or No question, so please note the additional opportunity to remark on whether this is a wise choice of projection considering the scenario (interpolating points at fixed distances along a Great Circle Arc).


texts: Publishing Geoprocessing Service to ArcGIS Online

texts:
I have set up a one Organization site in the ArcGIS.com, where I have published my data and also consumed data from ArcGIS Online.
I have a workflow that creates a buffer from a point feature class, and now I want to publish my workflow as a geoprocessing service in ArcGIS Online.
How can I publish to ArcGIS Online and share to other users so that they can consume this geoprocessing service?


texts:
I have a dataset that consists of 247 mosquito traps placed in fixed positions and sampled weekly for 23 weeks. I also have dengue disease incidence data (indexed to home address) during the same time period. I would like to see if there is a spatial and spatiotemporal correlation between mosquito catch rate at each trap location and dengue case incidence. I have already tried Global Moran's I and Local Moran's I in R and SaTScan Multivariate space-time permutation. None of these seem to give me what I want. Am I looking at the right place and just doing it wrong or are there better analyses I can run?

Thank you so much for the advice!!
Best,
Amy Green


texts:
I need to connect to an Access Databse so have found the instructions to Add OLE DB Connection but when I go to Customize - Customize Mode there is no option to select ArcCatalog under Commands.

Can anyone help?


texts: vectortiles: change style of basemap instead of data

texts:
I'm using Mapbox-GL-Leaflet bindings on Leaflet to style my vector tiles. I'd now allow the user to switch a style using Leaflet control.

The easiest way would be to use LayerControl for this. Since the basemap is always the same data, just the style changes. But this change of basemaps would remove the old data and reload the same data. I don't know if you can detect this change (plus the delay of Mapbox-GL-Leaflet) on slower systems.

Is there a way to make the LayerControl not reload the data, but just change the style?


texts: Qgis server on Ubuntu Server 14.04: Permission denied

texts:
I'm trying to install and configure Qgis Server (2.0.1) on a virtual server with ubuntu 14.04, Apache 2.4.7.
After trying to install normally, the server gave me 404 error, so I tried to add configuration to /etc/apache2/sites-available/000-default.conf following different code snippets, but each try result in a 403 error (permission denied), testing for example an url like "/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&REQUEST=GetCapabilities"
What are the correct steps to configure Qgis?


texts:
my layer is point, and the symbol are "ellipse" with categorized renderer.
So I define rotation in data defined properties but the tool «rotate» still inactive (rotation data works in QGIS 2.8).

Where the rotation properties must be defined : in the "MARKER» level or in "SYMBOL" level or the both ?

With the 10 symbols, I must make 10 times the same operations (in marker or in symbol level)?

The rotation is no longer in advanced menu, maybe in the over menu (and I can't see it) ?


texts:
I work on a map with rotate data frame. When I create the legend, the symbol line in the layers on the legend are angle to different directions than the layers in the map:

I try to find a way (automatically) to straight the symbol lines in the legend items as it in the map. I don't want to use the option of turn the legend to graphic elements, and then to angle the line of the symbol items to the same direction as the layers.

For clarity, this question as been asked in GeoNet, but I didn't got suitable answer.


texts: Update geometry in ArcGIS Relationship class between point and lines

texts:
I have set up two relationship classes with a pipe (storm_pipe) and its structures (storm_struc). Each pipe has a from_struc_id and a to_struc_id, both of which point to a id in the storm_struc layer.

I'm wondering how to set up ArcMap editing so that if I move a storm_pipe endpoint, the related endpoint moves with it. Also the same in reverse, if I move a storm_struc, the related pipe endpoint would also move.

A couple of notes, I don't have access to the network analyst extension so I don't believe I can utilize geometric networks. I only have access to a Standard ArcGIS Desktop license.