texts: Use map.on Click for different events (edit Drawing, Popup) on Openlayers map

texts:
I want to use the GpPluginOl3.js plugin (from the french geoportail see on gitHub (description in french)) together with popups, but I cannot use them together.

The drawing tools allow me to draw points, lines, polygons and even to edit them, but I cannot change the style, edit text or delete features. When I'm removing the popups, everything works fine.
It seems as if my code is interacting in a strange way with the code of the drawing tools.
I've observed the following three cases:

clicking on feature => shows popup with correct values of my placeholders
clicking on new drawn polygon => nothing happens when trying to change style, edit text or delete this polygon
clicking on a new drawn polygon, that overlaps with an existing feature => popup shows up, but placeholders don't get replaced with values AND the popup for styling, editing shows up and new drawn polygons can even be deleted.

Here the code I use for my popups:

    var popup = new ol.Overlay.Popup();
    map.addOverlay(popup);

map.on('click', function(evt) {
    var popupContent = map.forEachLayerAtPixel(evt.pixel,
        function(layer) {
            return layer.get('content'); // template-string of layer
        });

    var feature = map.forEachFeatureAtPixel(evt.pixel,
        function(feature, layer) {
            return feature; // get feature at pixel on layer
        });

    if (feature) {
        popup.setPosition(evt.coordinate);
        var atts = feature.getProperties(); // object
        for (var prop in atts) {
            var re = new RegExp("{" + prop + "}", "g");
            popupContent = popupContent.replace(re, atts[prop]); // replace {placeholder} with values of feature
        }
        popup.show(evt.coordinate,popupContent);
    }
    else {
        popup.hide();
    }
});

In the console I get the following security error:

SecurityError: The operation is insecure. ol-debug.js:69965
ol.renderer.canvas.IntermediateCanvas.prototype.forEachLayerAtCoordinate https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:69965:21
ol.renderer.canvas.Map.prototype.forEachLayerAtPixel https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:23693:16
ol.Map.prototype.forEachLayerAtPixel https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:32543:10
init/< https://example.com/js/map.js:797:28
boundListener https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7208:12
ol.events.EventTarget.prototype.dispatchEvent https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7628:11
ol.Map.prototype.handleMapBrowserEvent https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:32860:7
boundListener https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7208:12
ol.events.EventTarget.prototype.dispatchEvent https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7628:11
ol.MapBrowserEventHandler.prototype.emulateClick_ https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:12866:3
ol.MapBrowserEventHandler.prototype.handlePointerUp_ https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:12920:5
boundListener https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7208:12
ol.events.EventTarget.prototype.dispatchEvent https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7628:11
ol.pointer.PointerEventHandler.prototype.fireEvent https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:12668:3
ol.pointer.PointerEventHandler.prototype.up https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:12546:3
ol.pointer.MouseSource.prototype.mouseup https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:11192:7
<anonym> self-hosted:943:17
ol.pointer.PointerEventHandler.prototype.eventHandler_ https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:12468:5
boundListener https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.3.2/ol-debug.js:7208:12

Maybe someone has an idea where the problem could lie? or where i should impove my code.


texts: Estimating local disk space needed to share ArcGIS Pro basemap with TIFF image to ArcGIS Online as Tiled Web Layer?

texts:
I am using ArcGIS Pro 1.3.1 to share a Basemap, which has a single layer added from a georeferenced 17.2 Gb TIFF image (has world file), as a Tiled Web Layer on ArcGIS Online.

When I tried to share it I received an error from the Share Web Layer tool:

  Staging failed

Upon investigation I realize that this will be due to the low amount of available local disk space that I currently have which is 4.9 Gb.  I saw this being consumed as the staging was attempted.

I will start looking for what local disk space I can free up, and then re-test until it works, but is there a way to estimate how much local disk space I will need in advance?


texts: Latest version of ogr2ogr fails with Layer Creation

texts:
I am able to successfully run ogr2ogr to add S57 data to PostgresDB. The version I use is GDAL 1.7.0b2, FWTools 2.4.7 and release date 2010/01/19

I upgraded my version to GDAL 1.9.1 and release date 2012/05/16. When I run ogr2ogr on the same files, I get an error as follows

ERROR 1: Layer dsid already exists, CreateLayer failed.
Use the layer creation option OVERWRITE=YES to replace it.
ERROR 1: Terminating translation prematurely after failed
translation of layer DSID (use -skipfailures to skip errors)

Why would this happen when all things being equal? Is the latest version buggy?


texts:
I have following simple draw interaction:

draw = new ol.interaction.Draw({
    features: featureOverlay.getFeatures(),
    type: (type)
});

Now I would like to add attributes like a name and id to the feature. Is this possible? I couldn't find an awnser to this anywhere until now.

Does anyone know how to do this?


texts: Where is attribute table in ArcGIS Desktop when not visible?

texts:
I've just updated to ArcGIS 10.1 for Desktop and when I go to open an attribute table, I can not see it anywhere.

I'm wondering if it is off my screen somewhere or if its just super tiny that I can't see it.

I'm using dual monitors and it's not popping up on either.

Is there a way I can find my attribute table?


texts: I have a .shp file (downloaded by googling USGS maps + census data + tiger ), loaded the file in QGIS. It contain various road lines in a city. In the attribute table it is showing only few properties ObjectId, LinerID, FullName, MTFCC. I am trying to retrieve the other information like length of road, width etc. But I not aware where I can get that information in QGIS.


texts: Set coordinate origin to the top left corner

texts:
I have a BMP-picture and I know that it's top left corner has the EPSG:3068 coordinates 35500,24390. I would like to use gdal_polygonize and than calculate the EPSG:3068 coordinates of the produced polygons. But for that I need gdal_polygonize to assume that the top left corner is (0,0) or I need to know at which pixel the actual (0,0) is.
gdalinfo of the picture:

Driver: BMP/MS Windows Device Independent Bitmap
Files: E8256.bmp
Size is 8250, 4090
Coordinate System is `'
Origin = (-1890.000000000000000,1890.000000000000000)
Pixel Size = (3780.000000000000000,-3780.000000000000000)
Corner Coordinates:
Upper Left  (   -1890.000,    1890.000)
Lower Left  (   -1890.000,-15458310.000)
Upper Right (31183110.000,    1890.000)
Lower Right (31183110.000,-15458310.000)
Center      (15590610.000,-7728210.000)
Band 1 Block=8250x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 128,0,0,255
    ...

as you can see the top left corner is -1890,1890. I want that to become 0,0 OR to know at wich pixel 0,0 is. (Pixel size is the length of 1 pixel in coordinates right?)


texts: Why is Leaflet so slow when you add a non-trivial amount of markers?

texts:
My map is super fast and nice until I click my "houses for sale" layer, which adds less than 3,000 markers onto the map on its own L.layerGroup(). It really makes it difficult to zoom in/out and pan around. It's virtually unusable in this state. The second I click the layer away, it's again super fast. It's doubtlessly caused by the markers being rendered.

Why would less than 3,000 markers even make it go slower at all? Even a computer from the 1980s would be able to display such a small amount of markers on a map, no? And more importantly: how to fix it?


texts: Reverse Geocoding, Nominatim, TIGER & residential house numbers

texts:
Coming across Nominatim/Installation it says:

  In the US, the OSM instance of Nominatim uses TIGER address data to complement the still sparse OSM house number data.

Basically I'm wonder how it works? Because:

In the TIGER FTP I can't find any file (.shp) representing points/polygons of buildings, not speaking about attribute of house number. By the way: where I can find polygon of regular residential building in TIGER?
Looking at the open street map (example) I don't see a house number. Same when downloading the .shp from geofabric etc.
Checking in public Nominatim API URL there is a house number. So even if there is another source of data rather than TIGER - Why I don't see it on the open street map? Because if some part of the open street map project has the information - don't we should see it on the main map?
Even more - Sometimes the Nomination works fine even if unlike in the above example, we don't have polygon of the building at all on the map...


texts: How to avoid "No Data" from Tiled Map Service in Silverlight

texts:
I'm using the latest and greatest Silverlight with ArcGIS Server 10 and when I do a search for features in my operational layers (wells) and zoom into them I'm seeing "Map Data Not Yet Available" because there are no Tiles created at the scale I have zoomed into.  I published my Operational data from a MSD and it runs great and I added in a ESRI Streets layer service using manager.  The only way I have found to control the scales of the Tiled ESRI service is to create a Group layer in the MXD and publish the MXD straight to a service.  This will not work for me because the performance is too slow.  Does anyone have any suggestions?

Many thanks
-Josh


texts: Creating new raster from a polygon and numpy array?

texts:
In Python, I have an array of NDVI values for an area and a shapefile that bounds that area. How would you make a new raster file from that?

The NDVI values were created by using the shapefile to clip from a much larger raster and the processed into NDVI, so some info from the original raster is available. However, I would like a raster that only covers the area defined by the boundary, not the original raster.

I am working in Python with GDAL/OGR libraries.


texts: Extracting cities in Belgium using overpass API?

texts:
I would like to extract all the cities in Belgium using the overpass API.I used the following query:

area[name="België - Belgique - Belgien"]->.boundaryarea;
(
  node(area.boundaryarea)[place="city"];
);

out;

But got no result. Am I doing something wrong?

This appears to work but I have no idea why

{{geocodeArea:Netherlands}}->.searchArea;
(
nwr["place"="city"](area.searchArea);
);
out body;


texts: creating new fields and populating with sequential numbers based on grouping other columns

texts:
(Relatively new Qqis user)

I have a vector layer (lines) for a road network - which has a field for each road name and a field for road segments - but I need to add fields for numeric IDs rather than string; so I'd like to be able to assign a numeric road ID to the group of records for each road name and I'd like to assign a sequential ID to each segment for each road ID.

Example: I have 5 segments for "Main st", I'd like to assign a numeric id of 1 to Main street and each segment to have an incremental id as well so they can be identified as 1-1, 1-2, 1-3, 1-4, 1-5 and so on...


texts: Changing line type for boundary of two vectors?

texts:
I currently have two vector shapefiles containing polygons representing health geographies of England and Wales.

I would like to be able to change the line type for the boundary/lines between the orange and purple regions (Wales and England), in terms of thickness, colour, solid/striped/dot dash etc.


texts: Query a GDALDriverH or GDALDriver without a dataset to find out if it is raster or vector?

texts:
Is there any way to query a GDALDriverH (in C) or GDALDriver (in C++) to determine if it works for vector formats or raster formats (or with both, such as fGDB)?
In my iOS app utilising GDAL 2.2, I am building a list of all available drivers, and a I want to inform the users which Vector drivers are available without displaying raster drivers.
At present, I can only figure out how to display all drivers (both raster and vector).


texts: Arcmap delete feature class after is closed?

texts:
I am facing a strange problem using ArcMap.

Sometimes applying geoprocessing (Buffer,Clip,intersect) or any other tools like "feature to polygon", when I close ArcMap the new feature class is deleted by itself (no matter if it is inside geodatabase or shapefile). It looks like ArcMap delete it automatically.

While ArcMap is open I can do what I want to feature class (copy,export,geoproccesing), i can see the feature class at windows explorer or ArcCatalog but after closing ArcMap it will be deleted and cannot be found even in recycle bin.

This strange problem does not happen everytime, in fact I cannot find or predict when this will happen.

I have tried to replace the arcmap folder "\AppData\Roaming\ESRI", but this doesn't solve the problem.

Does any of you had this kind of problem???


texts: Changing values of slope along polyline to 0 using ArcGIS Spatial Analyst?

texts:
In ArcGIS 10.1 (advanced license), I have a slope raster of a given area and a polyline.

I want to set the slope values along the polyline to 0.

I'm thinking of this process - extract the cells along the polyline using the Extract by Mask tool, then reclassifying those cells giving a 0 value, and then using a conditional statement in Raster Calculator to substitute (in the general area's slope raster) the polyline cells with those cells which now have 0s.

I am not sure this is a good solution and I cannot figure out what the conditional statement should look like.


texts: Set QGIS 2.18.7 on OSX - 10.12 to use GRASS 7

texts:
I read this  post, I read this post.
I installed Qgis 2.18.7 (package maintained by William Kyngesburye), which contains GASS 7.0.4 with disable SIP.

I executed what the post says, but in the "Grass7Utils.py" file the specified string was correct. So I did not get any results

Grass7 works normally while the Qgis plug-in does not fire and returns the following error:

GRASS init error: GRASS was not found in '/Users/Shared/unix/grass-qgis-mtlion/grass-7.0.4' (GISBASE), provider and plugin will not work.

Do you have any suggestions for this problem?


texts: Doing watershed delineation properly using ArcGIS Desktop?

texts:
I am using ArcGIS Desktop 10.2.

I have the contours and the stream in AutoCAD Civil, after converting to a  shapefile, I exported them in GIS,

after I created the TIN from the contours below:

next I created the raster with the command TIN to raster :

after creating the raster, I started using the arc-hydro tool, with DEM recognition, using the raster and the flowline, but I don't think the result of the AgreeDem is proper:

Continuing with the fill sink option using the AgreeDem

after I did the flow direction part using the fill sink's results:

the next step is flow accumulation using the results from flow direction, but I don't think that the streams should be divided like I have in my results

in stream definition I can obviously  see that the results aren't as they should be, because there is no connection between the streams

and if this part isn't proper neither the stream sedimentation nor catchment will be properly done
or the catchment polygon which has same strange square shapes in some parts

I have tried several times, but I don't know what to do in order to get the right results.


texts:
I'm converting a map from geojson to topojson, and I'd like to validate that the conversion is ok.

Unfortunately QGIS doesn't seem to support topojson yet.

I've found this excellent MapBox application http://geojson.io/, that worked really well, but now is giving me a strange error.

So I'd like to know what editors/viewers are there available with topo


texts: Replicate results from JSI using PostGIS

texts:
I am using OSM and facing an issue with finding the nearest road-segments to a given lat/lon point.

I have a code that uses Java Spatial Index JSI which traverses the RTree index while computing the distance between the lat/lon point and the bounding rectangle of the objects using the distance-function.

Now I am trying to implement the same functionality using PostGIS. After some reading I ended up with the following SQL query:

SELECT osm_id FROM planet_osm_line
WHERE way <#> ST_Transform(ST_SetSRID(ST_MakePoint(:plon, :plat), 4326), 900913) < :range

where :range is the max distance in meters.

My questions are

Is the use of the <#>? my understanding is that this function would calculate the distance to the edges of the BB, although I don't know how exactly.
Is the transformation to 900913 correct? Does this compute the distance between 2 geometries or geographies? I am confused with the relation between SRIDs and the use of geography in the computations of distances.
Does using the <#> in the WHERE clause utilize the index of the table? I found some references stating that the function will utilize the index only when used with ORDER BY clause.


texts: How to log into ArcGIS Online for organization from ArcMap?

texts:
I am using ArcGIS 10.2.1 for Desktop and have access to ArcGIS Online for organization.

Is there any way I can log into AGO for organization from ArcMap?


texts: Seeking outline coordinates of bodies of water (lakes, rivers, ponds) for country?

texts:
I'm in need of acquiring the coordinates of the outlines of all the water bodies inside a country, with the exception of "Sea" or "Ocean" water. Right now, I'm manually outlining the lakes and rivers but it is not a sustainable solution for the magnitude of the research I'm doing.

Even if I can only obtain the data of Lakes or Rivers, that would be a great start. I'm specifically interested in the countries of Malaysia, Brazil and the Dominican Republic.

My situation brings me to the question of, where does google obtain its data and are they available?


texts: Python GUI for QGIS plugin ; 'ModuleNotFoundError: No module named...'

texts:
I am overhauling my QGIS plugin to work with QGIS 3.0.

I have hit a problem relating to the importing of custom forms created using the Qt Designer. In the old version (which worked, with QGIS 2.x) I had imports like this at the top of the main module:

import resources
from xyz_dialog import XYZDialog

Now, in both of the above cases, I get a ModuleNotFoundError (for instance "ModuleNotFoundError: No module named 'resources'").

The specific case of the 'resources' import is discussed in ModuleNotFoundError: No module named 'resources', although this does not reach much of a conclusion. The suggested workaround of using 'from resources import *' does not work for me (and I believe that the use of 'import *' is generally discouraged?).

As far as my form is concerned, I don't think I am doing anything differently from my previous implementation, which worked. There is a file called xyz_dialog.py in the plugin folder and it does contain a class called XYZDialog. So I am not sure why it should not be found.

Further specifics (referring to a different form, but the issues are exactly the same as above):

In the main .py module I have this:

from ais import AISForm

I have got a corresponding form, with these files:
ais.py
ais.ui

ais.py contains the following:

import os

from PyQt5 import uic
from PyQt5 import QtWidgets

FORM_CLASS, _ = uic.loadUiType(os.path.join(
    os.path.dirname(__file__), 'ais.ui'))

class AISForm(QtWidgets.QDialog, FORM_CLASS):
    def __init__(self, parent=None):
        """Constructor."""
        super(AISForm, self).__init__(parent)
        # Set up the user interface from Designer.
        # After setupUI you can access any designer object by doing
        # self.<objectname>, and you can use autoconnect slots - see
        # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html
        # #widgets-and-dialogs-with-auto-connect
        self.setupUi(self)

If I take out the line 'from ais import AISForm' from the plugin code, it loads.

If I leave it in, it does not load due to the error "ModuleNotFoundError: No module named 'ais'"

(I have taken out, for now, 'import resources'. I don't see that I need it, and it causes the same ModuleNotFoundError as the form imports.)


texts: How to compute the routing through N addresses/coordinates?

texts:
I have a set of N coordinates (addresses). My goal is to compute the shortest driving route through the set of coordinates, where the algorithm (not the user) decides which of the N coordinates should be the start point and which of the N - 1 coordinates (excluding the start point) should be the end point.

Can this be done and which algorithms are used for this kind of routing?

By assuming that the routing can be done using the arial distance between the coordinates instead of roads, how could I then solve my problem?

At this stage of my questioning, I am trying to determine how to solve the problem in theory but the tools at hand are a PostGIS database and anything I can implement my self in C# .NET. If any free libraries can help me, then they can be considered too :)


texts: How to convert geospatial data with a custom SRS into ESRI Shapefiles?

texts:
I want to convert geospatial data stored in a .csv file into GeoJSON or ESRI Shapefiles. The problem is that the coordinate reference system is not in the database of EPSG codes. The originator however provides a .prj file with the relevant information.

// ETRS89_UTM_Zone_33_BB_6stellig.prj
PROJCS["ETRS89_UTM_Zone33_6",
  GEOGCS["GCS_ETRS_1989",
    DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]
  ],
  PROJECTION["Transverse_Mercator"],
  PARAMETER["False_Easting",500000.0],
  PARAMETER["False_Northing",0.0],
  PARAMETER["Central_Meridian",15.0],
  PARAMETER["Scale_Factor",0.9996],
  PARAMETER["Latitude_Of_Origin",0.0],
  UNIT["Meter",1.0]
]

Source: Landesvermessung und Geobasisinformationen Brandenburg


texts:
In the copyright section of a mapboxgl map using a Mapbox Studio style, I see the message "Improve this map", which links here (https://www.mapbox.com/map-feedback/). Where is this link stored or how can I remove it?

I can only set it false, but then no text is shown. I do want to credit Mapbox and OSM:

    var map = new mapboxgl.Map({
        container: 'map',
        style: 'mapbox://styles/myname/mystyle',
        attributionControl: false,
        center: [10, 30],
        zoom: 1
    });


texts: Getting for loop which stops after first one to iterate properly?

texts:
I originally asked UpdateCursor can't acquire lock, but can acquire lock in TestSchemaLock and got some help about why my code wasn't acquiring a lock.

My new problem is that my code isn't fully iterating, and I'm not sure why. My intention is that when I select each buffer used for clipping, I want the buffer to run a clip, create a clip output with that name, add and calculate fields, and then move on to create the next clip. There are 27 buffers (buff_id numbered 1 through 27), so that each clip output should be called "LS[buff_id]". It runs through LS1 just fine, giving me exactly what I expect, with the fields calculated, but then it doesn't move on to buff_id 2 to give me LS2 and so on.

What am I doing wrong?

Here's the code I'm using now:

import arcpy
import os.path
arcpy.env.workspace = "C:/Users/melis/Documents/HenryWork.gdb"
arcpy.env.overwriteOutput = True
buffer = "LS_buffer"
landcov = "ForestLC_clip"

#create list to access table. may need to change field name with other data. builds a list of all buff_id values.
AllBuffID = [r[0] for r in arcpy.da.SearchCursor(buffer, ["buff_id"])]

for thisBuffID in AllBuffID:
    #select one buffer
    query = """ "buff_id" = %s """ %thisBuffID
    arcpy.SelectLayerByAttribute_management(buffer, "NEW_SELECTION", query)

    #define clip out path
    clip_out = "LS" + str(thisBuffID)

    #clip w one buffer
    arcpy.Clip_analysis(landcov, buffer, clip_out)

    #add fields to clip_out
    arcpy.AddField_management(clip_out, "clip_id", "TEXT", 20)
    arcpy.AddField_management(clip_out, "area_ha", "FLOAT")

    #create updatecursor for new clip_out
    with arcpy.da.UpdateCursor(clip_out, ["clip_id", "area_ha","SHAPE@"]) as clipCursor:
        for polys in clipCursor:
            #calc geom for area ha, project to UTM and calculate from the area
            polys[1] = (polys[2].area) / 10000 #A hectare is 10000 square metres

            #field calc for buffer id
            polys[0] = thisBuffID
            clipCursor.updateRow(polys) #IMPORTANT commit the update


texts: Select features from the attributes table without opening it in QGIS

texts: I have an attribute table with a vast amount of data in QGIS. I need to export only some of the features. Is there any way to select features without opening the attributes table?


texts: How to add filename as attribute of shp file in FME?

texts:
I'm not familiar with FME, so normally I only use auto-generate.

Because I need to extract the filename and put it as an attribute in the shp file, so I try to add the transformer like this.

But the ouput file is duplicate data like this

How do I fix that?


texts: Altering SQL View GeoServer from application

texts:
I am making an application and I want to access a lot of weather data.

Now I want to use the SQL View option to let the WMS layer know which timestamp to use and then it shows me all the data from that moment on a map.

Only I want to be able to do this for all the data in my database. I want my end-user to be able to enter the date they want to see. I want them to see a timeslider for that day AND an extra option which lets them type in a date and then that data will be shown in the application.

Is this possible?

(The data is in a PostGIS database, the application is written in HTML, JSON and JavaScript, is working with npm and OpenLayers and running on Tomcat.)


texts: How to merge overlapped shapefiles without one layer's overlapping area?

texts:
I created a forest type map from 50 scene satellite images as shapefile under the following conditions.

Some shapefiles are overlapped, because scene overlaps each other.
There is an order of shapefiles in the table of contents.
Merged file has to be follow the order. It means below shape file is not necessary in the overlapping area.

It is possible merging files, if I clip one by one, even though it takes a time.

Please let me know, if someone knows a more efficient way to resolve this issue.


texts: Do new QGIS installation packages uninstall or override any previously installed versions of QGIS?

texts:
My organisation has restricted installing software on all workstations to I.T. administrators only, so I am not able to check this myself.

All applications, including QGIS, are pushed through Software Center.  Recently, they pushed QGIS 2.18.8 and it removed the last LTR version of QGIS and latest 2.18.6 version, from everyone's workstation.  I wanted to confirm, would the new QGIS 2.18.8 installer have uninstalled both the previously installed QGIS versions, or could it be something set in the Software Center distribution/installation process?

We would like to be able to always have a LTR version of QGIS to fall back on, if the test version has issues, so I am trying to narrow down the problem.

This is different to the suggested duplicate topic in that there is a software deployment application being used and not manual installations of QGIS to individual users. I want to determine if the uninstalls are done by Software Center or by the QGIS installation package by default. We also don't want standalone versions, preferring to run multiple QGIS versions. One LTR and one Latest for testing new features.


texts: 3d earth mapping with javascript or browser plugin

texts:
I am currently working to develop a web-based mapping application. A lot of the mapping tools such as google maps are 2d imagery. I know that google earth has a 3d browser plugin, but a requirement of this project as that I need to be able to host my own map server (I know I can with Google Earth, but the enterprise edition is pricey).

Are there any good alternatives to a 3d mapping engine for the browser (I've looked into using worldwind for the browser, but that only supports applets for the web)?


texts:
With Qgis general settings and changing nothing on the preferences window, which north system (true north or grid north) will be activated ?

Would it be determined by selection datum, for instance WGS84 uses geographic north and WGS84 UTM uses grid north ?


texts:
I try to follow this example to create a map using PyQGIS in standalone script. But in my case I don't have vector layer but I have raster layer.

Here the code :

qgs = QgsApplication([], True)
QgsApplication.setPrefixPath("/", True)
QgsApplication.initQgis()
project_path = 'single_pdf.qgs'
canvas = QgsMapCanvas()
template_path = 'single_pdf_a4_landscape.qpt'
QgsProject.instance().read(QFileInfo(project_path))
template_file = file(template_path)
template_content = template_file.read()
template_file.close()
document = QDomDocument()
document.setContent(template_content)
composition = QgsComposition(canvas.mapSettings())
substitution_map = {'title': 'hi'}
raster='raster.tif'
fileInfo = QFileInfo(raster)
path = fileInfo.filePath()
baseName = fileInfo.baseName()
layer = QgsRasterLayer(path, baseName)
QgsMapLayerRegistry.instance().addMapLayer(layer)

composition.loadFromTemplate(document, substitution_map)
# You must set the id in the template
map_item = composition.getComposerItemById('Main Map')

layer.loadNamedStyle('NEW.qml')
map_item.setMapCanvas(canvas)
map_item.zoomToExtent(canvas.extent())

legend_item = composition.getComposerItemById('Legend')
legend_item.updateLegend()
composition.refreshItems()
composition.exportAsPDF('export.pdf')
QgsProject.instance().clear()

Legend work fine take legend from style, title work fine but the Main Map where I want to add my raster layer is empty, any idea why? Where I have the wrong in code? The problem is extent or some refresh?


texts: How to join external tables with a shapefile's attribute table in QGIS?

texts:
I need to join a .csv table into an attribute table of a shapefile. I wanted to do this with QGIS and i don't seem to find anyway of doing it. I know that the mmqgis plugin does it, but my shapefile has 6000 records and this plugin crashes at 2000 and something...
Any ideas?


texts:
Here's my situation:

I'm modeling travel logistics
I have 1,000 nodes, on my road network
I'd like to generate the minimum driving time distance between all these nodes
This process will be done 24 times (24 hours / day)

Is this possible?


texts: Snapping many vertices from line or polygon layer in QGIS?

texts:
I have several lines(streets) and polygons(plot layout of areas) that the shared points (lines: road intersections, polygons shared plot corner) are not connected.

Is it possible to auto snap all the points using QGIS and which tool can i use?


texts: How can I add satellite map in OpenLayers 5?

texts:
I have taken a look at this example but it requires a license from Bing maps. Is there another option to show satellite view as base layer?

var baseLayer = new ol.layer.Tile({
  source: new ol.source.OSM()
});


texts: Extract Multi Values to point error table was not found

texts:
Newbie to arcpy.  Tried using this tool after successfully using Extract Value to Point tool with same data.  I received the correct data appended to the attributes table.  I would like to use the Multi Values tool but I am getting the errors below.  I shortened the files names to avoid character limits but still unsure what this error means.
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = mxd.activeDataFrame

shpFile = "C:/Users/Documents/ArcGIS/data.gdb/shpFile"
file1 = "C:/Users/Documents/ArcGIS/data.gdb/FA290"
file2 = "C:/Users/Documents/ArcGIS/data.gdb/FA300"
arcpy.sa.ExtractMultiValuesToPoints(shpFile, [[file1, "FA290"],[file2, "FA300"]], "NONE")

Error:

Runtime error  Traceback (most recent call last):   File "",
line 8, in     File "c:\program files
(x86)\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 7345, in
ExtractMultiValuesToPoints     bilinear_interpolate_values)   File
"c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\sa\Utils.py",
line 53, in swapper     result = wrapper(*args, **kwargs)   File
"c:\program files
(x86)\arcgis\desktop10.4\arcpy\arcpy\sa\Functions.py", line 7340, in
Wrapper     bilinear_interpolate_values)   File "c:\program files
(x86)\arcgis\desktop10.4\arcpy\arcpy\geoprocessing_base.py", line
506, in      return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 999999: Error executing function. The table was
not found. [VAT_FA300] Failed to execute (ExtractMultiValuesToPoints).


texts: Dynamic update of arcpy.AddMessage progress line in dialog box?

texts:
I have a lengthy field list and would like the dialog box to show script progress on a single line, rather than returning to a new line.

what I have:
field1
field2
field3
....

current code:

for fieldName in fieldList.split(';'):
    arcpy.gp.CalculateField_management(inFeature, fieldName, "2")
    arcpy.gp.AddMessage(fieldName)

what I would like:
field1, field2, field3, ...
 I don't want to simply list the fields, but keep the list updating with a new field separated by a comma each time on the same line


texts: Getting transparent graphics in ArcGIS Desktop?

texts:
I have a point layer symbolized with a logo I created.  I have the layer set to 50% transparency.  I would like to manually rearrange these logos by converting these symbols to graphics.  Once I convert, the transparency is lost.  Is there any way around this?

I am using ArcMap 10.0.


texts: Converting WGS84 to UTM coordinates using R package gstat?

texts:
I want to convert WGS84 to NZGD2000 using R package gstat but I cannot get the right result.

   # Define the coordinate systems

   wgs_co <- data.frame(lon=x, lat=y)

   coordinates(wgs_co) <- c("lon", "lat")

   proj4string(wgs_co) <- CRS("+init=epsg:4326") # WGS 84

   #convert coordinates

   UTM60H <- "+proj=utm +zone=60 +datum=NAD83 +units=m +no_defs"

   UTM60H <- paste(UTM60H, "+ellps=GRS80 +towgs84=0,0,0")

   UTM60H <-  CRS(UTM60H)

it turns out

   [4003,] 352172.5 -4445766

   [4004,] 352174.1 -4445767
    ...
    ...

   [5000,] 352657.5 -4445754

The right coordinates should be around E 1,792,000, N 5,554,400 in NZGD2000.

Do you have any solution?


texts: Can't load PostGIS partitionned table in QGIS

texts:
I partitionned a table (over 13 millions geographic point data) in my PostgreSQL database with this statement:

CREATE TABLE data.data_fusion (
 id                BIGINT NOT NULL,
 source            TEXT,
 id_source         VARCHAR,
 id_vn             INTEGER,
 taxref_id         INTEGER,
 ...
 geom              GEOMETRY(Point, 2154),
 equipe            VARCHAR,
 exp_excl          BOOLEAN
 )
PARTITION BY LIST (equipe);

And for each child table I did create primary key and indexes like in this example.

CREATE TABLE data.data_fusion_lpo07 PARTITION OF data.data_fusion FOR VALUES IN ('lpo07');
ALTER TABLE data.data_fusion_lpo07 ADD PRIMARY KEY (id);
CREATE INDEX ON data.data_fusion_lpo07 (source);
CREATE INDEX ON data.data_fusion_lpo07 (id_vn);
CREATE INDEX ON data.data_fusion_lpo07 (taxref_id);
CREATE INDEX ON data.data_fusion_lpo07 (nom_vern);
CREATE INDEX ON data.data_fusion_lpo07 (nom_sci);
CREATE INDEX ON data.data_fusion_lpo07 USING GIST (geom);
CREATE INDEX ON data.data_fusion_lpo07 (equipe);
CREATE INDEX ON data.data_fusion_lpo07 (code_nidif_oiseau);

Actually, there is no problem to load child tables in my QGIS project, but I'm unable to load parent table 'data.data_fusion'. I've got the following error messages:

Using browser panel:

Layer is not valid: The layer dbname='dbwork' host=bdd.faura.org port=5432 sslmode=require authcfg=lpoaura srid=2154 type=Point table="data"."data_fusion" (geom) sql= is not a valid layer and can not be added to the map

Using add layer menu

dbname='dbwork' host=bdd.faura.org port=5432 sslmode=require authcfg=lpoaura key='""' estimatedmetadata=true srid=2154 type=Point table="data"."data_fusion" (geom) sql= is an invalid layer - not loaded

PostgreSQL console indicates an pk issue (no pk on parent table):

  Unexpected relation type 'p'.
  PostgreSQL layer has no primary key.

Is there a way to load my parent partitionned table into QGIS (v 2.18.14) ?


texts: How to clip all shapefiles, layers, etc associated with global map of Mars

texts: I'm working on a project where I've found an open source NASA .mxd of shapefiles, layers, metadata, geology, a 30x30 graticule that splits the lat and long into 30 degree square polygons, etc.  I only want to use data that exists between the equator and 30 degrees latitude in both northern and southern hemisphere.  How would you clip this data without having to select a region to clip by hand for all the different raster and vector layers (there are a lot of them)?


texts:
I am running g a intersection between two data sets. Both have same Projection system 27700 but still I am getting this error: ERROR:  lwcollection_construct: mixed dimension geometries: 0/2

Below query I am running:

Create table TableA as Select Clm1, Clm2, st_intersection(TableB.shape, TableC.shape)from TableB, TableC where st_intersects(TableB.shape, TableC.shape) = 'True';

Also whenever I view these tables in PGAdmin TableB's geometry can be seen but not for TableC (it says 3D geometry not rendered).

I read about this case on this website and they all are saying to set the SRID but this is not the thing because my both data sets have same SRID.

Even TableB is made by intersection of the data sets who have 27700 projection in them.

Please can any one help over it?


texts: When I edit a point, press save, it says saved, but really doesn't

texts:
I'm a newbie in GIS.
The problems starts when I import some points gather from QField.
I was improving my fields while learning, to have drop down options in some features, but now I can't save my edits.
I've copied a layer from QField to my project and now both, the new and the old data cannot be saved, you can edit, says Changes saved but really don't.
i.e.

then save, but when you click again in that point with Identify Features button, nothing changed.
Any tips?
Steps:

click one point to see the values(img1).
right click on data and Edit Feature Form..
Modify any feature, in this case, Nap de otra operadora and Cruceta, press OK
Save layer.
Click again on the same point and results in no changes in features.


texts: Why do I get green crossed circles instead when I try to move a point?

texts:
It's really horrible I must say. I sometimes have geometry issues and then try to go one by one through them and fix these cases. Therefore I mark the area points and delete them for instance. After that I doubleclick the line to create a new point. And now I often have the issue that by dragging this point I create a green circle at that position instead of just moving the point.

I would like to know why I often cannot move it and am getting these green circles instead. Also, if this is a feature, what are the green circles good for, I was thinking that sign is showing duplicated points? And the last question is, why does the point movement sometimes work, but in 80% of cases it does not?

Here a picture to make my issue a bit clearer:


texts: Is there a PostGIS function to get a tangent and normal line?

texts:
I'm looking for a function that will return a tangent (and normal) for a LINESTRING in PostGIS.  I think this is the 3rd time I've come across the need for this function and everytime, I end porting whatever I'm working on to c#/ArcObjects in order to use the QueryTangent/QueryNormal method rather than make the effort to research a PostGIS option.

Is there an existing functions in PostGIS (I'm not tied to a specific version)?

And if it doesn't exist, has anyone already written it and wouldn't mind posting it as an answer?


texts:
I have an xlsx file that has incorrect X, Y location. Essentially the false northing is out 5000000 and there's no decimal point. As you can see in the image below the current file format is on the left and format I need it in is on the right.

I can use the following FMW workflow to get the correct coordinates and export to xlsx without issue.

However, when I try to reproject the coordinates within the same workflow I can't get it to work?

This is what I'm trying to do

When I open up the exported xlsx I get the same coordinates? (like no reprojection has happened?) Any ideas what I'm missing?

(on a side note, if I open up the exported xlsx file in a new workbench and run the reprojector it works perfectly)


texts: PostGIS Out of Memory during bulk insert

texts:
I am attempting to import OSM road data using an SQL file generated by OSM2PO.  However I keep getting the following error:

  ERROR: out of memory
  SQL state: 53200
  Detail: Failed on request of size 1048576.

This would suggest there is some memory limit set in the config file to only 1MB.  However, I have set my work_mem to 16MB and my shared_mem to 500MB in the config file and reloaded it, plus completely restarted the server.  I have also tried manually setting the work_mem for the session.

The really annoying thing is that I have used this process to import a much larger dataset into PostGIS on a Netbook computer with considerably less physical memory.  I vaguely remember having to tweak some setting to do it but for the life of me I can't remember what it was and the config file looks like the original factory settings!

So, if it is not the work_mem that is at fault, which setting should I adjust? (I'm using PostGIS 2 and Postgresql 9.1 on Windows 7 32 bit).

Many thanks!


texts:
i have a layer form (named form_layer) containing a combobox and allows to add records into the related table, by showing a form  of the related table (named form_table)

When i try to add record showing first the layer form , then showing the form_table, the row is not saved when i click "ok" on the form_table (so i can't see the record in the combobox when just added despite the combobox is reloaded ) but until i go back to the form_layer and click ok.

i tried to show the form a toolbar button without calling a layer form, it works great :)

i dont know if there's an inner lock when displaying a form layer

any suggestion will be very helpful


texts: How to display Google Fusion Table map search result attributes

texts:
I am creating a map with Google Fusion Tables that will allow me to search for a local food product and display on a map the retailer that carries it.  Along with showing on the map the location of the retailer, I would like to list in a text box beside the map, other attributes associated with the food product, such as grower, whether it is organic or not, etc.

I have the map and the search function created but have not been able to find example code for displaying the search results in a list beside the map.

Does anyone know of a snippet of example code that will do this?  Or any other tips?

Thanks so much!


texts:
I think the title says it all - is it possible to programmatically copy/paste some text to/from the windows clipboard using MapBasic?

I have found this discussion but it only discusses copying and as it's two years and 1.5 versions ago I'm wondering if there's a better/more native option.


texts:
Is it possible to save layer as dbf? Or even better convert .csv to .dbf?
I have some .csv files, no geometry just attributes and I need it as .dbf as I want to edit them (I found that Qgis doesn't support editing .csv files).
And I need to do it in pyQGis. I can do it in QGIS (simple Save layer as...)


texts: "App" function returns a wrong output format

texts:
I'm practicing with terra package and land cover classification using the example provided with the package materials.
Unfortunately, right in the end, the app() function throws this error
> lulc <- app(classified, fun = which.max)
Error: [app] the function returns a list (should be numeric or matrix

and I can't assign the colour ramp to classes. I checked the classified input and looks ok but my only idea is that the error might be related to some kind of NA or missing value.
I found no other similar error on the web.
Any help on what to look for for a solution?


texts: Arcgis v10.2.4 ios and android sdk shows wrong cache data

texts: I hava tiledmap and it's scale is 500.000 and when i tried to show on android or ios devices. It on mapview it brings me cached data of scale 300.000 but when i tried to show it on web page , it works correctly. Also i tried to show arcgis sample map , there is a same problem. Did you know something about it ?


texts: Get tile layer intensity at given zoom and longitude/latitude (Leaflet)

texts:
I can display a tile layer as an overlay in Leaflet via an url of the form path/to/my/tile/layer/{z}/{x}/{y}.png :

my_overlay = L.tileLayer('http://path/to/my/tile/layer/{z}/{x}/{y}.png', {
maxZoom: 17,
minZoom: 9
});

I would like to be able to extract the value of this overlay (e.g. pixel RGB) at a given zoom level and longitude, latitude, or even better, the mean value in a disk centered at these longitude and latitude.

Is there any way to do this?


texts: How would I convert this point to WKID 4326?

texts:
This is a point in Brewster, MA, USA. How would it be converted to WKID 4326?

324299.3348436486, 832511.5939650714


texts: List of central coordinates (centroid) for all countries?

texts:
I need a list of the central points (centroid) for all countries:

China: lat/long (coordinates of the most central point in China)
France: lat/long (coordinates of the most central point in France)
etc...


texts: MODIS data for entire Earth Surface with ModisDownload in R

texts:
I am trying to use the ModisDownload function from the rts package to download, mosaic and reproject NDVI data from MODIS for the entire Earth surface. I have successfully done that for a subset around Africa using the following code

ModisDownload(x="MOD13Q1", h=c(16,17,18,19,20,21,22,23) ,v=c(5,6,7,8,9), version = '006', dates=c('2000.02.01', '2000.02.29'),
            MRTpath=path, mosaic=T, proj=T, bands_subset="1 0 0 0 0 0", proj_type="GEO",
            proj_params="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", datum="WGS84", pixel_size=0.01, delete = T)

The output can be found here or in the figure attached below. For the whole surface of Earth, my intuition was to change the h and v parameters to cover the whole MODIS sinusoidal grid, hence h = 0:35 and v=0:17. After downloading the raw .hdr files, the reprojection tool crashes. Does someone know if the h and v parameters are set correctly for the whole (-180,180;-90,90) surface?


texts: Updating refresh() during PyQGIS script operation?

texts:
I seem to be encountering an issue where iface.mapCanvas().refresh() (as well as iface.mapCanvas().refreshAllLayers()) does not refresh the map canvas while a script is running, except under very specific conditions.

I am attempting to create and modify some vector layers, then save an image of the canvas during script operation. I have a script set to save the image once the map canvas has finished refreshing. To do this, I have employed the iface.mapCanvas().mapCanvasRefreshed.connect(function) signal, and placed my image save within the function. However, this results in an image without the vector layers.

The only way I have found to actually get the image to save with the vector layers included is to have the console open while the script is running and include a print statement within the script to have it print a useless line to the console.

Code is provided below. When print 1 is commented out, the save file becomes blank. What might be causing this type of behavior, and how can I fix it?

from qgis.core import *
from qgis.utils import *
from qgis.gui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import os.path

##StackExchange Version=name
##Map_Save_Folder=folder

# Create save file location
outfile = os.path.join(Map_Save_Folder,"roadmap.png")
outPDF = os.path.join(Map_Save_Folder,"roadmap.pdf")

# Create point and line layers for later
URIstrP = "Point?crs=EPSG:3035"
layerP = QgsVectorLayer(URIstrP,"pointsPath","memory")
provP = layerP.dataProvider()
URIstrL = "LineString?crs=EPSG:3035"
layerL = QgsVectorLayer(URIstrL,"linePath","memory")
provL = layerL.dataProvider()

# Add points to point layer
feat1, feat2, feat3 = QgsFeature(), QgsFeature(), QgsFeature()
feat1.setGeometry(QgsGeometry.fromPoint(QgsPoint(5200000,2600000)))
feat2.setGeometry(QgsGeometry.fromPoint(QgsPoint(5300000,2800000)))
provP.addFeatures([feat1, feat2])

# Add line to line layer
feat3.setGeometry(QgsGeometry.fromPolyline([feat1.geometry().asPoint(),feat2.geometry().asPoint()]))
provL.addFeatures([feat3])

# Load the layers
QgsMapLayerRegistry.instance().addMapLayers([layerP, layerL])

# --------------------- Using Map Composer -----------------
def saveMap():
    mapComp.exportAsPDF(outPDF)
    mapImage.save(outfile,"png")
    iface.mapCanvas().mapCanvasRefreshed.disconnect(saveMap)
    return

layerList = []
for layer in QgsMapLayerRegistry.instance().mapLayers().values():
    layerList.append(layer.id())
print 1

mapCanv = iface.mapCanvas()
mapCanv.setExtent(layerP.extent())

mapRend = mapCanv.mapRenderer()
mapComp = QgsComposition(mapRend)
mapComp.setPaperSize(250,250)
mapComp.setPlotStyle(QgsComposition.Print)

composerMap = QgsComposerMap(mapComp, 0, 0, 250, 250)
composerMap.zoomToExtent(layerP.extent())
mapComp.addItem(composerMap)

mapRend.setLayerSet(layerList)
mapRend.setExtent(layerP.extent())

dpmm = dpmm = mapComp.printResolution() / 25.4
mapImage = QImage(QSize(int(dpmm*250),int(dpmm*250)), QImage.Format_ARGB32)
mapImage.setDotsPerMeterX(dpmm * 1000)
mapImage.setDotsPerMeterY(dpmm * 1000)

mapPaint = QPainter()
mapPaint.begin(mapImage)

mapRend.render(mapPaint)

mapComp.renderPage(mapPaint,0)
mapPaint.end()
iface.mapCanvas().refresh()
iface.mapCanvas().mapCanvasRefreshed.connect(saveMap)


texts: How do I select all points that lie within a layer's bounding box?

texts: I'm using QGIS to do this. I have a mesh created from the v.trimesh tool. I want to find all the points that lie in the bounds of a layer. How should I go about doing this?


texts: Replace Expression in Field Calculator to include a Numeric Range

texts:
There has to be an easier way to clean up address data, I hope?

GeoCoding, I need to remove APT# and any number or letter that follows.


texts: GeoServer, Label rotation on rotation of map

texts:
I am using GeoServer with cesium for rendering Vector of data. Every thing is working fine. I have styled it properly with labels.

Now there is a requirement that as we rotate the map(on mobile phone), labels should not be rotated, as similar to google map.
But this is not happening as labels are stick to tiles.

I did the google a lot but could not find the solution.

Please help.


texts: Projecting Imported NetCDF file correctly?

texts:
I have 360 NetCDF files (.nc) that I need to import into ArcGIS.

They hold monthly historical climate data in the U.S.

When I tried to import one, using the Make NETCDF Raster Layer tool, the projection doesn't seem to register at all, just places the data on the point (0,0).

Any ideas?

I am new to ArcGIS.


texts: pgr_dijkstra function with geometry column in result

texts:
can you help me to edit my pgr_dijkstra function to required result?

Currently I had this select:

SELECT * FROM pgr_dijkstra('
SELECT gid AS id,
     source,
     target,
     cost,
     reverse_cost,
     the_geom
    FROM pgr.ways',
30623,
30593, directed := true)

and my result is like this:

What I need to do to fill geometry column?

I've tried add join to table ways by edge id, but I want to be sure that is not exist solution without join.


texts:
I'm using the draw function of OpenLayers for draw a polygon. I need the wkt from the drawn geometry because I need to send it to PostGIS.

  <textarea name="name" rows="20" cols="80"
            id="coordinates">
  </textarea>

draw.on('drawend', function(evt){
    var feature = evt.feature;
    tableSRID = 4326;
    epsg = 'EPSG:' + tableSRID;

    var format = new ol.format.WKT()
    wkt = format.writeGeometry(evt.feature.getGeometry().transform('EPSG:3857',epsg))
    console.log('Geometry\n' + wkt + '\n\n')

    completeWKT = 'SRID=' + tableSRID + ';' + wkt
    console.log('WKT with SRID\n' + completeWKT + '\n\n')
    document.getElementById('coordinates').innerHTML = completeWKT;

});

I can see correctly the wkt into the console.log, I've test it using this service. The problem cames at the end of the draw because I see on the map the geometry with epsg 4326 instead of 3857.

This is one of polygons that I've drawn:

  MULTIPOLYGON(((1400149.5641348532 5271139.432674438,1373243.7301784712
  5211824.298725141,1452126.7433687733 5203874.847783483,1465579.6603469641 5288261.327010318,1400149.5641348532 5271139.432674438)))

and this is the projected polygon from wkt:

  MULTIPOLYGON(((12.577757535156248
  42.731151168561155,12.336058316406248 42.33852359891077,13.04467648046875 42.28571587692704,13.165526089843748 42.84402771111729,12.577757535156248 42.731151168561155)))

I see on the map the first MULTIPOLYGON and not his reprojection from wkt.

How I can solve?

NB: I never yet implemented the code for send the wkt to PostGIS, I need to find a solution using Django Rest Framework GIS. But this is another question.


texts: Python codeblock to remove numeric characters from a column not working

texts:
I am trying to make use of a codeblock found in this thread:

Removing numeric characters from alphanumeric value in field calculation?

I put this code into the pre-logic script field of the field calculator:

import re
def strip_digits(s):
    return re.sub("\d+", "", s)

And call it in the expression as below with the column in question substituted for column_name:

strip_digits(!column_name!)

And get the following when running it on a column of data type long:

ERROR 000539: Error running expression: strip_digits(171752)<type 'exceptions.TypeError'>:expected string or buffer

I can't seem to figure out what is going wrong, any ideas?


texts: Can't get infoWindow to show in CartoDB dynamic layer

texts:
Here's my very simple code.

<title>Leaflet multilayer example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />

<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />

But nothing is showing on click,
here is the github Gist
and the codepen here can anyone see where problem is?


texts: How can the order of labels in a Google Earth Engine chart be edited?

texts:
This is a follow-up question to the post  "Stacked bar chart in Google Earth Engine" concerning the there-referenced code in the answer.
Looking at the labels of the plot in the console, the order is as expected (Jan to Dec). As soon as I open the plot in full size though, the order of the labels is reversed (Dec to Jan). This only happens if the option isStacked is NOT set to false.
Why does this happen and how can it be avoided? I would like the months to be in ordered Jan to Dec with a stacked graph. The code of the above-referenced answer is pasted below for reference.
/**
 * @license
 * Copyright 2020 Google LLC.
 * SPDX-License-Identifier: Apache-2.0
 */

// Define some ecoregion features.
var desert = ee.Feature(
    ee.Geometry.Rectangle(-109.21, 31.42, -108.3, 32.03),
        {label: 'Desert', value: 0});

var forest = ee.Feature(
    ee.Geometry.Rectangle(-122.73, 43.45, -122.28, 43.91),
        {label: 'Forest', value: 1});

var grassland = ee.Feature(
    ee.Geometry.Rectangle(-101.81, 41.7, -100.53, 42.51),
        {label: 'Grassland', value: 2});

// Combine features into a feature collection.
var ecoregions = ee.FeatureCollection([desert, forest, grassland]);

// Load PRISM climate normals image collection; convert images to bands.
var normClim = ee.ImageCollection('OREGONSTATE/PRISM/Norm81m')
  .toBands();

// Add mean climate properties to each ecorgeion.
ecoregions = normClim.reduceRegions({
  collection: ecoregions,
  reducer: ee.Reducer.mean(),
  scale: 5e4});

// Make an absolute stacked bar chart.
print(
  ui.Chart.image.byRegion({
  image: normClim.select('[0-9][0-9]_ppt|label'),
  regions: ecoregions,
  reducer: ee.Reducer.mean(),
  scale: 500,
  xProperty: 'label'})
  .setSeriesNames(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                     'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])
  .setChartType('ColumnChart')
  .setOptions({
    title: 'Average Monthly Precipitation by Ecoregion',
    hAxis: {title: 'Ecoregion'},
    vAxis: {title: 'Precipitation (mm)'},
    colors: ['604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07',
            'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969'],
    isStacked: 'absolute',
  })
);

// Make relative stacked bar chart.
print(
  ui.Chart.image.byRegion({
  image: normClim.select('[0-9][0-9]_ppt|label'),
  regions: ecoregions,
  reducer: ee.Reducer.mean(),
  scale: 500,
  xProperty: 'label'})
  .setSeriesNames(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                     'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])
  .setChartType('ColumnChart')
  .setOptions({
    title: 'Average Monthly Precipitation by Ecoregion',
    hAxis: {title: 'Ecoregion'},
    vAxis: {title: 'Precipitation (mm)'},
    colors: ['604791', '1d6b99', '39a8a7', '0f8755', '76b349', 'f0af07',
            'e37d05', 'cf513e', '96356f', '724173', '9c4f97', '696969'],
    isStacked: 'relative', // if this is set to false, the order of the labels is Jan to Dec
  })
);


texts:
How can I dissolve lines from the same layer so there are no borders in the junction? For example, a crossroad shouldn't have any border (not as seen in the picture).
Can you help?


texts: Having problem with PROJ string for custom Coordinate System

texts:
I was looking for an exhaustive reference on instructions supported by PROJ string, but couldn't find anything yet. Only this page in PROJ library docs - I guess that's all there is.
I have quite a straightforward goal in mind - convert certain lat/lng to specific UTM (lets say ESPG:32618 or +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs) and then offset easting and northing by a certain amount. But I want destination to be an actual custom coordinate system. So how do I derive it from that UTM CRS, given above mentioned operations? Should be something trivial, right? How do I do that?
I tried to set false easting and false northing, like this:
+proj=utm +zone=18 +datum=WGS84 +units=m +x_0=-5000 +y_0=-5000 +no_defs
But doesn't seem to have any effect in PostGIS and continues to ST_Transform to mere UTM 18N.


texts: Find overlapping polygons ("have their center within") within the layer (ArcMap 10.4)

texts:
I have a feature layer of locations of invasive plants (polygons). Those were entered by several different people, so there is a lot of overlays:

What I want to do is to dissolve all the overlapping polygons from one plant and one year, if their center lay within each other (like in the tool "Select layer by Location" -> HAVE_THEIR_CENTER_IN).

For this purpose I want to select all the polygons, that have their center in another one, as well as all the polygons that overlap with anotherone's center.
So if A's center overlaps B, I want to select both A & B.

After this selection I plan to use the "Dissolve"-Tool, without any field specified and "Create multipart Features" unticked.

Unfortunately when I use "Select layer by location" and choose my layer both as Input Feature layer and as Selecting features, or when I leave Selecting features empty, it always selects all the polygons (I guess since they all overlap with themselves).

How can I select those polygons which have their center within another?
It would be great if it would be a pure Modelbuilder/Toolbox solution without Python scripts, since my coworker (who will also need the model) doesn't know any Python.


texts: PostgreSQL/PostGIS - Insert values in a new column with a case statement

texts:
I'm writing a SQL script in PostgreSQL and I need to reclassify certain values to a new column that form a label of the values. For example, the values of column A range from 1 to 10 and I want to add a new column B where the values of column A are represented with a label. Stating that values <3 will get the label 'Low' .
I figured out that I need to work with case statements and this is currently my script, but it does not seem to work.
ALTER TABLE 'MyTable' ADD COLUMN 'Labels' varchar(50)

INSERT INTO 'MyTable' ('Labels)

SELECT 'LabelValues',

CASE WHEN 'LabelValues' > X THEN 'Label 1'

WHEN 'LabelValues' > X AND 'LabelValues' <= X THEN 'Label 2'

WHEN 'LabelValues'> X AND 'LabelValues' <= X THEN 'Label 3'

WHEN 'LabelValues'> X AND 'LabelValues'<= X THEN 'Label 4'

WHEN 'LabelValues' <= X THEN 'Label 5'

END

FROM 'MyTable


texts: Can I save a newly created Intersection layer directly into a Spatialite database in QGIS without importing?

texts:
I have a point layer (xyz_coordinates_UTM33N) and a polygon layer (section1) in a SpatiaLite database.

I wish to extract the points within the polygon to a new layer, and I want that layer stored in the database.

I know I can create a new layer by using the Intersection tool, but how can I save the new point file without first saving it as a shapefile and then importing it into the database?

Using the "Save to SpatiaLite table" only creates a new database!
How can I accomplish this without all the extra steps?


texts: Why does Points in polygon create empty PNTCNT column from OSM points?

texts:
I tried to use the Points in polygon tool in qgis 2.2.0 and it worked fine as long as I used my own points.

When I tried to 'count' the points generated from OSM layers both from dowloaded shapefiles from geofabrik - here I thought the problem is with the projection which is tricky to fix-, but then I downloaded the same points from the OpenLayers plugin with Vector > OpenStreetMap > Dowload data.

The result is the same. I generate the output grid layer but the PNTCNT coulmn is totally empty. Do you have any idea why? I am all new to qgis and these kinds of operations in general, so please explain me what am I doing wrong?!


texts:
I am trying to import a shapefile to Postgres using the following:

shp2pgsql c:\location\water_areas.shp water > water.sql

I am receiving the following message:

  c:\location\water_areas.shp: shape (.shp) or index file (.shx) can not be opened, will just import attribute data.

Unfortunately I need more than just attribute data. I need the geometry column.

Why won't it open the shapefile for the conversion?


texts: How can I perform multiple operations in a single applyEdits?

texts:
I want to perform update and delete operation in a single applyEdits() call from my android application, my code is as below:

Thread.sleep(300);
layer.applyEdits(null, deletes, updates, new CallbackListener<FeatureEditResult[][]>() {
...
});

I am able to perform the desired operation only before applying a certain sleep interval, if not, the deletes array gets passed as empty, and therefore, the delete and update operations does not take place in a single transaction.

Please provide your inputs.


texts: Layer length statistics in print composer QGIS

texts:
In a QGIS composer, I would like to add a text label with the calculation of % of length of the total layer with a specific feature value.

My layer is composed of roads lines and I would like to know the proportion of the total length which have a specific value, like 'good' for the "ROADCONDITION" field.

For another question I had a good answer for count function:

'Existing roads: '
|| round(aggregate('releve_terrain','count', ' ',"ROADEXIS" = 'Yes') / layer_property('releve_terrain','feature_count') *100)  || '%'

I am looking for some help to use another function.


texts: Export Raster tiles in JPEG/PNG format using PostGIS

texts:
I imported my image with three bands (RGB) with 100*100 tiles using raster2pgsql into the DB. Now, I need to export those tiles separately. I used the following code but it produces a table

 select st_aspng(st_reclass(rast,1,'0-100:0-100','8BUI',0)) from myraster.test where rid=1;

So I need some help to improve this code or even revise it to a suitable form.


texts:
I have imported some rasters that is supposed to be continuously connected but instead they create some sort of bordered grid between them. I may assume that this is a matter of calibration between the individual rasters but I am not sure how to execute it in a datawise manner.

Have anyone experienced something like this before and perhaps know of a possible solution so that the overall of all the rasters will be more smooth.

All of these are supposed to be geographically connected. Hence the trouble of the 'borders' of the square.

I am using QGIS on windows.


texts: QGIS GDAL Vectorinformation: Can only extract one layer of the geopackage while I want all

texts: Currently I am trying to extract vector information with the GDAL Vectorinformation tool on a geopackage. The problem is I only get one layer extracted out of the geopackage while I want the information of all the layers in the geopackage. Is this a limitation of the tool?


texts: How to create a Planer Point Pattern in R using a Shapefile of point features

texts:
I have just started to learn spatial analysis of point pattern with R.

On page 20 of this book, the "Swedishpines" dataset has been used for inspection purposes. However, I want to use my own dataset intead of this data. My dataset is a group of point features having lat and and long and a text field for the point feature. Making a SUMMARY of my dataset does not result in the following details (for swedishpines data, borrowed from the book)

> summary(X)
Planar point pattern: 71 points
Average intensity 0.0074 points per square unit (one unit = 0.1 metres)
Window: rectangle = [0, 96] x [0, 100] units
Window area = 9600 square units
Unit of length: 0.1 metres

I understand that in order to follow on the example of this book, I would first need to create a Planer Point Pattern out of this Shapefile.

How can I do that?

I tried googling but nothing came up.


texts: Converting JSON response into a GeoJSON layer in my Leaflet map

texts:
I need to convert a JSON response from Mapquest elevation API into a GeoJSON layer in my Leaflet map.

var ele = $.getJSON('http://open.mapquestapi.com/elevation/v1/profile?key=<API_KEY>&shapeFormat=raw&latLngCollection='+profile);

this is a sample of JSON reponse:

{
   "shapePoints":[
      39.74012,
      -104.9849,
      39.7995,
      -105.7237,
      39.6404,
      -106.3736
   ],
   "elevationProfile":[
      {
         "distance":0,
         "height":1616
      },
      {
         "distance":63.5583,
         "height":3910
      },
      {
         "distance":121.9561,
         "height":2501
      }
   ],
   "info":{
      "copyright":{
         "text":"© 2018 MapQuest, Inc.",
         "imageUrl":"http://api.mqcdn.com/res/mqlogo.gif",
         "imageAltText":"© 2018 MapQuest, Inc."
      },
      "statuscode":0,
      "messages":[

      ]
   }
}


texts: How to use custom shapefiles in OpenTripPlanner?

texts:
I have some .shp files and I wanted to try to use them in Open Trip Planner. I run the command:

java -Xmx2G -jar otp-0.20.0-SNAPSHOT-shaded.jar --build /path/to/my/shapefile/ --inMemory

but I get the following errors:

18:17:45.617 WARN (GraphBuilder.java:224) Skipping unrecognized file '/path/to/my/shapefile/shapefile.dbf'
18:17:45.617 WARN (GraphBuilder.java:224) Skipping unrecognized file '/path/to/my/shapefile/shapefile.prj'
18:17:45.618 WARN (GraphBuilder.java:224) Skipping unrecognized file '/path/to/my/shapefile/shapefile.shp'
18:17:45.618 WARN (GraphBuilder.java:224) Skipping unrecognized file '/path/to/my/shapefile/shapefile.shx'
18:17:45.618 ERROR (GraphBuilder.java:230) Found no input files from which to build a graph in /path/to/my/shapefile/
18:17:45.618 ERROR (OTPMain.java:122) An error occurred while building the graph. Exiting.

How do I import them? Or I need to convert it to osm?


texts: Show all points (airports) in featured country only

texts:
I need to generate maps showing all airports located in a featured country. My airport shapefile has over 8000 points, so I need to remove those that are irrelevant.

Example: When Sweden is featured, only the airports located in Sweden will show on the map.

I need to generate a rule stating that if the airport is located in the featured country then show, if not don’t show.

My airport shapefile and country shapefile have a matching column named “country_name”.


texts: Controlling sub-model processing order within master ModelBuilder model?

texts:
Background:

Using ArcGIS Desktop 10.5.1, I've automated a task that requires three separate models to run in a particular sequence: model_1, then model_2, then model_3 (models 2 and 3 each start with an iterator, so they have to run separately).

I placed the three models (I'll call them sub-models) into a master model, and it runs correctly. I'm happy!

Question:

When the sub-models are placed in the master model, ModelBuilder does not allow me to control their processing order by connecting them as preconditions, yet they always run in the correct order.  So how does ModelBuilder know which is the correct order?

I thought that the processing order might be controlled by the sub-model alpha-numeric names.  However, after renaming the sub-models, the master model still runs in the correct order.

Shuffling the sub-model icons around on the screen has no influence.

However, the chronological order in which the sub-models are added to the master model does seem to control their processing order.  Have I stumbled on the way to control sub-model ordering?  More importantly, are there other ways to control their processing order?

A quick internet search did not turn up an answer, nor did a review of the book Getting to Know ArcGIS Modelbuilder by David W. Allen (ESRI Press, 2011).

Although the master model runs correctly, and I appear to have discovered (at least one) way to control processing order, I'm asking this question to help me better understand ModelBuilder.


texts: I am new to QGIS. I am creating a shapefile that will have several polygons. I need to have a column in the attribute table that will show the acres of each polygon. I have successfully done this but when I draw new polygons they don't get their acres calculated. What is the simplest way to overcome this? I am under the impression that this could perhaps be accomplished through GRASS or Python. I don't know anything about these programs though. Ultimately, I need to have a simple system for drawing new polygons labeling them with a field ID and having the ares calculated and labeled. This needs to be simple enough that interns who have never used gis can pick it up relatively quickly.


texts: Define coordinate system for layers with data from mdb-file (Microsoft Access Database) in ArcMap

texts:
The point data set from table points in the Microsoft Access Database (mdb) file data.mdb is visualized as layer points.lyr in ArcMap 10.6. The coordinate system is known. However, it is not allocated yet, i.e. the property of points.lyr says Coordinate System: Undefined. How can I allocate the coordinate system to points.lyr? The tool Data Management Tools > Projections and Transformations > Define Projection works for raster files. However, it seems not to work for a layer file with data from a mdb-file.

It is verified that the dataset is neither used by another application, locked nor read-only.


texts: ArcMap fails to add rasters to mosaic dataset?

texts:
I couldn’t figure out why ArcMap 10.3 fails to add rasters to the mosaic dataset. The following messages are displayed in the results

Image server is not supported with the current license
Server object instance creation failed on machine
Error: 80040213: configuration rastercommander.Imageserver cannot be started
Error: 8004206f: could not initialize the mosaic dataset's parallel processing engine
Error: 8004204b: Cannot synchronize mosaic dataset items associated with the specified raster type instance.


texts:
library(raster)

How can one clip one raster based on another raster?

RasA:

class       : RasterLayer
dimensions  : 459, 533, 244647  (nrow, ncol, ncell)
resolution  : 10000, 10000  (x, y)
extent      : 3685000, 9015000, 655000, 5245000  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs +towgs84=0,0,0
data source : in memory
names       : Total.Precipitation
values      : 0, 11.85  (min, max)

The resolution of RasA is 10km*10km

sample data for RasA an be found here. Shapefile included

RasB:

class       : RasterBrick
dimensions  : 416, 885, 368160, 2  (nrow, ncol, ncell, nlayers)
resolution  : 0.1, 0.1  (x, y)
extent      : -141.1, -52.6, 41.6, 83.2  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0
data source : in memory
names       : layer.1, layer.2
min values  :       0,       0
max values  :    22.6,    27.8

The resolution of RasB is 0.1deg*0.1deg

Question:

1) crop RasA to the extent of RasB

Using @mdsummer's suggestion I solved a previous projection issue using the following method:

prr=projectRaster(RasA,RasB,method = "ngb")
range(values(prr) , na.rm = T )

But trying to change the resolution of RasA during (prr=projectRaster(RasA,RasB,method = "ngb",res=10000) and after ( res(ppr)=10000) reprojection appears not to have any effect (see below). pprcontains the same dimensions and values as RasA but the resolution is copied from RasB.

class       : RasterLayer
dimensions  : 416, 885, 368160  (nrow, ncol, ncell)
resolution  : 0.1, 0.1  (x, y)
extent      : -141.1, -52.6, 41.6, 83.2  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0
data source : in memory
names       : Total.Precipitation
values      : 0, 11.85  (min, max)


texts: Error: Unrecognized argument type to convert to an Image

texts:
I am working with Sentinel-1 SAR data. I want to display each image (8 of them) separately onto the map.
Here is the basic filtering; s1 is image collection
var assamVV= s1
.filterBounds(roi)
  .filter(ee.Filter.eq('instrumentMode','IW'))
  .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
  .filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'))
  .filterMetadata('resolution_meters', 'equals' , 10)
  .select('VV');

//Filter by date
var beforeVV = assamVV.filterDate('2020-05-15', '2020-05-24');

function addImage(image) { // display each image in collection
image = ee.Image(image.id);
Map.addLayer(image);
}

I used the map function to display each image
beforeVV.map(addImage);

But to my dismay, it shows the following error:
Unrecognized argument type to convert to an Image: function standin(_0) {
    return newF.apply(this, arguments);
  }

if I try Map.AddLayer(beforeVV), it only displays single image as a mosaic. I want to display all of them individually.


texts:
I have a csv file dem.csv with data: LON, LAT, SO2(concentration) with NODATA=NAN.
I need to interpolate my data from *.csv with breaks.
I used gdal_grid with the command:

gdal_grid -a invdist:power=2.0 -outsize 400 400 -of GTiff -ot Float64 -l dem dem.vrt dem.tiff

content of dem.vrt:

<OGRVRTDataSource>
<OGRVRTLayer name="dem">
    <LayerSRS>4326.prj</LayerSRS>
    <SrcDataSource>dem.csv</SrcDataSource>
    <GeometryType>wkbPoint</GeometryType>
    <GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude" z="SO2"/>
</OGRVRTLayer>

The output I get: .
What I actually want .

How can I interpolate data in GDAL with breaks (NAN)?


texts: Where to buy training licenses for learning ArcObjects?

texts:
A client of mine wants me to do some work with C# and ArcObjects.  However, I have no real experience with C# (or much ArcObjects except with Java to be honest).  Rather than outsource the work, I thought I'd treat it as a personal training opportunity, which I've not done for many years; can anyone recommend a cheap resource for purchasing ArcObjects (C#), or a method of buying one solely for training purposes (clients have their own copy)?

I have chanegd this to outline I do not need, per se, training media, or details (although I am sure that will follow), but the actual software; I do nto want to shell out for commercial rates, if it is just for my own use.


texts: DWG to SHP - suddenly a huge ammount of data in one file

texts:
I converted four DWG-Files with ArcMap to SHP.
Suddenly one data had a huge ammount of data:

file 1: DWG: 4,5 MB ---->   SHP. 9,7 MB

file 2: DWG: 12,7 MB --> SHP: 110 MB (!)

file 3: DWG: 3,4 MB ---->   SHP: 10,3 MB

file 4: DWG: 6,3 MB ---->   SHP: 13,5 MB

First I had Adobe Illustrator-files and converted them to DWG. What can I do against this problem and reduce the ammount of data? After the first convert from Ai to DWG it was not a problem.


texts: More than one Field in algorithms in the Modeler Processing

texts:
Is it a way to enter more than one field in an algorithm in the Processing Modeler like in the toolbox?

An example with the algorithm "dissolve" in the toolbox:

The same algorithme in the modeler:


texts: How can I download SOILGRIDS v2 data through WCS in EPSG:4326, keeping (as close as possible) to the native 250m resolution?

texts:
SOILGRIDS data are currently available at 250m resolution. The resolution needs to be specified as part of the WCS download request, e.g. (Python MWE from https://git.wur.nl/isric/soilgrids/soilgrids.notebooks/-/blob/master/02-WCS-getExtent.ipynb):
from owslib.wcs import WebCoverageService
wcs = WebCoverageService('http://maps.isric.org/mapserv?map=/map/phh2o.map', version='1.0.0')

response = wcs.getCoverage(
    identifier='phh2o_0-5cm_mean',
    crs='urn:ogc:def:crs:EPSG::152160',
    bbox=(-1784000, 1356000, -1140000, 1863000),
    resx=250, resy=250,          # resolution [m]
    format='GEOTIFF_INT16')

with open('Senegal_pH_0-5_mean.tif', 'wb') as file:
    file.write(response.read())

Coarser and finer resolutions can be specified too, leading to aggregated (this is easy to check) and interpolated (presumably, because the request completes but differences are very small between 250m and finer resolution maps) maps.
If I want to download the same data in EPSG:4326, some changes are needed to the code:
response = wcs.getCoverage(
    identifier='phh2o_0-5cm_mean',
    crs='urn:ogc:def:crs:EPSG::4326',
    bbox=(lon_min, lat_min, lon_max, lat_max),
    resx=??, resy=??,            # resolution, needs to be in degrees now
    format='GEOTIFF_INT16')

I assume that these downloads use a reprojection of the 250m source data and are not an independent dataset but could not find any information about this. Is this correct? If so, is there a way to specify resx and resy that minimizes aggregation/interpolation compared to the source data?


texts: MODIS swath footprints - list of names or polygon dataset?

texts:
I'm trying to find either a list of all of the MODIS Terra swath footprints, or boundary dataset (i.e. polygons) with the footprint code as an attribute.  I've searched high and low on various NASA and MODIS-related sites, but I can't find that specific data anywhere.

Does anyone know where I could find this information?


texts: Why do edits made in attribute table not show in associated layer? QGIS 1.8.0

texts:
I have compiled a heat map layer to display over a background raster map. I discovered that the heat map layer was incorrectly positioned because I had made an error in the coordinate entry fields of the imported data table. I therefore selected the attribute table of the heatmap layer, toggled editing on and manually amended the coordinates to the correct format. I then clicked save edits. However, although the attribute table now shows the correct coordinates, the heatmap layer is still in it's original incorrect position.
Is there a simple solution to this? I am hoping I do not have to amend the original excel spreadsheet and rejoin the table.


texts: Can one hide the Lat/Lng information sent to Google maps?

texts:
most services that use google maps have the Longitude / Latitude stored in the source to be sent to google maps to render their markers.

However on this site (sorry Chinese)

http://www.dianping.com/shop/500451
I can't find this information for Latitude Longitude of their items. SO how does google know where they are supposed to render the marker?


texts: Channel network polyline shapefile filter

texts: I need to filter the red polyline shapefile keeping only the real channel network without the little features (noise). I use ArcGIS


texts: How would I separate the time observed from this column and create it as a new attribute?

texts: I'm using QGIS and I am working with a file in which there is a attribute "time_obser" that is written as yyyy/mm/dd time (ex:2019/07/13 19:47:45.000).  I would like to create a new field that has only the hour of the day observed (ex:19 from the previous example) so I could determine if the observations were taking place during the day or night.  How would I go about using the field calculator to create a new field to capture this information?


texts: inserting value from raster into overlaying point field

texts:
I am using ArcGIS 10.3 for Desktop.

I am using an etopo bathymetry map and would like to determine the depth of ~50k points in another layer.

I am sure there is a simple tool for this but I am not very familiar with rasters.


texts: Finer resolution pixels inside a coarser resolution pixel

texts: I have a big/coarser raster pixel of 6 km and a finer resolution raster of 500 m. Both the rasters have the same coordinates and belong to the same area. Now, I want to find which 144 smaller pixels lie inside a particular bigger/coarser pixel, so what tool/method in ArcGIS can I use for this purpose?


texts: how to put a cropped selection of a map into the composer

texts:
I have a map canvas and I want to have a portion of that canvas printed.  I adjust the canvas window in QGIS to show what I want to print and then add the map to the composer.  The results are very hit and miss.  It never quite does what I want, in most cases I get more of the canvas than is displayed in the qgis window.

I then have to fiddle endlessly with the scale and extents to get what I want.

There must be a easier way!  ;)


texts: Saving VBA customization to a Normal.mxt problem

texts:
I have experienced problems with saving VBA customization to a Normal.mxt document within ArcGIS 10.

I have a set of VBA macros developed originally within 9.3 version of ArcGIS that reside in a custom toolbar.
These VBA forms, modules and customization have been saved within the Normal.mxt in ArcGIS version 9.3 and open and work fine while opening this Normal.mxt in ArcGIS 10.

Recently I developed an additional VBA macro (within ArcGIS 10) which works and adds fine to the customized toolbar, however I am unable to save customization permanently to this Normal.mxt in ArcGIS 10.
Please note that Customize>Options “Save all customizations to the document” button is unchecked.

Despite saving changes to this Normal.mxt in Visual Basic Editor with a new macro/tool added to the customized toolbar, after closing and opening ArcGIS 10 again newly added macro/tool disappears from the customized toolbar.

However, the new tool is never saved permanently within the Normal.mxt.
It appears that ArcGIS 10 has some issues with VBA customisations.

Please could you advice what could be the cause of it and how it could be resolved?


texts: Using the US census to analyze data nationally

texts:
I'm trying to make a table to relate the STFID and LOGRECNO values for the US 2000 census at the block group level, nationally. I realize that the LOGRECNO value is a state specific unique variable, so I am joining it to the state ID code.

The steps that I have done so far are:

Importing all the national geo files into a database (e.g. akgeo.txt,.... to wygeo.txt)

Extracting all the blockgroup values using the following SQL command:

SELECT SF1GEO.LOGRECNO, SF1GEO.REGION, SF1GEO.STATE, SF1GEO.COUNTY, SF1GEO.TRACT, SF1GEO.BLKGRP
FROM SF1GEO
WHERE SF1GEO.BLOCK IS NULL
AND
SF1GEO.BLKGRP IS NOT NULL
AND
SF1GEO.TRACT IS NOT NULL
AND
SF1GEO.COUNTY IS NOT NULL;

I want to ignore all the block level information, and only take the relevant LOGRECNO for each blockgroup (BLKGRP). Then to produce the STFID I concatenate the variables:

STATE + COUNTY + TRACT + BLKGRP

which gives me a 12 character code (STATE is 2 characters, COUNTY is 3 characters, TRACT is 6 characters, BLKGRP is 1 character). I also combine the STATE and LOGRECNO values for future analysis, based on advice from census.gov as I want to perform national analysis.

  LOGRECNO REGION STATE COUNTY  TRACT BLKGRP        STFID LOG_STATE
1  0000038      3    01    001 021100      2 010010211002 010000038
2  0000077      3    01    001 021100      3 010010211003 010000077
3  0000107      3    01    001 021100      1 010010211001 010000107
4  0000169      3    01    001 021100      2 010010211002 010000169
5  0000231      3    01    001 021100      3 010010211003 010000231
6  0000308      3    01    001 021000      2 010010210002 010000308

At this point I have 546293 values, but only 208144 unique STFID values. One problem I have is that I can't figure out why all my STFID values are not unique.

Then, when I try to merge this table with a shapefile of blockgroups it only matches on 72972 polygons. I also can't figure out why the STFID does not match all. This is what the map looks like:

I'm not sure if there is an obvious pattern to the blockgroups that are included/excluded.

EDIT: I used Sean's suggestion of selecting by SUMLEV asthat makes a lot more sense than what I was doing earlier. So my SQL query is now:

SELECT SF1GEO.LOGRECNO, SF1GEO.STATE, SF1GEO.COUNTY, SF1GEO.TRACT, SF1GEO.BLKGRP
FROM SF1GEO
WHERE (((SF1GEO.SUMLEV)="150"));

However, I'm still mystified when I join this to the shapefile as I end up with the same map as above, and the same number of joins. I am manually making the code to join within the shapefile using the information within by concatenating STATE + COUNTY + TRACT + BLKGRP. What I can't understand is why 72972 values successfully join, and the rest do not.


texts:
I'm completely new to QGIS.

I have a shapefile over the counties in Denmark (see here for what the shape file looks like). The counties around Copenhagen are rather small and I'd like to add an enlarged/"zoomed in" mini map to make it easier to distinguish between the counties. Thus, both the original counties and the "zoomed in" counties could be linked with the same name to make it easy to see the information in the counties. I know this will produce a map that is not geographically correct, but it will be used to convey information.

I have installed the plugin that allows me to scale a set of selected features but then the remaining regions/features of the map disappeared.

Can anyone point me in the right direction?


texts: LeafletJS Mapping API to include WMS Layer from GeoServer MBTile: Cross-Origin Read Blocking (CORB) Blocked

texts:
Greetings GIS StackExchange Members, I am developing a web-application to be hosted on organisational intranet isolated from the internet. In the web-application, I intend to include a slippy map of my area of interest. For this, I did the following steps in the development stage:-

Generated XYZ tiles(MBTiles) from XYZ Tiles Connection in QGIS 3.10.14 for my area of interest.
Installed Geoserver 2.18-SNAPSHOT. Additionally, installed Geoserver MBTiles extension successfuly.
Subsequently, successfully published the MBTiles file downloaded in the step 1 as raster Layer with name title "Nark MB Tiles",  name "terry_test:Nark MB Tiles", store "Nark MB Tiles" and workspace "terry_test". The "OpenLayers" Layer Preview of the layer verifies of the same.
Included the "LeafletJS" mapping API in my web-application hosted on the same PC with GeoServer for testing.
However, attempt to include the slippy map in the form of WMS Layer fails showing the following warning

**
Cross-Origin Read Blocking (CORB) blocked cross-origin response  with MIME type application/xml. See  for more details.**
HTML Code is as following
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="stylesheet" href="ext/leaflet.css" type="text/css" crossorigin="anonymous">

        <title>LeafletJS Tutorials</title>

Request for help in overcoming the warning and pointing out any fallacy in approach.
Regards


texts:
I aim to determine whether there is a correlation between terrain variables (elevation, aspect and slope) and structural information acquired in forest survey. I have used ArcMap's
extract multi values to points to determine the terrain variable values for each tree species, but am unsure of which statistical test to apply to the datasets to determine whether there is correlation or not?


texts: Retaining ruler when digitising in QGIS?

texts:
I just switched from QGIS 3.4.4 to 3.8, and now when I am digitising or editing nodes, the ruler/measuring disappears when I go/click to digitise a shape or edit a node.

I would like to keep my measuring points/markers while i'm digitising/editing.

Is this a setting thing or just part of the update?


texts: ArcGIS 10.2 arcpy -- how to import/install win32com?

texts:
win32com used to be included with arcpy 9.x but no longer.  I used to use it to manipulate excel occasionally.

I downloaded and let win32com install itself and then tried to follow some online instructions for moving the win32com api to its own win32com directory in ArcGISx6410.2\Lib, but that seemed to have no effect.

Does anyone know how to do this?


texts:
I'm currently struggling on trying to combine several .hgt files with different software. I can get the 4 tiles into any kind of software but my issue is exporting the file back to .hgt file.

I've tried using VTBuilder, which allowed me to easily blend the 4 tiles together. I made sure the projection was indeed to WGS 84 and the column and rows were at 1201 as a SRTM should be (as I have got 4 together perhaps I should have double them to 2402x2402?).

I then exported the data as .bt file from VTBuilder and imported it into Landserf, having seen information that it could write .hgt, which doesn't seem to be the case. I supposedly found a workaround by saving the file as a .bil and changing the file name manually to .hgt... It doesn't work as it should.

To give you all the context, I am working with grasshopper using the plugin elk. The grasshopper component cannot read 4x .hgt files and is asking for only one file larger than the area I am looking at ( which is 24.6420 to 25.1627; 94.8683 to 95.2968) hence why I am trying to combine them all together. I have access to QGIS and the software mentioned before.

I cannot seem to find anybody that has raised this issue before on the forum or online for that matter.


texts: Where can I find shapefiles for the ecoregion map of the US?

texts:
I want to find a shapefile for the map at the bottom of

https://www.epa.gov/eco-research/ecoregions

I would want to create a map showing some data for the 10 forest ecoregions.


texts: Setting Band Statistics on Raster Image (GeoTIFF)

texts:
After doing calculations on a raster and saving it, the image statistics are wrong and need updating.

I find examples saying that this should do the job, like in this example:

 dsband.WriteArray(data)
 dsband.FlushCache()
 dsband.GetStatistics(0,1)

However this does not seem to update my band statistics correctly, they seem ok in Python with data.max() and data.min(), but opening the file in QuantumGis (image properties>style>load min/max) shows the wrong stats. I only get new image statistics correctly by separately opening and setting statistics like this:

driver = gdal.GetDriverByName('GTiff')
driver.Register()
ds = gdal.Open(infile, gdal.GA_Update)
dsband = ds.GetRasterBand(1)
(newmin, newmax)= dsband.ComputeRasterMinMax(0)
(newmean, newstdv) = dsband.ComputeBandStats(1)
dsband.SetStatistics(newmin, newmax,newmean, newstdv)
dsband.FlushCache()
dsband = None
ds = None

So what's the difference between both and why does QGis only show the correct stats with the second code?

thanks for any advice!


texts: How to combine more iterations of a for loop to bands of a single raster?

texts:
My model consists of a for loop, where the original raster is hillshaded from different angles. I want to combine the resulting images to a single multiband image.

What I already tried was to put the loop results together with Collect Values and then merge them with Composite bands tool. I found that it is possible to use result of Collect values as an input of Composite bands, but Collect values returns just one value, regardless of how many iterations there are, so the final output raster's bands are all the same. This is definitely not what I want.

Now I do it without any loop, but having eighteen or even more same tools in one model is not very elegant. If it was possible to do this with a loop (especially in the model builder), I'd like to know how.

EDIT: after Composite Bands, I run Principal Components, and the result is quite fine. I can do other analyses too (in other models), but I don't want to drop the model with Principal Components. While maintaining it, I don't like that my model looks like this:

My question is: how to replace the column of hillshade tools and output with a loop? Is it possible within Model Builder?


texts: Getting ERROR as elements in attribute table after doing query in QGIS

texts:
I was looking at an .osm file in QGIS using the OSM plugin; I was specifically looking at a country's lines layer. When I checked the attribute table just after opening the .osm, everything looked okay. After I did an advanced search using the search query builder, the system was able to highlight all matches. Good. But, when I reordered the entire table by moving all selections to the top of the table, most table elements were converted to 'ERROR' (from their original values).

Has anyone here encountered something like this before?


texts: Create flat lines from feature class of points Arcgis

texts:
I have a feature class of points. I wish to create (or find) a tool to create flat (bearing of 0° from East-West Line) lines centred on each point. See illustration of what I am trying to achieve:

As far as I can see, there are two ways to approach this problem;

Attempt to go straight to a tool that draws a line extending outwards from the point with a set bearing.
Create two points at the end of where I want each line to be, and connect them.

I am not having success with either method. How can I achieve this in Arcmap?


texts: How to determine the source of a GeoServer layer?

texts:
How can I determine the source of an existing layer in GeoServer?

To illustrate, I have a Data Store pointing to a PostgreSQL database, and I Publish a table in this PG database to create a GeoServer layer.

The layer creation page shows the Data Store and PG table name, but I rename the layer so that the layer name no longer matches the PG table name:

After the layer has been published, reopening the layer's page in GeoServer no longer references the actual table name in PostgreSQL:

How can I trace the fact that the layer blah is sourced from the table aus_supplychain_motor_webmap_qaa_clms?


texts:
In python only, I use
S = float(raw_input( 'Insert the value: ')
when I want allow to user insert a value then is used in that script.

When I try to use the same on a python script that I've already implement as script tool on arcgis, it seems no possible because give me an error like this:

  Runtime error  Traceback (most recent call last):   File "",
  line 769, in  EOFError: EOF when reading a line

So I infer that the problem is arcpy don't recognize the function "raw_input" or python window doesn't allow that user insert a value..

Can anyone help me to replace python's function raw_input ?


texts: Problems with the Clip and Intersect tool

texts:
I am having a problem with the clip and the intersect tool on QGIS Valmiera. I have a large vector map of sublocations of a country and am trying to clip them to a district level since I do not need the data for the entire country. I have save both to the project CRS, and have done this multiple times. As a project CRS I am using the WRS 84/Pseudo Mercator (I am using the openlayers plugin for geographic reference). To clip I the large map goes into the Input vector area, and I have made a polygon to represent the district which i add in the "clip layer" field. Then when I clip (or use intersect), nothing ever appears. The layer is created, but is not seen anywhere on the map, and the attribute table, although the fields from the large map are present, has no values.

How can I fix this problem?


texts:
I am new to R and geospatial data analysis.
I would like to extract the coordinates from a .geojson file in R. For example, a line from the .geojson file is as follows:

  { "type": "Feature", "properties": { "id": 36084.000000, "osm_id":
  471120302.000000, "type": "tertiary", "name": null, "tunnel": 0, "bridge": 0, "oneway": 0, "ref": null, "z_order": 4.000000, "access":
  null, "service": null, "class": "highway" }, "geometry": { "type":
  "LineString", "coordinates": [ [ 117.152985627930335,
  39.199392977596688 ], [ 117.154272752981669, 39.197016121313759 ], [ 117.156671150755756, 39.193602255970234 ] ] } }

I used 'readOGR' to read the file.

data <- readOGR(dsn = "test.geojson", layer = "OGRGeoJSON")

I could extract features like osm_id using data[['osm_id']], but that does not work with coordinates. How to extract the coordinates? Can anyone give me a hint how to proceed?