texts: Edit default version table view using SQL Server

texts:
I have a ArcSDE (10.3) geodatabase setup which is versioned as we have a few people working concurrently on the data.
However, I want to run some background scripts in SQL Server to update the default version when no one is actually working on the data.

Anyway, the data I will be editing is actually a feature class. I'm not making any geometry changes, but just changing a few attribute values.
However, this attribute change is based on a join to another SDE table residing inside the same database.

ESRI states that changes made from SQL Server must be made to the the table VIEW rather than the actual base table.
However, when I execute my script, I'm given this error:

Msg 414, Level 16, State 1, Line 6
UPDATE is not allowed because the statement updates view "dbo.MyTable_evw" which participates in a join and has an INSTEAD OF UPDATE trigger.

How have other people have gotten around this issue?

Example of update statement that's throwing the above mentioned error.

BEGIN TRANSACTION
EXEC set_default

UPDATE [dbo].[MyFeatureClass_evw]
SET [dbo].[MyFeatureClass_evw].[Status] = [dbo].[MySDEDataTable].[Status_2],

FROM [dbo].[MyFeatureClass_evw] INNER JOIN
[dbo].[MySDEDataTable] ON [dbo].[MyFeatureClass_evw].[PrimaryKey] = [dbo].[MySDEDataTable].[PrimeKey]

COMMIT;

@MickyT's method works great. Also, it's worth mentioning that I also got the MERGE command to do this operation as well.

MERGE MyFeatureClass_evw as TargetTable
USING MySDEDataTable as SourceTable
ON TargetTable.PrimaryKey = SourceTable.PrimeKey
WHEN MATCHED THEN
  UPDATE SET TargetTable.Status = SourceTable.Status_2
;


texts: PostGIS- convert points to polygon based on multiple shared attributes

texts:
I have a PostgreSQL PostGIS point table (not multi-points). I want to convert the points to polygons (using convex-hull?) grouping the points by shared attributes from 2 columns.

In this example, 'alpha' and 'beta' are text from a VARCHAR 'column1' and the numbers are from an id integer type 'column2'.
What is the best way to go about this? Please keep in mind the final table I'll be working on is large (30 million points (100s of points making up each grouping), 6GB table size).


texts:
I am very new to the world of GIS and spatial statistics, but I have a very large dataset consisting of many points with geographic coordinates and a bunch of other variables for every point. I managed to read in this dataset as a SpatialPointsDataframe in R, with all the extra variables as data attributes, and do all kinds of fun stuff with it.

One of the things that I would like to do, but haven't been able to figure out how, is predict the latitude/longitude coordinates of a certain point based on the variables I have for that point.

If I wanted to predict just a one-dimensional variable, I could take for example 90% of the dataset, and then estimate the effect sizes of all the variables I have measured in a linear regression. Let's say I had three continuous variables, and fitted this model:

y = b1x1 + b2x2 + b3x3 + error

I now know the effect sizes (b1, b2, and b3) of the three continuous variables (x1, x2, x3), and can now use these to predict y for the remainig 10% of my datapoints, for which I have x1, x2, and x3 measured.

If I want y to be a geographic location, so a combination of longitude and latitude, how could I go about doing this?


texts: Filter by attribute to show only records with whole numbers

texts: Is there a way to show points that only contain whole numbers in a column (eg. 009, 010, 011 and NOT 9,1; 9,2; 9,3...) in ArcGIS 10?


texts:
Is it possible to change to a "higher-level" license after a license has already been checked out in ArcGIS Engine? Old posts in ESRI forums seem to indicate that this is not possible, but I'm wondering if 9.3 or 10 allows this.

We have an application that 99%+ is used for viewing GIS data, so the ArcGIS Engine Runtime license is appropriate. Every now and then, though some (not all) users need to be able to edit an arc or two and it would be extremely annoying and disruptive to their workflow to have to exit the application and fire it up again just to grab an ArcInfo license.


texts: how to buffer a raster cell using Visual Basic ArcObjects in ArcMap

texts:
I am new in visual basic, I have a question about creating a buffer zone based on a raster layer.

I have a raster layer named "Value_Raster", I have a textbox in the userform, I also create a tool button. In the mousemove event under this toolbutton, I want to create a buffer area that the origin is the raster cell value when I move my cursor on the cell, the buffer area can be a square (or rectangular) shape , when the sum of the raster values in the buffer zone is equal to the textbox value in the userform, the buffer will stop. finally the sum of the buffered area is displayed in the msgbox.

please help me out! thanks a lot.

Emma


texts:
I am serving a custom vector map using Tileserver GL. Everything works as expected, but I just don't want to die dump. So... there is directory called (in my case) glyphs with subdirectories like e.g. Open Sans Bold. And in there are files 0-255.pbf, 256-511.pbf, ...
Can anybody tell me what those files are? So what e.g. does the 0-255 mean?
In my simple working brain, I'd say the map-renderer would need to have the font-files for that font, but why is it split into so many sub-files? I just don't really understand it :)
Would be great if somebody could shed light into this for me.
The background why I am asking. I have my custom offline-implementation, and it seems that my renderer (Mapbox-iOS) won't render certain areas, if it can't get those files. So I need to understand how to also make those offline-available :)


texts:
I have a very detailed vector map I want to export from QGIS (2.18.3) into Illustrator. Unfortunately, it's having some problems:

Print Composer > Save as SVG errors out, yielding an invalid SVG (and mangles the print composer as well, so I can't use it again for anything & have to make a new one). The error is "std::bad_alloc"
Print Composer > Save as PDF succeeds, but when I open the PDF in Illustrator a significant number of polygons are mangled (it looks ok in Mac Preview)
Print Composer > Print > Save as PDF (i.e. the system PDF generator) produces a smaller file than the QGIS save as PDF, but with similar mangled polygons.

Do I have any other feasible options for getting my lovely map out of QGIS in a vector format? Is there a way I can fix up my file in QGIS so its export functions do not crash?


texts: Geometry collections: sets or multisets?

texts:
In OGC, are collections of geometries equivalent to sets, or to multisets?

For example, is
((1.1, 1.1), (2.2, 2.2))
equivalent to or different from
((1.1, 1.1), (1.1, 1.1), (2.2, 2.2))?


texts: Calculating the spatial variance of well density?

texts:
I have wells as a point shapefile and have calculated the spatial density of these wells in 400+ basins (polygons) by dividing the number of wells in each basin (found by doing a spatial join) by the basin's area in acres.

However, I am stuck on trying to find a way to calculate the spatial variance of the well densities in each pbasin. The within-basin spatial variance is the variance of well density across each basin. In other words, how much does well density vary across each basin (polygon)? A basin with all wells placed exactly equi-distant from one another would have no spatial variance in well density, while a basin with 1,2,...,n clusters of wells that are all packed tightly together would have a high spatial variance. I am looking for an easy way to calculate this reliably.

I'm using ArcMap for Desktop 10.3.1


texts: What is causing data to be erased by adding a domain in ArcGIS 10.2.2 and ArcGIS Online?

texts:
I have spatial data in ArcGIS 10.2.2 that I'm sharing as a Service and then viewing in ArcGIS Online. The data consist of the first and last name of employees, separated by a single space, i.e. 'John Smith'. Last names have been omitted in the example screen
 capture below representing the successful display of the data.

I would like to add a domain to a pre-populated field that constrains input into this field. The problem is that when I add this domain in ArcMap 10.2.2 and then share the result as a Service and then view it as a Map, the data itself no longer displays in ArcGIS Online.

Below is an example of the domain constraints. I have made certian that each name already present in the database is represented in the domain definition, to ensure that the issue is not that pre-existing data are not allowed within the new domain.

And finally, here is the result in ArcGIS Online when the domain above is applied to the Field of employee names.

Why might this be happening and what can I do to solve it?

Edit:
To make this even more unnerving, I followed the advice of Adding a Field, setting the Domain, then populating via Field Calculator, and it still didn't work!


texts: Splitting polygon features at specific widths using ArcGIS for Desktop?

texts:
I have a group of islands and I need to divide them into different segments based on feature width at several locations. There are four values for width (50m, 100m, 200m, and 300m) which I need to take into account. My goal is to have coastline as separated features based on this, e.g. part of polygon inside which distance from outline to outline is between 0-50m, 51 - 100m etc. This all is related to calculating modified lengths for parts of coastline.

I assume there might be a built-in-solution for this, but I haven't been able to figure it out yet. I'm really looking for simple solution since it will anyway be hard to take different directions into account. Features could of course be polylines as well.

Below is a picture for better demonstration.

I'm currently employing ArcGIS advanced.


texts: Scale seems incorrect in QGIS 3.4.3 for Mac in the editing window

texts:
I've been working on a map for a few months now and decided to export it in Composer to see how it's rendering out elements like creek labels when I noticed the exported scale was vastly different than my working scale. I checked to make sure that I'm using the same projection for both the project and composer. I decided to open it up in QGIS 2.18 and the scale looked to be the same as in the composer.

So it seems that the editing window in 3.4.3 for Mac may be off. I'm almost wondering if it has to do with the retina update for QGIS. It seems like it's basically double the scale (i.e. 1:50,000 looks like 1:100,000) Does anyone else see this issue or is there something that I'm missing?

I'm currently using QGIS 3.4.3 on OSX 10.14.2. Couple of images below to show what I'm talking about. (Top from editor window and bottom from composer export.)


texts: Since I updated the "go2streetview" plugin it doesn't work anymore. I generated the API key as required but it reports that there are problems.


texts: Android application with multiple raster layers in offline mode

texts:
I would like to create an android application where we can view and control visibilities of various raster layers such as orthomosaic layer, DSM layer, contour map layer created from drone images of an area.

The application should support the following features

View high resolution map using orthophoto
Manage (show/hide) visibility of DSM,contour map layers.
Map rotation (for top view and perspective view)
Distance measurement
Elevation measurement using elevation layer

Can anyone please help me understand how this can be achieved in an android application? I have checked the QGIS desktop app and could see all these functionalities.

I am looking for an open source android library to render the high resolution image and perform the above mentioned functionalities. I have checked the https://github.com/moagrius/TileView sdk. But it don't support layer rotation.

Can anyone please suggest any android sdk to be used for the purpose?


texts:
I am following this direction to make network dataset from OSM data to use ArcGIS network analysis (by using osm2po and psql)(http://revenant.ca/www/postgis/workshop/loadingdata.html).
So far so good except errors in using 'psql'
Please see below message:

psql: FATAL: password authentication failed for user “postgres”

It asked to type password so I typed my password but it didn't work (also it didn't show my password. That is, the password what I typed is invisible).

Please let me know what the problem is.

Also, is there any way to load .sql data into postgreSQL by not using commond line?


texts: Selecting features by id in activeLayer if I have txt file?

texts:
An example my txt files line is 3,6,7.

How do I select features in activeLayer with this ID in PyQGIS?

layer = qgis.utils.iface.activeLayer()

query ='"ID" = 3 or "ID" = 6 or "ID" = 7'

selection = layer.getFeatures(QgsFeatureRequest().setFilterExpression(query))
layer.setSelectedFeatures([k.id() for k in selection])


texts: How does a LiDAR placed on a moving vehicle map the distances?

texts:
Please correct me if I'm wrong but LiDAR device shoots out multiple laser rays and maps the surroundings based on the time taken by the rays to reflect. But if the LiDAR is placed on a moving vehicle (in case of an Autonomous vehicle), the LiDAR is in linear motion, shooting out the rays continuously.

How do the rays get reflected back to the exact emitter when the whole device is in motion?


texts: Once route is solved, also return encountered barriers from ArcGIS Server Network Analysis?

texts:
I have came across an unexpected "issue" while working with the Esri JS API and ArcGIS Server Network Analysis service.

Once user submits the route solving task to the server, I'm appending the polylineBarriers to the RouteParameters. These polylines are pretty much the barriers affecting the route analysis. I'm also setting the "returnPolylineBarriers" to "true", in hope to get all the polylineBarriers that were encountered during the route solving task.

But I was fairly disappointed when I realized that this parameter just returns all the polyline barriers that I've submitted, even if these might be not obstructing the route at all.

My question is, is there any way I could get the array of all polyline barriers that affected the final solved path?


texts: Add a point to given pixels in Google Earth Engine

texts:
I applied Kmeans clustering on 2 images. I need apply buffer on a one of this Kmeans class. if added point
to this cluster pixels, i thought i can apply buffer. But i'm not sure which method perfect for me.


texts: OpenLayers feature Object array to localStorage

texts:
I'm trying to save an array consisting of multiple features via localStorage.

var featureArray=[];
map.on('click', function(evt) {
  if (feature) {
    featureArray.push(feature.values_);
  }
});

function saveFeatures() {
  localStorage.setItem('features', featureArray);
}
saveFeatures();

Via console console.log(featureArray); looks fine, but when I try to load them via localStorage.getItem('features') the output (after two clicks) is something like:

  [object Object],[object Object]

But I actually want the values behind this structure to be saved:

I tried JSON.stringify(featureArray) but that throws the error

  TypeError: Converting circular structure to JSON

What am I doing wrong?

UPDATE: https://jsfiddle.net/ytc26fju/3/ (hover over the dot, then save and then try loading with the buttons


texts:
I am attempting to add an ImageServer layer to my project (QGIS 3.4.2 22034aa070 on Windows 1803) using the following command:

qgis.utils.iface.addRasterLayer("https://gis.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_2_Meter_Image_Service/ImageServer", "Maine DEM")

I receive the following error:

Invalid Layer: GDAL provider Cannot open GDAL dataset https://gis.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_2_Meter_Image_Service/ImageServer: SSL certificate problem: unable to get local issuer certificate Raster layer Provider is not valid (provider: gdal, URI: https://gis.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_2_Meter_Image_Service/ImageServer

Based on this thread it seems to be a known issue only evident on Windows that was supposedly resolved 19 months ago.

I receive a similar error when running QGIS 2.18 on Ubuntu 18.04

Invalid Layer: GDAL provider Cannot open GDAL dataset https://gis.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_2_Meter_Image_Service/ImageServer: An error occurred while creating a virtual connection to the DAP server: Error while reading the URL: https://gis.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_2_Meter_Image_Service/ImageServer.ver. The OPeNDAP server returned the following message: Bad Request: Raster layer Provider is not valid (provider: gdal, URI: https://gis.maine.gov/arcgis/rest/services/Elevation/Maine_Elevation_DEM_2_Meter_Image_Service/ImageServer

Could anyone provide assistance with adding the Maine.gov ImageServers to QGIS projects?


texts: I have downloaded a 3D polygon shapefile of buildings. I would like to be able to select some of the objects to create a new shapefile for doing 3D rendering but I cannot seem to be able to select any of the objects unless they don't have elevation. Is there some way that you have to select the polygons when they have height?


texts: QGIS virtual layer: Linear referencing result with gaps

texts:
I have a layer with some roads, and a table, with information of whether the road is paved or unpaved.

The table contains linear referencing measurements from (vanpos) - to (totpos).

I'm using a virtual layer to produce a linear referenced layer with following code

    SELECT
    a.geometry,
    a.ws_oidn,
    a.type,
    a.morf,
    a.wegcat,
    a.rstrnm
   FROM ( SELECT st_locatebetween(ws.geometry, wv.vanpos, wv.totpos) AS geometry,
            ws.ws_oidn,
            wv.type,
            ws.morf,
            ws.wegcat,
            ws.rstrnm
           FROM eWegsegment ws
             LEFT JOIN eAttwegverharding wv ON ws.ws_oidn = wv.ws_oidn) a

The resulting layer contains a lot of 'gaps' with no results?

I checked the table about wrong values in the measurements, but I could not find any?

When looking more in detail to the 'gaps' it seems that every line ends at the next-to-last vertex of the original line.

Here you can download the features I'm using: https://1drv.ms/u/s!AsGyOOlkbsBFgVi51WixRJe2cDaI


texts: Making square with determined length of sides

texts: When it comes to 'Add polygon feature', if it is possible to make a polygon square so that user can input length(s) of the sides, then how do I do that?


texts: OGIS Ole Db provider sample with read/write capability

texts:
I'm trying to determine what level of effort would be required to develop an OGIS Ole db provider for ArcGIS.

There is a sample that is read-only.  I would like to be able to edit featureclasses in the ole db workspace using the out-of-the-box editing tools in ArcMap.  Plus, I would prefer to develop in C# instead of C++.

I see that there was an effort to do this with zigGIS, but it never was completed.

Does anyone know of sample code showing how to do this?


texts: Problem showing a country with non contiguous border

texts:
I am generating maps using Google Static API.

Due to browser size restrictions, I am doing a polyline encoding, using an online polyline encoder. The encoder takes long,lat with a line break.

Most maps come out OK. But wherever there are countries which have non contiguous areas, I don't get the map right. I figured that it has something to do with start/end point. In a GeoJSON, I notice that it is handled using an extra SQUARE BRACKET. Could it be that I am missing a similar delimiter in my long,lat data. I do not know how to handle this. I get an annoying extra line connecting the two separate regions.

How do I get rid of this line?


texts: Convert ArcGIS Spatially Enabled Dataframe to Geopandas GeoDataFrame

texts:
I have some code that works on geopandas GeoDataFrames but due to a client requirement I suddenly have to access my input data via the ArcGIS Python library, which only allows me to access the data as an ArcGIS Spatially Enabled DataFrame.
Unsurprisingly, ESRI has only provided methods to convert from geopandas to their format, and provided no support for the opposite direction:
https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.GeoAccessor.from_geodataframe
https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online-from-geopandas/td-p/790989
Is there a way to easily convert one of these to a geopandas GeoDataFrame or am I now locked in the ESRI prison?
I guess I could temporarily write the results to the file system and then open it with geopandas from there, but I am hoping it doesn't come to that.


texts: QGIS Tool/Script to run that highlights location point features within their respective polygon feature based on the same parcel ID

texts:
Software: QGIS Desktop 3.0.3

Data Type: Vector Point and Polygon
   feature layers

Action: Select based on particular field matching and
   return/highlight based on geographic location according to a
   particular rule (point feature lies within polygon feature)

I have a large data-set (80,000+) of point features for homes in the state of Florida. The point feature layer has a field showing the parcel #.

I also have a polygon layer highlighting parcel boundaries for the parcels in the state of Florida with a field that also shows parcel #.

I am trying to create/discover a tool or script to run that will a take that a sample set (10,000) of points I've manually extracted from the point feature layer, and select/highlight/return all point features that fall within the boundary of the specific polygon parcel boundary layer feature that matches the same parcel # number as the point feature. So in a nutshell,

I want to:

Match up the point features and polygon features that have matching(identical) Parcel Numbers in their attributes
Select/return all points that do or do not lie entirely within their respective polygon feature with the same parcel number as the point feature
This will provide me with a quick way of QA/QC that most (95%) of the point features are in their correct geographic (lat/long) location.


texts: Using the hillshade tool (ArcMap 10) on a 30m SRTM raster downloaded from NED the result is the one in the picture. Why are there those crossed lines all over the raster? How could I remove them?


texts:
var pixelProjection = new ol.proj.Projection({
    code: 'pixel',
    units: 'pixels',
    extent: [0, 0, width, height]
});

var layerNC = new ol.layer.Image({
        source: new ol.source.ImageStatic({
            url: '../cartes/img/' + newMapFileName,
            imageSize: [width, height],
            projection: pixelProjection,
            imageExtent: pixelProjection.getExtent()
        })
    }),
    layerVG = new ol.layer.Image({
        source: new ol.source.ImageStatic({
            url: '../cartes/img/' + oldMapFileName,
            imageSize: [width, height],
            projection: pixelProjection,
            imageExtent: pixelProjection.getExtent()
        })
    });

var map = new ol.Map({
    layers: [
        layerNC,
        layerVG
    ],
    target: 'interactiveMap',
    controls: [],
    view: new ol.View({
        projection: pixelProjection,
        center: ol.extent.getCenter(pixelProjection.getExtent()),
        zoom: 1.75,
        maxZoom: 3,
        minZoom: 0
    })
});

layerVG.on("change", function(){
    console.log("loaded");
});

I am trying to make the layer event work and I can't seem to make it fire. Even when I try with moveend, nothing seems to be working. I want to have an event fire when the image (layer) is loaded for the first time.


texts: Using SelectLayerByAttribute with list of values in ArcPy?

texts:
I'm fairly new to python, so I'm having a little trouble with this. I want to iterate through a list of values, select the list values from a feature class, select from another feature class that intersects the first selection, and then calculate a field in the second selection based of the list index value. Here's the script I'm working on:

import arcpy
arcpy.env.workspace = r"C:workspace.gdb"

circuits = ["DC430", "DC431", "DC432"]

for i in range(len(circuits)):
    arcpy.SelectLayerByAttribute_management("Meters", "NEW_SELECTION", circuits[i])
    arcpy.SelectLayerByLocation_management("Parcels", "INTERSECT", "Meters", "", "NEW_SELECTION", "NOT_INVERT")
    arcpy.CalculateField_management("Parcels", "Circuit", "circuits[i]", "PYTHON_9.3", "")

How do I make this work the right way?


texts: Popups over markers not working in OpenLayers

texts:
I have a map developed based on google map API and OpenLayers. It has some markers on it. I'm trying to create a popup for each marker. The markers are in a markers layers. Besides the markers layer, there are multiple other layers in the map as well. I'm trying to use OpenLayers.Control.SelectFeature API to do it. But the popups are not working. Following is my code. Any hints are appreciated!

function createPMap(){
if(pMap != null) pMap.destroy();

// Create pMap
pMap = new OpenLayers.Map({
  projection: new OpenLayers.Projection("EPSG:900913"),
  displayProjection: new OpenLayers.Projection("EPSG:4326"),
  units: "m",
  maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),
  allOverlays: false,
  theme: null,
  controls: []
});

// Add control
pMap.addControl(new OpenLayers.Control.LayerSwitcher());
geocoder = new OpenLayers.Control.Geocoder();
pMap.addControl(geocoder);

// Create gplayer
gplayer = new OpenLayers.Layer.Google(
   "Google Physical",
   { type: G_PHYSICAL_MAP,  isBaseLayer: true,sphericalMercator: true, minZoomLevel: 0 }
);
pMap.addLayer(gplayer);

// Create markers layer
markers = new OpenLayers.Layer.Markers( "Sites" );
var epsg4326 = new OpenLayers.Projection('EPSG:4326');
var epsg900913 = new OpenLayers.Projection('EPSG:900913');
var size = new OpenLayers.Size(21,25);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png',size,offset);

    markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-88.63023333,36.00091667).transform(epsg4326, epsg900913),icon));
    var icon1 = icon.clone();
    markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-73.66586,42.297826).transform(epsg4326, epsg900913),icon1));
    var icon2 = icon.clone();
    markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-110.802188,38.17243402).transform(epsg4326, epsg900913),icon2));
    var icon3 = icon.clone();
    markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-110.9660481,38.43077243).transform(epsg4326, epsg900913),icon3));

    pMap.addLayer(markers);

    pMap.zoomToMaxExtent();

    selectControl = new OpenLayers.Control.SelectFeature(
            markers,
            {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});

    pMap.addControl(selectControl);
    selectControl.activate();
}

function onPopupClose(evt) {
    selectControl.unselect(selectedFeature);
}

function onFeatureSelect(feature) {
    console.log("We are at select.");
    var selectedFeature = feature;

    var popup = new OpenLayers.Popup.FramedCloud("SitesPopup",
        //new OpenLayers.LonLat(-98.63023333,36.00091667).transform(epsg4326, epsg900913),
        feature.geometry.getBounds().getCenterLonLat(),
        new OpenLayers.Size(100,100),
        //"<h2>"+feature.attributes.name + "</h2>" + feature.attributes.description,
        "Test a popup",
        null, true, onPopupClose
    );
    feature.popup = popup;
    pMap.addPopup(popup);
}

function onFeatureUnselect(feature) {
    console.log("We are at unselect.")
    if(feature.popup) {
        pMap.removePopup(feature.popup);
        feature.popup.destroy();
        feature.popup = null;
    }
}


texts: PostGIS - unique constraint for spatial equality

texts:
I have a polygon column for which I would like to add a unique constraint that tests for spatial equality akin to ST_Equals so that it ignores vertex order. For instance, I would like these polygons to count as duplicates:

ST_GeomFromText('POLYGONZ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))')
ST_GeomFromText('POLYGONZ((1 0 1, 1 1 1, 0 1 1, 0 0 1, 1 0 1))')

Is there a standard way to implement this other than a GIST index, which the docs say only indexes the bounding box?

One solution I'm thinking of is to index on a function that returns a sorted array of polygon vertices, but it seems like a hack.


texts: Leaflet fails to overlay my ESRI hosted Tiled Service on the OpenStreetMap basemap

texts:
I have a public-accessible tiled service hosted on the ESRI ArcGIS Online platform in EPSG 3857 (Web Sphere Mercator).

The service URL is https://tiles.arcgis.com/tiles/RylLPiI61AyfENce/arcgis/rest/services/VISCAmap3857/MapServer

I would like to view the tiled layer as overlay to the OpenStreetMap basemap using Leaflet.

var OpenStreetMap_Mapnik = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{
    maxZoom: 19,
    attribution: '&copy; OpenStreetMap'
});

map = L.map('map', {
    zoom: 7,
    center: [-36.5, 145.5],
    layers: [OpenStreetMap_Mapnik]
});

I have tried both the Leaflet tileLayer and ESRI's Leaflet tiledMapLayer.

var my_tiled_layer_1 = L.esri.tiledMapLayer({
    url: "{MY_ARCGIS_URL}/MapServer"
})

var my_tiled_layer_2 = L.tileLayer('{MY_ARCGIS_URL}/MapServer/tile/{z}/{y}/{x}');

Neither of them worked. I can see the basemap but not the tiled layer. From the browser's development tool window, I can see the {y} {x} numbering was messed up and there were all 404 responses.

Using the post: Leaflet misinterpreting tiles info from an ESRI hosted Tiled Service, I can get the tile layer alone displayed on Leaflet but not correctly overlayed on the OpenStreetMap basemap.


texts: How to get labels to show from a python plugin in QGIS?

texts:
I have created a memory polygon vector layer from my plugin in QGIS and it looks fine:

my_layer = QgsVectorLayer('Polygon', 'My layer', 'memory')
QgsMapLayerRegistry.instance().addMapLayer(my_layer, False)

# I want to place the layer at a specified position in the layer tree.
root_node = QgsProject.instance().layerTreeRoot()
root_node.insertLayer(3, my_layer)

Then I applied some styling from the plugin and it works too. Finally I wanted to enable some labelling from within the plugin:

label = QgsPalLayerSettings()
label.readFromLayer(my_layer)
label.enabled = True
label.fieldName = '$area'
label.writeToLayer(my_layer)

The problem is that the labels are not showing. I need to manually change just one simple thing in the label settings for the specified layer afterwards and then they show with my customised settings.

I see that others are using the setCustomProperty on the layer instead:

my_layer.setCustomProperty('labeling', 'pal')
my_layer.setCustomProperty('labeling/enabled', 'true')
my_layer.setCustomProperty('labeling/fieldName', '$area')

But that doesn't work either, I still need to manually change something to get them to show.

I have tried both

my_layer.triggerRepaint()
iface.mapCanvas().refresh()

It doesn't seem to have any effect though.

It doesn't seem to have any effect either if I apply the labeling before or after I add the layer to the QgsMapLayerRegistry.

Is this a known problem, or can you see what it is that I am missing here?


texts:
I have a shapefile with overlapping polygons, most overlaps are small. I want to remove all overlaps and get a new layer with similar but non overlapping polygons.
I don't care much which of a pair of polygon gets the overlapping section. I would rather not go over them one by one.
I've been using QGIS but am open to other tools.


texts:
I am trying to reproject a dataset into NAD 1983 10TM AEP to map across Alberta in ArcGIS 10.5. The ESRI guide states to use either: (a) NAD_1927_To_WGS_1984_10
(b) NAD_1983_To_WGS_1984_8 The problem is neither of these transformations is available within the drop down selection in the 'Project' tool, what would the proper transformation use for Alberta?


texts: Creating line between point and all other possible points using FME

texts:
I'm working on creating a map where I'm trying to create a line between one point and all other points using FME. The points represent the center of a building on a campus, and I'm trying to create a line between one building and all other buildings on campus. For example, if the buildings on campus include Buildings A, B, and C, I'm trying to create a line between Buildings A and B, Buildings B and C, and Buildings A and C.

I'm interested in creating this information so that I can identify the shortest possible route between two buildings based on a pedestrian network layer that runs throughout campus. After creating this information, my idea is to use the lines between all possible buildings as input into the From-To port in the ShortestPathFinder tool. However, I'm open to other suggestions on how to approach this problem/suggestions on other tools to use.

Also, it might be worth noting that there are 300+ buildings on the campus, so I'm uncertain whether the methodology that I devised above would not work since there would be so many possible building combinations.

My preliminary FME workspace is below.


texts: Why does QGIS Browser 2.12.1 keep freezing/crashing when I try to view a csv data table?

texts:
I've just downloaded QGIS Lyon 2.12.1.  The desktop application works great but the browser crashes whenever I try to view a csv data table.  I've gotten it to work once out of ten tries.  I click on the csv file and it just starts working...and never stops. The biggest file size I've attempted in 320 MB.  Below you can see what I'm looking at:

Screenshot too:

Does it matter how big the files are?  Seems like anything I try over 100 MB just won't work.


texts:
I have installed QGIS 2.18.13 "Las Palmas" and I wanted to edit a table using refactor fields. I search the item using Processing toolbox/Geoalgorithms/Vector/Table tools, and the refactor fields is missing.

Can anyone help me with this?


texts: Seeking Function to calculate red-edgeNDVI in Google Earth Engine?

texts:
I am trying to calculate the red-edgeNDVI ((NIR – red edge)/(NIR + red edge)) of an Image.Collection in Google Earth Engine. There is a built in function for NDVI but not for red-edge NDVI. The code I have is below but I get the error message "image.NIR is undefined". I'm sure this is a simple syntax issue related to the function but I've tried everything I could think of and I just can't get it to work.

Can you tell me what I'm missing?

/**
 * Function to mask clouds using the Sentinel-2 QA band
 * @param {ee.Image} image Sentinel-2 image
 * @return {ee.Image} cloud masked Sentinel-2 image
 */
function maskS2clouds(image) {
  var qa = image.select('QA60');

  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;

  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
      .and(qa.bitwiseAnd(cirrusBitMask).eq(0));

  return image.updateMask(mask)
  .divide(10000);
}

  // Load Sentinel-2 TOA reflectance data.
  var S2 = ee.ImageCollection('COPERNICUS/S2')
                  .filterDate('2017-06-01', '2017-09-30')
                  // Pre-filter to get less cloudy granules.
                  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
                  //Select required bands only
                  .select('B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'QA60')
                  //Apply cloud mask
                  .map(maskS2clouds);

//Create band variables
var redEdge = S2.select('B5');
var NIR = S2.select('B8');

//Function to calculate redEdgeNDVI
var add_reNDVI = function(image){
  var redEdgeNDVI = image.NIR.subtract(redEdge).divide(NIR.add(redEdge)).rename('reNDVI');
    return image.addBands(reNDVI);
};


texts: How to output raster that contains band numbers of pixelwise maximum values?

texts: I have got a ndvi_2015.tif with 12 bands of monthly ndvi values (band 1 = January, band 2 = February etc.), which I used to create a summary raster layer using the max() function in R. Now I want to know which month the the maximum occurred in. How do I go about preferably using R?


texts: selection expression to display the first 5 rows only in QGIS 3.8.3

texts:
I would like to display the first 5 rows only in QGIS 3.8.3 from the attribute table of a layer in ascending order.

I tried many selection expressions, but, none of them seems to work.

Is it possible to perform such querry in QGIS, if yes, plz provide me with querry proposition.


texts: Calculating size of particular area below buffer in QGIS?

texts:
I have a point shapefile of villages where data was collected in Northern Kenya. I created a buffer around those villages.

The second vector layer contains polygons defining areas according to vegetation type. So for example, a forest might be surrounded by a narrow ring of woodland in an area which is mainly grassland. I'm trying to obtain a percentage of each vegetation type within the buffer per village.

I'm using QGIS 1.7


texts: ArcGIS Reclassify Results returns nan raster in QGIS

texts:
I reclassified a raster layer as a geotiffs using ArcGIS 10.5.  The resulting reclassified raster had two values in the ArcGIS reclassify function, NoData and 1.

When I bring the geotiff into QGIS 2.18 the raster displays black with nan values.  I have tried to reclassify the resulting geotiff using GRASS but that returned an error.  Both QGIS and GRASS freak out over nan values!

How do I get this geotiff to display the nan values as transparent and the 1 values to display a color?


texts:
I want to import a shp file to postgreSQL. First I create sql file and then run PostgreSQL. To create sql file, I run this command in windows cmd:

shp2pgsql -s 4326 worldCountries.shp worldcountries postgres > worldcountries.sql

and then run:

psql -d postgres -U postgres -p 4321 -f worldcountries.sql

but result is:

  psql: worldcountries.sql: 21: ERROR: function addGeometrycolumn(unknown, unknown, unknown, unknown,unknown, integer) does not exist


texts: how to buffer inside a polygon in Javascript

texts:
I'd like to know if it's possible to buffer a polygon on the INSIDE only using OpenLayers and other Javascript tools (e.g. jsts).

Here's what I found about the topic in general:

Buffering INSIDE a polygon with ArcGIS (possible):
Inside buffer with attributes in ArcGIS?

Buffering a polygon on BOTH sides with JSTS (possible):
Creating Polyline Buffer in OpenLayers 2?

But I need to buffer a polygon on just the inside.  Either a "real" buffer with the output geometry, or a "fake" buffer with just a line thickness and style.  However line thickness in OL goes on both sides of the line.

End goal is to get something like this:

Side-question - Does any know if it's possible to do the country outline (like above) via Google Maps API?!  Have not been able to find any reference.  So I'm trying to duplicate with OpenLayers and a geojson outline of the world.


texts:
I have a map and I want to create a label with the unique names of places. Meaning a province may have a lot of polygons but I only want to keep one of these polygons' name (the main or biggest one is possible).

Is there a way to do that with QGIS?

This is an expression I've tried but it doesn't work:

array_to_string(array_distinct(string_to_array(substr(Stoixeia2001_Περιγραφή,6,10))))


texts: multiple electrical cable representation in Geodatabase

texts: I have multiple electrical cable going through the same path. Should I draw them all as one single line (with an attribute denoting how many they are)? or multiple lines? if multiple, should I draw them with a separating distance to be able to distinguish between them? or draw them as they are in reality (Stacked)?


texts: Searching directories and subdirectories to perform intersects and clips using ArcGIS Desktop?

texts:
I'm trying to develop a tool using ArcGIS 10 that queries our company's data stores for any data that intersects a feature.

So that when we acquire a new property we can  run this tool and it will find all of the data we have that intersects the new property, clip it, and save it in a new location.


texts: Obtaining block structure from parcel data using QGIS or ArcGIS for Desktop?

texts:
I am trying to analyze the urban form of a city. I don't have the polygon file for streets, so I must derive block structure from parcel data (see image below).

What tool could I use to accomplish this?

I've tried running dissolve in QGIS, but that has been running overnight and I'm not sure if it will do what I need it to (i.e. will it make one big polygon or several polygons)?


texts: Create subset image collection based upon index value

texts:
I have a Landsat image collection with, additional to the usual bands, the  NDWI index (used for water) for each image in that collection.

I would like to create two subsets of this image collection:

one with the upper 25 percent of NDWI index values (75 - 100);
another one with the lower 25 percent of the NDWI index values (0 - 25);

So the result would be three separate image collections (containing all bands). First one containing all images. The second one containing all images selected by the upper 25% NDWI index values. The third one containing all images selected by the lowest 25% NDWI index values.

Please find a toy script at this link: https://code.earthengine.google.com/4bc201244078d5849d033bb7560a3479.

Please note that in that script there is also a quality mosaic. However, I am not satisfied by the quality mosaic because it tends to pick up the extremes. Therefore I would like to work with the lower and upper 25 percent.


texts: Multiple Iterators and Clipping in ArcGIS ModelBuilder

texts:
I have two separate polygon layers. One layer consists of voronoi polygons. The second layer consists of buffers, many of which overlap.

I need to do is iterate through each voronoi, clip only the buffer which has its center within the polygon, and then recombine all the clipped polygons in to one layer.

Since I only want each clip to be of one unique voronoi and one unique buffer polygon, my inclination was to use multiple iterators, but that does not appear to be possible in ModelBuilder.

Is there any way to do this in ModelBuilder?


texts: Create new properties when updating a layer

texts:
I'm trying to update a property that doesn't exist in my current database, and I want that if it doesn't exist - then create it with my value and only for this specific layer.
For example - I have a database of the states with their names and population, and I want to add whether this state voted republican, democratic or independent, so my request would look like that:
<?xml version="1.0" ?>
<wfs:Transaction
   version="2.0.0"
   service="WFS"
   xmlns:fes="http://www.opengis.net/fes/2.0"
   xmlns:wfs="http://www.opengis.net/wfs/2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs/2.0
                       http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
   <wfs:Update typeName="topp:states">
      <wfs:Property>
         <wfs:ValueReference>VotedFor</wfs:ValueReference>
         <wfs:Value>democratic</wfs:Value>
      </wfs:Property>
      <ogc:Filter>
         <ogc:PropertyName>STATE_NAME</ogc:PropertyName>
         <ogc:Literal>Colorado</ogc:Literal>
      </ogc:Filter>
   </wfs:Update>
</wfs:Transaction>

And since I don't have in my database the "VotedFor" parameter, I wonder if there is any way to create it "on the fly"


texts: Displaying data from related records in a flat table after selecting a feature on the map

texts:
I have an ESRI feature service with 2 Layers:
layer 0: Administrative boundary (0) and
layer 1: Tables: MEP_global_data.DBO.mep_catalog (1)

Layer 0 has the geometry of the administrative boundaries of the world.
Layer 1 is a flat table with no geometry

The 2 layers are linked by a country code column in each.

I've done lots of searching but can't find any examples or a way to do the following:

When I click on a country displayed on a world map (layer 0) via leaflet in my browser, I want a popup that displays data from the flat table (layer 1) for that country.

Is there an example that does something similar I can review or can someone suggest a way I can make this happen?

Layer: Administrative boundary (0) and Tables: MEP_global_data.DBO.mep_catalog (1)


texts: Understand way field (type geometry) in planet_osm_polygon

texts:
I'm new to QGIS and I'm using PostGreSQL and QGIS DB Manager to get information from the polygon_osm tables.

I'm currently working on the _polygon table and I'd like to get the coordinates for each point in the polygons.

Here is the problem I am facing:

I am trying to figure out what the "way" field is. When I display the whole table it says "POLYGON" and when I display a specific entry I have very long series of numbers and letters (0-9, A-F) like "0103000020110F00000100000051010000713D0AD7BBDCB..."

and so on (fewer zeros on the right). I'm looking for a way to get a human-readable field, by which I mean coordinates of the points specifying the vertices of the polygon, or id linked to another table (I'm not sure what is stored in this field). The field type is geometry(Geometry,3857). I have a warning message saying "There is no entry in geometry_columns!", I don't know if it is related.

The geom_to_wkt function seems to be what I'm looking for but I am working on tables with millions of entries so I need to do this with a query in DB Manager and not just in the field calculator of the attribute table.


texts:
I am working on parcel and point data. I converted polygon (parcel) to point features using ARctool box i.e. feature to point (Original labelled in picture). After this step I want to bring all point on edge of each polygon (Final Result picture). I tried to use snap tools (from Arctool box ), it gives output on nearest edge (shown in picture After Snap) but I need all points on front edge (Final Result Picture).

If there is any existing tool or script (python or VB) which can give me desired output?


texts: Select a percentage of a area that lies within a buffer

texts:
I buffer within a distance of 80 ft off a road .Which produces the layer of the result of the buffer.
I then produces a layer for the land around it . I know need to select everything that fall within the buffer areas, and produces a layer that show the percentage of how much the land that is within that buffer.
I am using OpenJump to display map.

example of SQl

BUFFER

select ST_Buffer(geom,80)::geometry
(polygon,26986) As geom from road
where street = 'hope';

LAND

select *
from land;

OR

I  used in postgis/ pgadmin  this sql but openjump require geom to be used

select parcel, land_type , full_str
from land
left join road on ST_Dwithin(land.geom,road.geom, 19.812)
where road_name = 'hope';


texts: Extending line to points an unspecified distance using ArcMap?

texts: I would like to extend polylines (roads) to existing points (addresses points). Mostly driveways that are very close to the points. Extend Line does not do it since it requires a specified distance and that varies from case to case.


texts: Merging two features and deleting original two in ArcGIS Pro?

texts:
I am using ArcGIS Pro.

I am currently working on a city's water main system. The way the mains were input into the system they are in tiny pieces.  I want to merge them together so that they run from valve to valve.  I am using the merge tool to merge the pieces of pipe together.  The end result however, gives me 3 mains (the two originals that I merged, and the newly merged one).

How do I merge two features together and just end with the one newly merged feature?


texts: Computing geometric intersection (line-on-polygon overlay) using ArcPy?

texts:
I want to take geometric intersection of line and polygon shapefile. ArcPy has a tool:

arcpy.Identity_analysis

but it is available with "ArcGIS for Desktop Advanced" and I have "ArcGIS for Desktop Basic".

Is there any alternative tool that I can try?


texts:
I am using ArcMap 10.2.

I am trying to create a form to use in the field (on a construction site).  This form will be used to inspect features such as a inlet.  My main goal is to have the information collected in the field by way of a cell phone be easily inputted back into GIS.


texts: In OL4 (or, I guess, any version >=3.0), all features have an undefined id unless it is set by any mean. They do have, however, an ol_uid value (as far as I could understand, all ol objects have such property), that seems a "random" number set automatically by openlayers. In order to store feature styles in memory, it is safe to use this variable as a map index? I am doing it already, but want to be sure that there's "no chance" of collision.


texts: How well does an affine linear transform approximate the transform between two transverse mercator projections?

texts:
How well can an affine linear transform approximate the transformation between two different Transverse Mercator Projections?
I've got an area where different coordinate systems are used. Unfortunately those grids are historically grown and embedded in proprietary software and it's not possible for me to recover the actual definitions of the coordinate frames. However, I assume they are both Transverse Mercator Projections of some kind and I need to transform data between the two coordinate systems.
I'm able to regress an affine linear transformation of the form
[a -b  c]
[b  a  d]
[0  0  1]

which means it accounts for translation, rotation and scaling. I'm now trying to estimate (bound) the error I get when using this method.
From my understanding such a transform is locally correct (when fitted for one point) and is the same as the first order Taylor approximation of the transformation between the two TMP. However, the transformation is generally non-linear, so the further I move away from the point where I fitted the transform, the larger the error due to non-linearity becomes.
The area I'm interested in has a diameter of 10-20 km and is at a latitude of about 26 degrees South. How can get a sensible upper bound for the approximation error for this area?


texts: Moran’s I (spatial autocorrelation) in QGIS or SAGA?

texts: Is there a way (plugin/processing tool) to calculate Moran’s I as a measure of spatial auto correlation of a point pattern in QGIS or SAGA?


texts:
I have to create segments like the one in the picture:

I need to draw a segment where there is a straight line and other parts of segments with arcs of different angles.

The part of the segment that curves must be only created by 3 points, a starting a center, and an ending point.

Creating different arcs can be a solution but the contact between two arcs create a step that I don't want. Probably a cube spline can be the solution but I cannot find a working plugin for QGIS 3.4.

I installed the QAD tool, which is the CAD plugin but even there I cannot find the solution.

I just tested in ArcGIS the tool 'Bezier Curve Segment' and it does what I am searching for. Does this functionality exist in QGIS?


texts: ArcPy: Geoprocessing for the data with specific variable

texts:
Imagine if we have dataset like this:

+------+------------+
| City | DistrictID |
+------+------------+
|   A  |     001    |
+------+------------+
|   B  |     001    |
+------+------------+
|   C  |     002    |
+------+------------+
|   D  |     003    |
+------+------------+
|   E  |     003    |
+------+------------+

I would like to use geoprocessing tools for each district. For example, I would like to dissolve cities with respect to DistrictID (A and B will be dissolved and so on). Is it possible to conduct this kind of analysis using ArcPy?


texts:
I am referring to the paper here, section 2.6.1.

Is there an existing library ( in C++ or .Net) that already has this implemented? Namely, taking two Triangulated Irregular Network (TIN), we create a new TIN by adding or subtracting the two.

Edit: I afraid applying polygon boolean operation between each triangle in one TIN against all the triangles in other TIN is not efficient; from what I know there ought to be efficient algorithm that computes polygon overlay operation; it is this kind of library that I'm looking for.


texts:
I am trying to Select certain fields, resulting from a join using ArcSDESQLExecute but encounter the following error when I try to include the Shape field:

AttributeError: AttributeError(u'ArcSDESQLExecute: SreamBindOutputColumn ArcSDE Error -65 \uec5c',)

Has anyone encountered this error before?

The Geometry type is multipolygon for the Shape field, the other fields are text and integer
I'm using RDBMS MS SQL Server 2012 SP1 andArcGIS Desktop 10.2.2.3552


texts: How To Publish A Per Replica Enabled Sync Model Feature Service in ArcGIS

texts:
I have published a Feature Service (Sync Enabled) to our ArcGIS Server but I am only getting PerLayer Sync Model in the service

but I need to have Sync Per Replica Instead. like

I didn't see any thing available in ArcMap Service Editor Wizard regarding to this

Can you please let me know how I can enable the Per Replica Then?


texts: Get Bounding Box of Each Polygon (Each Rows in a table) using PostGIS

texts:
I have zoom level 4 polygons of the world (in EPSG 3857) and I am trying to get the bounding box of each tiles.

this is the query that I used but this is not working.

select title, id, st_extent(geom) from world_tile4;

ST_Extent brings me the entire table (feature) and this is not what I wanted to have

I am assuming that I might have to use for loop to get this?


texts: How can I merge 30 lines from a kml into 1 shp in Qgis?

texts:
I have almost the same question that was solved here (How to merge multiple KML points into one file?) but I cannot find the same options as the solution (https://gis.stackexchange.com/a/231506/96160).

I have 30 separate lines in a Google Earth kml. I need to merge them into one shapefile so I can import that to AutoCAD Civil 3D 2016. Right now they are 30 different vector layers.

How do you get the same options in version 2.18.7 on Windows as JohnR has in version 2.18.0 on Mac?

This is a screen shot from v2.18.7 on Windows.

This is a screen shot from v2.18.0 on Mac.


texts: How to render features with different symbols depending on in memory data?

texts:
We are developing a complex ArcMap extension software which contains class extensions, a workspace extension and some ArcMap extensions.

The purpose of the software is to link our existing management sofware to the client's ArcGIS data. This way he can access our software's data without leaving ArcMap and without duplicating data.

This way, some the client's data stays in their feature classes and our data is in a separate database, in another dbms. We have access to our systems's data inside the class extensions via some configurations made in ArcCatalog. We can easily put the needed data in memory for later use.

We now have to implement advanced feature rendering(displaying different symbols for a featureclass) depending on data contained in our management software.
On demand, we could fetch and store in memory the data needed to compute the symbol to draw for each feature.

Is there an exising renderer that I could use that works with in-memory data?
If not, is there a way to temporarily add the in memory data to the feature class? (add temporary in-memory fields)
If it doesn't work I suppose that I need to create my own renderer. Where do I start?


texts: Is it possible to localize ArcGIS Feature-Classes?

texts:
I wondered if it is possible to translate an ArcGIS feature-class into different languages?

For example I want to translate the Fields of the class and then add the data for the defined languages. I was not able to find any information about this on the ESRI sites. Anyone can tell me if it is even possible an when how to achive multilanguage feature-classes?

UPDATE

Let me give you a short usage example:

I have a Website and want to use data from an arcgis server that is stored in a feature database. Now, the webpage is in english and german. If the user watches the site in english the attribute names of the features should be displayed in english. If the user is german, it should show the german localized names. Maybe a feature has an attribut-field called "address". In the english version the text should be "Address" and in the german one "Adresse"


texts:
I downloaded the QGIS API Documentation  for offline use. But the div id=main-menu can't display. The reason is a dependency on serverside search.php. How can I use it normal for offline?
This is online Documentation:

This is offline Documentation:


texts: Error generating chart: No features contain non-null values of "system:time_start". for Landsat 8 T1_SR

texts:
It's weird, when I run the attached code on Landsat8 TOA band it works fine. But when I switch out the bands to the SR band I get the message below:
Error generating chart: No features contain non-null values of "system:time_start".
I found some suggestions about .copyProperties(image[system:time_start]) and tried putting it in a few different spots, but couldn't figure it out.
https://code.earthengine.google.com/e7fb97a366c97723ce0c82675125816d


texts: What's the single point listed in a GPS track's attribute table?

texts:
When I import GPS waypoints to QGIS, it includes coordinates that show up in the attribute table. That's great. What I don't understand is when I import tracks. I still get coordinates, as though it is a single point. What point is it? Is the numerical data available for the whole track?
Thanks
TVZ


texts: Is it possible to export Map Service to cache or to raster

texts: I've added The server under GIS Servers  in ArcCatalog. At that server i have Map Service of an orthophoto. is it possible to export that that Map Service to raster or to cache ?


texts: Loading WMS Layer with MapWinGIS from GeoServer

texts:
I'm working on a C# project using MapWinGIS 4.9 and Geoserver 2.13 Previously I've stored Shapefiles in Geoserver and I want to load in a C# project using MapWinGIS control.

I'm using WmsLayer Class Reference but still had no idea how should I call the GetMap request from geoserver.

Also I've been searching for documentation but had no success.

Does someone have an idea?


texts: Re-using QGIS Atlas on similar projects?

texts:
I recently started using the Atlas feature on QGIS 2.18 and have a problem making it work as I want. More precisely I need to be able to easily reuse an atlas for a 100% similar project (same layer names, same columns structures) but at a different location.

More detailed explanation:

I have 25 projects with the same structure (same layer names, same columns)
I prepared a Composer for an atlas for projectA (with a map, a legend 2 attributes tables) which works well. I finish printing my pdf files, I save my composer and close it.

Later on I come back with project B, open my project B layers and open my composer. I was hoping that the composer would adapt to my project B layers (which have exactly the same name and same structure as project A). unfortunately it did not work out and I have to redo the attribute tables, the legend...

I looked into this problem but have not been able to find a solution.


texts: Embed a map or OverviewMap in an InfoWindow/Popup

texts:
Our page has a main map area with sidebar widgets that trigger different functionality. The widget I'm working with at the moment is going to be annotating points on the map with details including location data. The general workflow is:

User opens widget
User clicks draw region
Path is drawn on map
User clicks on map graphic to trigger popup

I've been searching for a way to combine the functionality of a Popup with that of the OverviewMap. That is, I would like to embed an OverviewMap (or, really, an arbitrary, full second map window) inside a popup. In the picture below, where the image is in the popup is where I'd ideally be inserting the map.

I began by trying to simply provide a div in the InfoTemplate that I could replace programmatically.

var plinePointInfoTemplate = new InfoTemplate({
  title: "Segment Information",
  content:  "Segment Start  : ${segStartX}, ${segStartY}
" +
            "Segment End    : ${segEndX}, ${segEndY}
" +
            "Segment Length : ${segLength}
" +
            "Average Speed  : ${segSpeed}
" +
            "Time To Next Pt: ${segETA}
" +
            "
Map Goes Here

" +
            ""
});

...

//Populate map in popup
var templateMap = new OverviewMap("infoWindowMap", {
                  basemap: "satellite",
                  center: [-46.807, 32.553],
                  zoom: 3
                  }, 'infoWindowMap'
                );
templateMap.startup();

This hasn't been working (per the picture). I'm pretty new to working with the API and am unsure what exactly is wrong with my approach. It kind of seems like I'm trying to construct the overview map too late in the game - the infowindow and its contained divs don't actually exist until the click event on the first graphic. Is there a way to trigger it's construction after the rest of the page has been built? Am I barking up the wrong tree entirely?

None of the examples I've seen have constructed an overview map after the fact.


texts: Dissolve Line Strings to one string - "No Shapely geometry can be created from null value"

texts:
I have a layer with 7000 LineStrings, all represent bus routes:

It seems that all the bus routes are contiguous, but I'm not sure of it.
I'm trying to use python shapely to dissolve all those LineStrings but I get the following errors:

TopologyException: found non-noded intersection between LINESTRING (193929 -48233.6, 193930 -48234) and LINESTRING (193930 -48233.8, 193930 -48234) at 193929.98210726795 -48233.983282576017
...
ValueError: No Shapely geometry can be created from null value

This is my code:
with fiona.open(src, 'r') as ds_in:
    crs = ds_in.crs
    drv = ds_in.driver

    #combine lines into multiString
    lines = []
    for feature  in ds_in:
        geom = geometry.shape(feature['geometry'])
        if geom is not None and geom.is_valid:
            lines.append(geom)

    dissolved = ops.unary_union(lines

I'm trying to understand whether the TopologyException is critical and why I get the error after that. When printing the geometries, I don't see Nulls or missing data.
Other posts deal with polygons, but with linestring a buffer isn't an applicable solution.


texts: Mapping continuous vector data on a continuous colour gradient in ArcMAP 10

texts:
I'm plotting vector data for different attributes for countries across Europe. I've used symbology to plot categories of countries. However, the data are numbers so are on a continuous scale. I would therefore like to plot the numbers in each country on a continuous colour or shading gradient (the default for raster data), where the number is each country is represented as a point on the scale rather than interval scales. This will make the data much easier to interpret. I cannot find a way to do this in ArcMap 10.

Does anyone know a way that this can be done?


texts:
I am looking at our quote from Esri and am not sure on the difference between two items on the quote. They are:

ArcGIS for Server Workgroup Standard One Core Additional Migrated Maintenance
Start Date:  04/19/2013
End  Date:  04/18/2014

ArcGIS for Server Workgroup Standard Up to Two Cores Migrated Maintenance
Start Date:  04/19/2013
End  Date:  04/18/2014

They look one in the same to me. They are quoting me for two of the first one and one of the latter one. Can anyone tell me what the difference is?


texts:
I have a table with the China provinces and a numeric value associate to each one, how I can colorise the China provinces based on these values?, like a "intensity" scale.

I'm using CartoDB.

An example of the table can be:

Province,     Value
Tibet,        100
Sichuan,      90
Yunnan,       10
Guizhou,      45
Anhui,        50
Heilongjiang, 120
Gansu,        98


texts: How to host and launch new html files under Geoserver installation

texts:
I have gone through many posts to understand how to host and launch new HTML files under a Geoserver installation like this: Geoserver static file path
I have saved a test.html file under \GeoServer 2.7.0\data_dir\www\
And when I tried to access that file from http://localhost:8080/geoserver/web/test.html  ,
I get:

  HTTP ERROR: 404

  NOT_FOUND RequestURI=/geoserver/web/test.html

  Powered by Jetty://

How to resolve this? Did I save the file in the wrong location? Should I do something else to get this working?


texts:
I've got tons of DWG/DXF files with information (in several layers) dealing with:

Contour lines and elevation (lines)
positions of antennas (points)
protection areas (polygons)
administrative boundaries (lines)
roads (lines)
rivers (lines)
fences (lines)
...

All this information have been inserted into these CAD files in a non-standard way (not-unified names or colors in layers), and now I want to translate it into GIS (SHP files or into a PostGIS Server).

I'm investigating how to translate these data.

I'm considering:

create GDAL scripts with Python (http://www.gis.usu.edu/~chrisg/python/2009/)
create scripts with Teigha libraries (http://www.opendesign.com/guestfiles/TeighaFileConverter)
use ArcGIS Desktop (with Python scripts) (http://www.slideshare.net/cageyjames/python-scripting-with-arcgis)
use QGIS or gvSIG (http://www.qgis.org/, http://www.gvsig.org)
use GlobalMapper (http://www.globalmapper.com/)
use GeoKettle (http://www.spatialytics.org/projects/geokettle/)
...

Can CAD2GIS translation be achieved with this software?


texts: Seeking administrative boundaries for various countries?

texts:
After learning about the US Census's TIGERLines datasets I've working with the following layers, from the USA data

Country boundaries
State boundaries
County boundaries
City boundaries
ZipCode/Postcode boundaries

What I am trying to find is the equivalent (where appropriate) of the same data for various countries.

Is there any free administrative boundaries available as shapefiles for other countries?


texts: Calculating Cumulative Field Values in ArcMap using a case field in ArcGIS 10.4

texts:
I want to calculate cumulative field values using an case field from another column in ArcGIS 10.4.

For example, if I have an "ID" column and "Count" column inside my attribute table, I want to calculate cumulative values for each ID separately.

I have used this:

Calculating Cumulative Field Values in ArcMap

I can do that if I select all rows with the same ID and run the field calculator, but that is a lot of manual work, so I want to use "ID" field as case field.

What is the best way to do that?
Calculating Cumulative Field Values in ArcMap


texts: Calculate focal range on XYZ DEM in QGIS or Spatialite

texts:
I have a XYZ DEM of a fairly mountainous terrain and would like to identify flat areas using QGIS. How can calculate focal range in QGIS?
Or would there be a way to do this in Spatialite?

Ideally, the output would be a shapefile of polygons of flat areas or a set of points representing centers of flat circles of certain radii.


texts: Problem loading OS OpenData multipoint shapefile into PostGIS

texts:
I am trying to load the OS OpenData Strategi shapefile dataset into a PostGIS database.  I have had no problems with the polyline and polygon shapefiles, but I am unable to get the point shapefiles to load.

I am using the following shp2pgsql command line to create the table and load the data:

shp2pgsql -c -I -s 27700 admin_font_point strategi_point | psql -d opendata

The error I get is:

Shapefile type: MultiPoint
Postgis type: MULTIPOINT[2]
SET
SET
BEGIN
NOTICE:  CREATE TABLE will create implicit sequence "strategi_point_gid_seq" for serial column "strategi_point.gid"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "strategi_point_pkey" for table "strategi_point"
CREATE TABLE
                         addgeometrycolumn
-------------------------------------------------------------------
public.strategi_point.the_geom SRID:27700 TYPE:MULTIPOINT DIMS:2
(1 row)

ERROR:  new row for relation "strategi_point" violates check constraint "enforce_geotype_the_geom"
ERROR:  current transaction is aborted, commands ignored until end of transaction block

The last error just repeats for each insert.  The generated SQL looks like:

SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "strategi_point" (gid serial PRIMARY KEY,
"code" int4,
"legend" varchar(42),
"file_name" varchar(16),
"number" numeric(11,0),
"name" varchar(180),
"number0" varchar(64),
"admin_name" varchar(50),
"type" varchar(40),
"ferry_from" varchar(50),
"ferry_to" varchar(50),
"ferry_time" varchar(10),
"ferry_type" varchar(20),
"restrictio" varchar(20),
"access" varchar(30),
"amended" date,
"usage" varchar(64),
"location" varchar(30),
"gis" varchar(80),
"owner" varchar(60),
"north" varchar(60),
"south" varchar(60),
"east" varchar(60),
"west" varchar(60),
"clockwise" varchar(60),
"anticlockw" varchar(60),
"imperial" int4,
"metric" int4);
SELECT AddGeometryColumn('','strategi_point','the_geom','27700','MULTIPOINT',2);
INSERT INTO "strategi_point" ("code","legend","file_name","number","name","number0","admin_name","type","ferry_from","ferry_to","ferry_time","ferry_type","restrictio","access","amended","usage","location","gis","owner","north","south","east","west","clockwise","anticlockw","imperial","metric",the_geom) VALUES ('5734','Administrative Detached Attribute Point','gb_north','5307',NULL,NULL,'ISLE OF MAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'20000413',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'-9999','-9999','0101000020346C000000000000302A0A4100000000304F1C41');

and then lots more inserts all looking much the same.

I have tried all sorts of variations; with and without SRID; with and without .prj file; created a new test database with no other data; using simple geometries; but all to no effect.

I have made zip file of shapefile available if anyone has the time to try this themselves:

http://www.passback.org.uk/tmp/admin_font_point.zip

I am using a fully up to date Fedora 14, Postgres 8.4.6, PostGIS 1.5.1.

Some updated notes based on the suggestion to use SPIT:

If I use shp2pgsql in "create table only" mode I get a table with the following constraints:

Check constraints:
    "enforce_dims_the_geom" CHECK (st_ndims(the_geom) = 2)
    "enforce_geotype_the_geom" CHECK (geometrytype(the_geom) = 'MULTIPOINT'::text OR the_geom IS NULL)
    "enforce_srid_the_geom" CHECK (st_srid(the_geom) = 27700)

Looking at the table created by SPIT I get slightly different constraints:

Check constraints:
    "enforce_dims_the_geom" CHECK (st_ndims(the_geom) = 2)
    "enforce_srid_the_geom" CHECK (st_srid(the_geom) = 27700)

I guess I could use shp2pgsql -p to create the table and then use psql to remove the enforce_geotype_the_geom constraint and my bulk import from the command line using shp2pgsql -a should work.

I would still like to understand why that constraint is causing a problem?

Thanks,

Keith.


texts: How to make a 10.0 ArcMap AddIn project valid for ArcGIS 10.3 SDK?

texts:
I have a ArcGIS 10.0 AddIn project that I've succeesfully re-targeted to 10.3.  I can successfully compile (Visual Studio 2012). and works as expected in ArcMap 10.3.1.  But when I attempt to add a new component

I get this error:

  Invalid ArcGIS Add-in Project. Unable to add new Add-in item to this
  project.

Has anyone else encountered this issue?


texts: Joining two polygon layers based on distance?

texts:
I'm new to GIS so this question may be an obvious one.

I have one polygon layer of urban land use and another polygon layer of swamps.

How do I join the two layers so that I get a column in the attributes tables that gives me the distance of the closest land use polygon to that of each swamp?


texts:
I am working on a viewer in which I would like to show two related feature classes. If I select a feature of the first one, the related features of the second one should be selected too.
I found a script on the Esri Resource Center:
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_query_related.html

My problem is that I can't get the relationship in de Mapserver. We run ArcGIS Server 9.3.1.

I created a "Relationship class" in the database. This relation works fine in ArcMap but when I make a service of it, it disappears. Secondly I created a "Relate" in ArcMap, which worked fine there, but disappeared in the service.

What is the solution to this problem? Is it possible to create a relationship with ArcGIS Server 9.3.1? The example server from the Resource Center uses ArcGIS SErver 10.


texts: Help building SQL query to get a list of streets of a city

texts:
From two layers in PostGIS (osm_places and osm_roads), I would need to have the roads belonging to a certain city.

It would be fair enough to get the street names of all streets in a radius of X kilometers from the coordinates of the point of osm_places.

The query I'm looking for is something like

SELECT OSM_ID FROM OSM_ROADS INNER JOIN OSM_PLACES
WHERE
  DISTANCE_OF(LOCATION(OSM_ROADS), LOCATION(OSM_PLACES)) <= X AND
  OSM_PLACES.NAME = 'My City'

Can somebody point me in a direction please?

Thank you in advance,


texts:
In a shape file, I have the following structure:

id | NM_SUBDIST
1  | x
2  | y
3  | y
4  | y
5  | z
6  | z

The map is plotted according to the id's, ie the id's are subdivisions represented on the map. However, I wanted the labels to be plotted according to the 'NM_SUBDIST' column, without repeating. I am using the following function in python:

def labels():
   v = iface.activeLayer()
   idx = fields().indexFromName('NM_SUBDIST')
   vals = v.uniqueValues(idx)
   return vals

This function, return the unique values of 'NM_SUBDIST'. But I can't apply this function to the map. How can I do this?


texts: Add color palette to grey-scale land cover GeoTIFF

texts:
I have a single band grey shade tiff image which does not have a a color palette associated with it.  I need to open up the symbology and assign a color to each unique landcover class.

I am looking for where I can read up on the "how to's" of opening symbology and adding a color palette to display each classification type in a unique color.

I am using QGIS version 2.18.17

I have attempted to use some of the hints in the QGIS documentation (esp. Section 8.2 on rasters) -- however going to the screen for Properties\Style\Band rendering and selecting "singleband pseudocolor" in the drop down menu does not get me where I need to be. My data set is has 17 types of land cover in the classification so ideally I want to create a legend with a color for each cover type. I think that I want to use the Properties\Style\band rendering drop down menu option "paletted" but selecting this screen offers me no options to create or modify the layer's legend? It's a dead end.

It seems like one solution might be to go to Properties\Style\Band rendering\singleband psuedocolor and then in the bottom drop down box "Mode"choose "equal interval"  This then allows you to add additional classes to the legend. After that you can pick the colors you want for each class and then I guess go to the "Style" drop down menu at the bottom of the page an "save as"?

And you can also fill in the legend "labels" for the cover classes (e.g.,"grasslands") by entering it in the "label unit suffix" box.  Once you make an enter there you can manually edit the rest of the land cover classification names "deciduous forest" etc.  I still do not think this is the "right" way to do this but you do end up with a legend that can be saved as a .qml file that seems to work when you load it on the data set.  The reason I do not think it is the right way to do it is that "Legend" and "palette" images do not show up alongside of the "thumbnail" image at the bottom of the Properties\Style\Band rendering page.  So it works in a pinch but maybe someone who has been working with QGIS more than my two days will come along and explain how to do it right!


texts:
I am new to JSON and GeoJSON and would like to start to use this but I am a little confused about some things. Perhaps you can help me out:

1) Is there a GeoJSON validator out there?
2) Is the text below valid GeoJSON? To be a valid GeoJSON file do all the GeoJSON objects have to live in a GeoJSON array or can they be stored willie nellie as below?

The data below is a return from the geocouch example on github:

{
"rows": [
    {
        "id": "augsburg",
        "bbox": [
            10.898333,
            48.371667,
            10.898333,
            48.371667
        ],
        "geometry": {
            "type": "Point",
            "coordinates": [
                10.898333,
                48.371667
            ]
        },
        "value": [
            "augsburg",
            [
                10.898333,
                48.371667
            ]
        ]
    },
    {
        "id": "oakland",
        "bbox": [
            -122.270833,
            37.804444,
            -122.270833,
            37.804444
        ],
        "geometry": {
            "type": "Point",
            "coordinates": [
                -122.270833,
                37.804444
            ]
        },
        "value": [
            "oakland",
            [
                -122.270833,
                37.804444
            ]
        ]
    }
]

}


texts: Copying layers between WebMaps on ArcGIS Onlinr?

texts:
Background:

I am/have created a "Master" WebMap and topic specific WebMaps on ArcGIS Online that will be used in creating multiple Web AppBuilder apps.

The Master WebMap has multiple (40+) external web services as well as my own services created in ArcMap.

The Issue:

I am looking to create new WebMaps with my own services including a range of external services from the Master WebMap to these new WebMaps. I do not want to re-add the layers again for each new WebMap as I have created custom scales/symbology/popups that I would not like to redo!

From what I can see there is no information on this online. Has anyone any information if this is even possible?


texts: Extracting polygons by attribute in batch processing using PyQGIS?

texts:
Reference taken: https://www.bradley365.com/qgis/split-layer-by-attribute.html

I took reference from above mentioned site and wrote:

import processing
input = 'D:\Geo_Data\maps-master-Saikat\maps-master\States'
field= 'State_Name'
operator = 0
value = 'Goa'
output = 'C:\Users\rpatro\Desktop\osm\Output'

processing.runalg('qgis:extractbyattribute',input,field,operator,value,output)

But its showing:

Can anyone help me to solve this error?

I am a bit new to scripting and all.


texts: Does QGIS have something like the MS Office macro recorder?

texts: I would like to use python console in QGIS to automate tasks. Is there something like a macro recorder in MS Office to get the python commands?


texts: Can I set the Project in QGIS to display data at Zoom Full on startup?

texts:
I have a project with several .qml files assigned to SHP files with the same name but different data. I am just changing the SHP files, but when I start the project with different SHP I see just the blank map. I can click on Zoom Full but I would like to have the Zoom Full on startup.

Is it possible to set the project to display data at Zoom Full on startup?


texts: How to remove black artifacts on map in QGIS

texts:
How can I remove the black pixels on the shapefile below?

I have never seen this before after receiving a shapefile and categorizing it. This shapefile shows percentage of flooded area per municipality. I'm displaying polygons here (municipalities) but I can't get rid of the black pixels. Are they no data values?


texts: Interpolation layer not moving by time slider using ArcMap

texts:
I have  temporal point data and time slider works well for points , but while I use IDW interpolation the interpolation raster is fixed and does not change by time slider.
Is there any way to move this raster by  time slider?
I'm using ArcMap  10.6.

According to the picture above, as I move time slider my attributed with time points change, but the interpolation raster is fixed, while I want that to change as time change.


texts:
I have a BBOX area of my county. I serving the OSM tiles (Apache 2) from a local disk using openlayers 2 XYZ scheme. How can I prevent loading non-existent files out of my BBOX area? I have 8 zoom levels with around 400k tiles.

I managed to "disable" the visibility of non-existent and pink tiles with a CSS trick but I can't prevent the browser reading these files.

I always got these errors in browsers console (there are hundreds of them):

Failed to load resource: the server responded with a status of 404 (Not Found)

OL2:

new OpenLayers.Layer.XYZ("OSM Offline",
  ["http://localhost/csongradm/${z}/${x}/${y}.png"],
    {
      numZoomLevels: 18,
      visibility: true,
      sphericalMercator: true,
      isBaseLayer: true,
      buffer: 3
    })


texts: Getting all attributes summarized from one layer in area of another layer using QGIS?

texts:
I have two shapefiles, one is the squares and other from the buildings on it.

The shapefile of buildings have differents attributes like the state of the building (separated in good state, regular state, bad state).

I want to the get all the attributes from the buildings summarized by square. For example: How many buildings are in good state or bad state per square.

Is there any tool in QGIS that does that?

I tried with spatial join, but did not work.


texts:
I am new to using the graphic modeler and I do not know how to do certain actions.
I have several treatments to perform on the basis of a buffer zone. Indeed, I have to polygonize 2 raster (which we will call A and B). After the polygonization of "A", other treatments follow each other using A. But after the treatment of "B", nothing continues. (I'll let you see the diagram to better understand)
Currently, the polygonization treatments are one by one. Now, in order to save time, I would like the polygonization of A and B to be done at the same time, in parallel.
Do you know if it is possible to do this and, if yes, how?
If it's possible only on Python, I can export the Modeler's script and add the function.

<--What I have :<--What I would like to have.


texts: Create FeatureDataSet in geodatabase with Arcpy from a table

texts:
I create an empty file geodatabase (gdb), and I would like to import in this gdb several feature dataset, at least 120 different dataset. I would like to import those dataset from a table like an excel table.

I try to do this with the python command with something like :

arcpy.CreateFileGDB_management("C:/data/arcgis/gdb", "gdbTemp.gdb")
<Result 'C:/data/arcgis/gdb\\gdbTemp.gdb'>

>>> import arcpy
from arcpy import env

env.workspace = "C:/data/arcgis/gdb"
arcpy.CreateFeatureDataset_management("C:/data/arcgis/gdbTemp.gdb",

...

From the last line I don't know how to :

import my spreadsheet
tell I want for each line of the spreadsheet a new feature Dataset in my geodatabase

My actual spreadsheet looks like that, Its is very basic with only the name of the dataset (I want to go step by step).

So, I would like to create for each row a new dataset in the geodatabase.

I found something for an other post, It seems to be a good starting point :

fdList = [...]

Here I could make a command that get back from the spreadsheet the name of all my future dataset.

Then with a loop, add them on the geodatabase :

for fd in fdList:
    arcpy.CreateFeatureDataset_management(""C:/data/arcgis/gdbTemp.gdb"", fd, "I:/python/MultipleFD2GDB/2229.prj")

I need to do this with the python command (is this arcpy?)


texts: Splitting overlap between polygons and assign to nearest polygon using PostGIS?

texts:
My question is quite related to the unanswered Split overlap between polygons into disjoint sets except I'm not using shapely, I'm using PostGIS 2.4 on PostgreSQL 10.

I have a table containing multipolygons for administrative units. The geometries only cover land area. My goal is to extend them a given distance into the water.

To extend the current polygons into the water, I do a buffer followed by subtracting all other geometries in the table. This clips the buffer where the geometry has neighbours and retains the buffer where the layer currently has nothing. So, something like:

SELECT c1.name
     , ST_Difference( ST_Buffer( ST_Union(c1.geom), 250 )
                    , (SELECT ST_Union(c2.geom)
                         FROM foo.county AS c2
                        WHERE c2.name <> c1.name)
                    )
  FROM foo.county AS c1
 GROUP BY c1.name;

However, this of course gives me overlapping buffers where two polygons meet each other at the water's edge, as well as across narrow straits:

(Note that the small purple sliver on the left should be completely assigned to the red polygon, as no point in that geometry is closer to blue than red due to the appendix-like peninsula.)

This is where I'm stuck. I want to cut the overlaps (purple parts) into two disjoint polygons along a line equidistant to the unbuffered polygons, and then subtract those slivers from the buffered counties.

I don't think I have a case of three or more overlapping buffers. I'll cross that bridge if and when I get to it.

It smells to me like something similar-but-not-quite-identical to using ST_VoronoiPolygons but around polygons instead of points.

Does this exist either - ideally - as PostGIS functions, as QGIS geoprocessing functionality or maybe in some python libraries?


texts: Using double map function in Python API of GEE to get an annual time series by reducing a collection to monthly and then anuual

texts:
I have tried to compute an annual time series using python API. I have used two map function to iterate over years and month to get a time by reducing a collection of L8 image to a monthly image collection by years and then to annual series.
I used a partial function from functools to accomplish the same. But, it shows a value error:ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them
from functools import partial

def daily2monthly2annual(year, ndvi_collection):
    months = ee.List.sequence(1,12)
    ndvi_coll_ann = ndvi_collection.filter(ee.Filter.calendarRange(year, field = 'year'))

    img_coll= ee.ImageCollection.fromImages(
        months.map(lambda month:
                  ndvi_coll_ann \
                  .filter(ee.Filter.calendarRange(month, field = 'month')) \
                  .reduce(ee.Reducer.mean()))

    )
    img_coll = img_coll \
        .reduce(ee.Reducer.mean()) \
        .rename('ndvi') \
        .addBands(ee.Image().constant(year).float().rename('year'))
        .set('year',year)
    return img_coll

def int_yearly_ndvi(ndvi_coll, start, end):
    """Function to integrate observed NDVI datasets at the annual level"""

    years = ee.List.sequence(start, end)
## need to change the scope of this varibale to global
    img_coll = ee.ImageCollection.fromImages(
        years.map(partial(daily2monthly2annual, ndvi_collection=ndvi_coll)
    )

    return img_coll

Then I tried without the partial function.
def int_yearly_ndvi(ndvi_coll, start, end):
    """Function to integrate observed NDVI datasets at the annual level"""
    def daily_to_monthly_to_annual(year):
        months = ee.List.sequence(1,12)
        ndvi_collection = ndvi_coll
        ndvi_coll_ann = ndvi_collection.filter(ee.Filter.calendarRange(year, field = 'year'))

        img_coll= ee.ImageCollection.fromImages(
        months.map(lambda month:
                  ndvi_coll_ann \
                  .filter(ee.Filter.calendarRange(month, field = 'month')) \
                  .reduce(ee.Reducer.mean()))
             )
        img_coll_ndvi = img_coll \
            .reduce(ee.Reducer.mean()) \
            .float() \
            .rename('ndvi') \
            .addBands(ee.Image().constant(year).float().rename('year')) \
            .set('year',year)
        return img_coll_ndvi
    years = ee.List.sequence(start, end)
    img_coll = ee.ImageCollection.fromImages(
        years.map(daily_to_monthly_to_annual)
    )

    return img_coll

The above function is working perfectly with this aoi:'users/amitghosh/ER/IN/KillaiRF' but throwing an error with this aoi: 'users/himal781/Indonesia_AOI'
Error massage : Collection.toList: Error in map (ID=1): image.select: Pattern 'ndvi' did not match any bands
I think the issue is related to the missing scenes in some months. Then how to get the month number dynamically?
Or is there a better approach do the same?
Here are supporting function/code that you need to reproduce the same.
def rename_band(img):
    img = img.select(['B4', 'B5', 'pixel_qa'],['Red', 'NIR', 'pixel_qa'])
    return img

def CalcNDVI(img):
    """compute the ndvi on renamed bands"""

    red = img.select('Red')
    nir = img.select('NIR')

    ndvi = nir.subtract(red) \
        .divide(nir.add(red)) \
        .multiply(10000) \
        .rename('ndvi') \
        .set('system:time_start', img.get('system:time_start'))

    return ndvi

######################################################
i_img_coll = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
aoi = ee.FeatureCollection('users/amitghosh/ER/IN/KillaiRF')
#aoi = ee.FeatureCollection('users/himal781/Indonesia_AOI')
i_img_coll = i_img_coll.filterDate(f'{2016}-01-01', f'{2020}-12-31').filterBounds(aoi)
i_img_coll = i_img_coll.map(rename_band)
ndvi_img = i_img_coll.map(CalcNDVI)
int_yearly_ndvi =int_yearly_ndvi(ndvi_img, 2016,2020)


texts: Filter layer to show features from -180 to -90 days from today

texts:
I want to filter a polygon layer (in a esri file geodatabase) to show features from 180 to 90 days in the past from today (ca 2020-02 to 2020-05). The expression I try with is working in "Select by expression":
("ANDRING_DA" > (now() -  to_interval('180 days'))) AND ("ANDRING_DA" < (now() -  to_interval('90 days')))

But not when right-clicking - filter:

Why, and how can I fix it?


texts: Changing location of plugin folder in QGIS 3?

texts:
I want to change the default location of the plugin folder in QGIS 3.
The reason is that the default location is read-only, but I want to create and use self-made plugins.
Can I change the location somehow?


texts: I am working with several layers - a single vector layer, with a minimum of two delimited text layers. I have tried a number of times to open the attribute table for each of the layers, but selecting "Open Attribute Table" only shows a table for the most recently added layer. Try as I might, I cannot open the attribute table for the vector layer or my first delimited text layer. I have tried doing so by selecting the layer in the layer order panel, as well as in the layer styling panel. Nothing. The same attribute table opens over and over again, and I cannot find any guidance online about what my issue might be. I'm sure the solution is a simple one, but my understanding of QGIS is limited and basic.


texts: Masking GeoTIFF file after GeoJSON through rasterio - "Input shapes do not overlap raster"

texts:
So my intention is quite simple:
I have a 4-Band TIFF file I want to crop after a polygon shape. However, I'm getting the following two exceptions

WindowError: windows do not intersect
ValueError: Input shapes do not overlap raster.

after running this code

with rasterio.open(raw_filename) as dataset:
   out_image, out_transform = rasterio.mask.mask(dataset, [polygon], crop=True)

Now this seems really strange to me because the same polygon was used to query my data. Moreover, I made sure there's a 100% overlap between them
prior to downloading and I can see it that the areas overlap.

My polygon is the blue box below:

with the values:

print(polygon)
# {'type': 'Polygon', 'coordinates': [[[36.044253, 5.166209], [36.044253, 5.180148], [36.061434, 5.180148], [36.061434, 5.166209], [36.044253, 5.166209]]]}

And my file looks something like this:

image = rasterio.open(raw_filename)
rasterio.plot.show((image, 1))

which might not mean much to you, but I can guarantee that's in there.

Digging a little bit on my own I came to the conclusion that there ought to be something in the configuration of the GeoTIFF file that's not compatible with / adjusted to my polygon coordinates, most probably through the dataset.trasnform affine transformation matrix as seen here.

My file's aforementioned matrix, bounding box and coordinate reference system are as follows:

print(dataset.bounds)
# BoundingBox(left=160803.0, bottom=567978.0, right=187356.0, top=581073.0)

print(dataset.transform)
# | 3.00, 0.00, 160803.00|
# | 0.00,-3.00, 581073.00|
# | 0.00, 0.00, 1.00|

print(dataset.crs)
# +init=epsg:32637

Does anyone have any insight into why this might happen?


texts: PyQGIS script to merge vectors from a directory won't work

texts:
I've run the command manually and compared it to what my code prints on input and I can't figure out why this isn't working. Can anyone see the error?
import glob,
import os
import processing

path = "/Users/me/dir/"
os.chdir(path)
filelist = []
for fname in glob.glob("clip_" + "*.shp"):
    uri = path + fname
    filelist.append(uri)

fileliststring = ','.join(filelist)

processing.run("native:mergevectorlayers",
{'LAYERS': "[" + fileliststring + "]",
'CRS':None,
'OUTPUT': path + "merged.shp",})

When I print(fileliststring) the string is identical to the file format/names as far as I can tell. The error I get is:
   Traceback (most recent call last):
  File "/Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "<string>", line 13, in <module>
  File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 106, in run
    return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
  File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 137, in runAlgorithm
    raise QgsProcessingException(msg)
_core.QgsProcessingException: Unable to execute algorithm
Incorrect parameter value for LAYERS


texts:
I need to count how many times I executed a Pyhthon script in QGIS and I would like to do so by using a project variable as counter. However, I can only create them as string, thus I can't perform mathematical operations with them (count = count + 1).

Is it possible to change their type to integer or to create a counter using pygqis?


texts:
I am trying to convert a point file, currently displayed into a contour file. The methods that I have tried, all expect a raster file as an input, but my source file is a vector file points, i.e.

I have tried the gdal colour plugin with the following results

Not what I was expecting, I was hoping for a blob that represented the deep red in the first image and perhaps some other bands. There must be a better way of doing this unless I have missed something important! Any sugggestions?


texts: Does anyone have aquifer depletion/recharge data for China, India, or any other country that isn't the United States?

texts: Im doing a project for my capstone class in Geoenvironmental Studies and i am having a hard time finding data for aquifers in other countries.


texts: Creating an ArcGIS algorithm to assign land-use classification

texts:
I am working on a project based in Ireland. Part of this project requires me to take the small areas (according to 2016 census data, in which there are 18,500 polygons) and classify their land use into Urban, Suburban, Rural Background and Rural.
I'm using ArcGIS and was just wondering if there's any way of creating an algorithm which will automatically assign these polygons their classification?
For example, if I were to take a sample of 50-100 and classify them manually, then based off this the algorithm could assign the rest.
I really don't fancy manually assigning a classification one-by-one to 18,500 polygons.


texts: How to export coordinates of selected nodes with ArcMap?

texts:
In ArcMap, I imported a .shp file with .dbf file.  In the .dbf file, there is an attribute that denotes the node type. In ArcMap, by the menu "Selection > Select by Attributes", I chose the nodes that I want. The nodes chosen became light-blue.

Now, how can I export the location coordinates of the chosen nodes with their node names? The node names are attributes recorded in the .dbf file.

This is my first time to use any GIS software, so please be patient.


texts: Calculate length of line across zones with at least m accuracy

texts:
I have created lines between multiple points that are across MGA 54 and 55S (EPSG 28355). I am trying to calculate the distance between points but different methods give different answers (~1km difference).

All data is in GDA94 (EPSG 4283 as it en composes both projections)

ArcGIS - !Shape.length@meters! gives 467.799 (based on
http://blogs.esri.com/esri/arcgis/2011/07/21/calculating_geodesic/)
Xtools - Gives 468.627Km
OziExplorer - gives 466.310Km (Great Circle)
             and 466.319Km (Rhumb Line)
Spider (arcgis) tool - 4.401 (DGMS) http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=1C1927D6-1422-2418-8809-3BA43CBD435C

If anyone wants to try the two test points are

Normanton PO -17.669563 141.079541 to
Mareeba site (off Kirrakoppa Rd) 145.417391 -16.999263

What is the most accurate method? if any.

Source question for background is Draw line between points from multiple datasets


texts: Multiple and Sequential Parallel from line

texts:
I have a vector line and I want to create multiple sequential parallel lines of this line.

How can I do that ?

For example, in AutoCAD you can do many offsets by a determined distance, and I want to do the same in QGIS.