texts: QGIS: Add geotagged photos to already existing photos.gpkg file

texts:
I'm working with QGIS Desktop 3.4.12 Madeira, standalone. Operating System: Windows 10.

Is it possible to add new geotagged images to an already existing „photos.gpkg“ file? If yes, how?

The existing file „photos.gpkg“ was created by the QGIS function „Import geotagged photos“ (finding in the „Toolbox“ at „Vector creation“) and saved as gpkg file.

I already tried to overwrite the old file, but there comes an error saying that it doesn`t work: „OGR-error: A file system object called XYZ already exists.“ (even though the system asked me before if I would like to overwrite the file)


texts: Routing Engine / data for hiking trails (Austria)

texts: I currently use OSRM for the routing in my apps. This works well for car/truck routing. However, I have an upcoming project that requires routing on hiking trails as well. Are there any available solutions? If not, would it be feasible to use osrm and add the trails manually to osm? any other suggestions?


texts: How to properly store QGIS Qfield folders on an Android SD Card?

texts: I am using QField on an Android 7 tablet with SD Card. It works very well when I store my QField folders in the onboard storage in tablet/Android/Data/ch.opengis.qfield/files but if I store it in SDCard/Android/Data/ch.opengis.qfield/files QField cannot 'see' it to open it. Ideally I would like to move my QField data to the SD Card to save onboard storage space. Can anyone help with this?


texts:
I have a vector layer from json, and have a style symbolizer:

new ol.style.Text({
  text: ol.expr.parse('name')
})

In an vector layer, some of the nodes contains more than one name. I try to find a way to split the names on lines.

Openlayers seems to ignore '\n' in the json.
I can't find a way to edit the string, for example with replace(re, "\n")


texts:
The Russian part next to Alaska is split from the rest of Russia, I saw a similar problem solved with re-projecting with Asia Lambert Conic projection. I am unsure how to do this in deck.gl. My best idea is changing the corrdinateSystem for my GeoJsonLayer, but am unsure if changing that to be offset by some x and y will be sufficient.
CodeSandBox Link
Picture of what I'm seeing below.


texts: Draw a polygon following a centreline in Google Earth

texts:
I am trying to draw a buffer of 30km distance around a path I have in google earth. I need this buffer as a polygon as I need to export it to XML for a different purpose.

Is there any way to do this in google earth, or are any utilities that will do this for me?


texts: CartoDB offers 7 presets for Infowindows.can i change the color of the infowinfow itself, beyond the 7 presets?e.g. i want a infowindow with a grey header, or a infowindow completely grey with white text.i think i have to edit e.g. this class: "class="cartodb-popup header blue v2"but how and where?


texts: Graphical interface to fine-tune input parameters (arguments) for SNIC segmentation in GEE

texts:
For SNIC segmentation in GEE, I want to have a graphical interface (e.g., slider) to adjust input parameters (arguments). I have attached screen shot and request to technical guidance (sample code) please.
Regards


texts: What causes wrong placement of JPGs in QGIS 2.8.1?

texts:
I have the same issue explained in this post:

How to keep georeferencing from ArcGIS when importing raster into QGIS?

But my problem is with .jpg files.

I have georeferenced with ArcGIS 10.2.2 many images with the jpg extension. ArcGIS created *.jpw, *.jpg.aux.xml, and *.jpg.ovr files.

When I load these file to QGIS the image seems to be not georeferenced, since they do not place at their exact coordinates. The coordinates show troubles too, as they are in the form of 1000, -2000.

UPDATE:

This is a non-working World File (type *.jgw):

7.0887457506922358
0.082223103086062815
0.20203539280310498
-6.8633275800653717
708475.1163774861
4748735.2214651136

This is a working World File (type *.jgw):

0.635038030525322
0.000000000000000
0.000000000000000
-0.634943151635817
711680.913345446810000
4842292.059169517800000

I tried renaming some of the World files to *.jgw (as I found that some of the World Files are in this format, and ONE of them is working), *.jpgw, *.wld, *.jpw, but none of them as worked.

Same problem comes with *.tif and *.tfwx files.

When I load the images in QGIS they are placed at coordinates 0,0 and their extents are totally erroneous, since they appear in the form of:

0
-1900
1000
0

I really don't know how to proceed now. Exporting all the images from ArcGis to other formats is a big work since I have hundreds of georeferenced images with ArcGis, but I would like to give it a try. I loaded one of the previously georeferenced raster to ArcMap and opened the "Georeferencing Toolbar": the "Rectify" button is greyed out. What should I do to "un-grey out" the button? The only way that comes to my mind is to start adding links, appending more links to the georeferenced image but I don't think that's the best solution.


texts: Resolving undershoot and overshoot geometries in QGIS?

texts:
I have a polyline layer and I used topology checker to identify the undershoot and the overshoot geometries. Now I want to resolve the undershoot and overshoot geometries in the polyline layer in QGIS.

Grass v.clean is not giving me the expected results. Is there anyway to do that in qgis?


texts: Loading x,y data into a Geodatabase feature class

texts: I have done this before without problems.  But now, it is not allowing me to load xyz data from excel into a feature class of a geodatabase.  The error message is "the field is not null-able [shape]".  There is a Shape field that has Allow Null Values = No, but, my data does not have "null" values.  Please help and explain to me what this means.


texts: geoserver export shapefile chinese problem

texts:
I'm trying to export shpfile from a postgis to shape-zip .
 So i issue the standard GetFeature request with shape-zip as format to geoserver.
The shpfile which i get Charset is ISO-8859-1  so the chinese is '????' .
 How can i change the iso-8859-1 to utf-8?

postgis charset is utf-8 and geoserver global charset is utf-8


texts: How to calculate volume of bund around pit from TIN and external feature edge

texts:
I need to do some volume calculations of bunds. I suppose I should use the Surface Volume tool in 3D Analyst of ArcGIS. Here is the tool description. I am uncertain about the plane height parameter, however. From the tool webpage there is a diagram showing a plane height that intersects the surface. This seems to match our circumstance, where the bund rises above the polygon describing the external edge of the feature, but then dips below the plane of this polygon on the internal face of the bund going down to the base of the pit.

Here is the complicated part. The elevation of the external edge of the feature differs. Since, therefore, it is not a perfectly horizontal plane, it doesn’t seem sensible to me to put in an elevation value for the plane height. If a constant value were used, then the bund may not be cut at its external base where the elevation on the boundary varied above or below that value.

I see there is also the cut/fill tool. To me this would require a raster of the polygon describing the outer, bottom edge of the bund to be supplied. I'm not sure how to produce a valid raster representing this plane, however.

Thoughts?


texts:
I made a script that allows me to make folders based on the name of the month and by number of weeks. I also have a file in dbf format with names of people, and each record in this file becomes folders within each week per month.

The script works very well so far, however, the only problem in the result, it only runs until the month of SEP, and within each folder per month, in week 4, only the names of the people in this last folder are saved.

What I need really is to save all the names of the people by week until the last month 'DEC'

This is the script.

import arcpy
import os
#Workspace
env.workspace = r'F:\VICTOR_QB\Asignacion de Cargas'
ruta_salida = r'F:\VICTOR_QB\Asignacion de Cargas\Levantamiento'

#Name folder
Months = ['ENE','FEB','MAR','ABR','MAY','JUN','JUL','AGO','SEP','OCT','NOV','DIC']
Weeks = ['Week1','Week2','Week3','Week4']

#CoWorkers  file .dbf
Tabla_origen = r'F:\VICTOR_QB\Asignacion de Cargas\Lista de Brigadistas\BRIGADISTA.dbf'
Field = 'BRIGADISTA'

#Search CoWorkes's names
CoWorkers = [row[0] for row in arcpy.da.SearchCursor(Tabla_origen,Field)]
Unicos_Briga = set(CoWorkers)

#Make folders with months, weeks and coworkers
for M  in Months:
    meses = arcpy.CreateFolder_management(ruta_salida,M)
    for W in Weeks:
     semanas = arcpy.CreateFolder_management(meses,os.path.join(W))
    for B in Unicos_Briga:
     carpetas_brigadistas = arcpy.CreateFolder_management(semanas,os.path.join(B))

print 'Done'


texts: Buffering multiple features according to an attribute field?

texts: I'm trying to build a buffer tool with Python that will function according to the attribute field that contains varying widths. I am building a inventory of streets and need to add a buffer to the line feature that would represent an accurate width of each street. I have recorded all the widths in the attribute field and want to use this field to determine the buffer. Is there a way I can do them all in bulk with Python?


texts:
How would I calculate the percentage of streets that have sidewalks summarized by census tracts using PostGIS. My sidewalks file has an id that links it to its adjacent street and I've worked out how to select the street segment total grouped by tract, but I'm unsure of how to generate the number of streets with sidewalks without generating a completely new subquery. The code below seems to work, but takes a really long time to run as it's running the same select twice on close to a million street records.

select t.geoid10, count(streets_no_sdw), count(streets_sdw)
from
   (
    select cen_tract_2010.geoid10,
               (st_intersection(teleatlas_streets.wkb_geometry,
                st_buffer(cen_tract_2010.wkb_geometry, .5))) as streets_geom
    from transportation.teleatlas_streets
        join geography.cen_tract_2010
            on st_intersects(teleatlas_streets.wkb_geometry, cen_tract_2010.wkb_geometry)
   ) as streets_no_sdw,
   (
    select cen_tract_2010.geoid10,
               (st_intersection(teleatlas_streets.wkb_geometry,
                st_buffer(cen_tract_2010.wkb_geometry, .5))) as streets_geom
    from transportation.teleatlas_streets
        join geography.cen_tract_2010
            on st_intersects(teleatlas_streets.wkb_geometry, cen_tract_2010.wkb_geometry)
    join transportation.mpo_sidewalks on dynamap_id = teleatlas_id
   ) as streets_sdw
  ,geography.cen_tract_2010 as t
where
t.geoid10 = streets_no_sdw.geoid10 and t.geoid10 = streets_sdw.geoid10
group by t.geoid10


texts: Translating hdop, pdop and vdop to metric accuracy from given NMEA strings

texts:
How can I translate dilution of precision to a metric unit?

For example: say I got 1.2 in hdop from NMEA sentence of my GPS receiver,
in what should I multiply to get a metric accuracy? Just like the way Android or other platforms do.

It may be a duplicate (This link), but it was said: "All the GPS receiver is doing, is multiplying the dilution of precision figure by the resolution of the device."

I didn't catch that, what is the "resolution of the device"?


texts: Check for field, add or skip to next step if exists in ModelBuilder?

texts:
I am building a model to add many fields to an iteration of feature classes. For each step (broken into sub-models) to add a field I am checking, using a boolean Field Check script, whether the field already 'Exists'. If it does not the output for '0' acts as a precondition to run the Add Field tool. If the field does exists, the sub-model simply ends.

What I need to achieve is a way to have the branch logic end at an output variable regardless of whether the field exists or not, this way I can pass the output to the next 'Add Field' sub-model. Below are pictures of a sub-model and the whole model.


texts: OpenLayers: how to style WFS layer with SLD file?

texts:
I'm experimenting with a simple web mapping service build on PostGIS/GeoServer/OpenLayers stack on Win 2008 Server.

I overlay vector layer from PostGIS using:

var Index1v = new OpenLayers.Layer.Vector("Index1 v", {
    strategies: [new OpenLayers.Strategy.BBOX()],
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.1.0",
            url: "http://localhost:1979/geoserver/wfs",
            featureType: "bern_poly_s100",
            featureNS: "http://www.ispm.ch",
            srsName: "EPSG:900913"
        })
});

Layer displays correctly, but in plain, default[?] style from GeoServer.

I've got a SLD style file build with uDig and it seems to be correct since WMS service is using it without any problems. Can I use it to style WFS layer as well?


texts: Count of points within range of another point is all or nothing

texts:
I'm using this query in CartoDB to find the number of locations within a certain range of a set point:

SELECT COUNT(*)
FROM location_fusion_table
where ST_DWithin(location_fusion_table.the_geom,
ST_GeomFromText('POINT(39.704017 -104.959488)', 4326), 500)

If I use the number 500 or higher, this returns a count that equals every location in my table (i.e., it counts every row). 200 returns about 2/3 of all of my locations in the table (it should be about 100 returned instead of 20,000).

Clearly, these numbers are wrong, but I'm not sure what the issue is.


texts: Where Clause in SelectLayerByAttribute function resulting in invalid expression

texts:
All of the attempts below result in ERROR 000358: Invalid expression Any ideas on what I am doing wrong? I am working within a File GDB and with polygons.

Attempt 1:

def SelectLayer(val):
    print '"Att1 = ' + "'" + val + "'" + '"'
    arcpy.SelectLayerByAttribute_management('Source_lyr',
                                            'NEW_SELECTION',
                                            '"Att1 = ' + "'" + val + "'" + '"')
SelectLayer('Red')

Attempt 2:

def SelectLayer(val):
    where_clause = '"Att1 = ' + "'" + val + "'" + '"'
    print where_clause
    arcpy.SelectLayerByAttribute_management('Source_lyr',
                                            'NEW_SELECTION',
                                            where_clause)
SelectLayer('Red')

Attempt 3:

def SelectLayer(val):
    print "\"Att1 = \'{0}\'\"".format(val)
    arcpy.SelectLayerByAttribute_management('Source_lyr',
                                            'NEW_SELECTION',
                                            "\"Att1 = \'{0}\'\"".format(val))
SelectLayer('Red')

This line below was working without error before I put it into a function. This is what all of the attempts above, and the line below, produce: "Att1 = 'Red'"

arcpy.SelectLayerByAttribute_management('Source_lyr', 'NEW_SELECTION', "Att1 = 'Red'")


texts: Define GRASS region to desaggregated DEM raster with rgrass7

texts:
I want to define my Grass region with g.region and my raster to desaggregated this raster. I have error with g.region function when I try this :

#Create environment
initGRASS("C:/Program Files/GRASS GIS 7.6",
          override = TRUE,
          gisDbase = "GRASS_TEMP",
          home = setwd(WD),
          mapset = "PERMANENT",
          remove_GISRC = TRUE)

# Modify projection
execGRASS("g.proj", flags = "c", epsg = 2975)

#Load DEM in Grass
execGRASS("r.in.gdal",
          flags = "overwrite",
          parameters = list(input = paste(getwd(), "/Dalles_MNT/Dalles_fusionnees/MNT_2_dalles_test.tif",  sep=""),
                            output = "GRASS_raster"))

# Define the Grass region with my raster
execGRASS("g.region", raster = paste(getwd(), "/Dalles_MNT/Dalles_fusionnees/MNT_2_dalles_test.tif",  sep=""))
execGRASS("g.region", res = "0.25") #change the resolution of my region

# Desaggregated DEM
execGRASS(cmd = "r.resamp.interp",
          flag = "overwrite",
          parameters = list(input = "GRASS_raster", output="MNT_desag_RGRASS", method = "bilinear"))

# Export my raster in .tif
execGRASS(cmd = "r.out.gdal",
          flag = "overwrite",
          parameters = list(input = "MNT_desag_RGRASS",
                            output = paste(getwd(),"/Output_data/MNT_disaggregate_GRASS.tif", sep=""),
                            format = "GTiff"))

I have error in this part of my code :

> execGRASS("g.region", raster = paste(getwd(), "/Dalles_MNT/Dalles_fusionnees/MNT_2_dalles_test.tif",  sep=""))

ATTENTION: Nom de fichier
           <F:/PTENIG_PY_R/PTENIG_R/Dalles_MNT/Dalles_fusionnees/MNT_2_dalles_test.tif>
           non autorisé. Caractère </> interdit.
ERREUR :Carte raster
        <F:/PTENIG_PY_R/PTENIG_R/Dalles_MNT/Dalles_fusionnees/MNT_2_dalles_test.tif>
        non trouvée

I try this :

> execGRASS("g.region", raster = "MNT_2_dalles_test.tif")

ERREUR :Carte raster <MNT_2_dalles_test.tif> non trouvée

And at final of my code, my raster exported haven't values certainly in relation to this function g.region.

My file MNT_2_dalles_test.tif exist, I can open it with QGIS without problem, and its path is correct.


texts: How to get a list of OSM relations (id numbers) of cities and countries only?

texts:
I want to get OSM polygon shapes (GEOJson or WKT) of countries and cities only. I know that it is called a "relation" in OSM and each relation has its own id (New York is 175905, for example). How may I get a list of ids of all existing city and country relations in OSM? Is there same standard like numbers from 50.000 - 100.000 are countries and numbers from 300.000 - 500.000 are cities?

The best is to have something like a table:

OSM relation id | area name | type
175905          | New York  | city
1403916         | France    | country


texts: In the case of JDBC authentication provider, after creating a connection with the database (e.g. user: postgres, pass: postgres) and defining the user in the GeoServer (e.g. user: test, pass: test), How can to use user information (e.g. user: test, pass : test) to log in to GeoServer?


texts: Alternative to Event layer plugin for QGIS > 2.8?

texts:
It appears to me and from another post that the qgis "Event layer" plugin is not fully functional in versions above 2.8.

Trials using versions 2.14 & 2.18 failed to generate a Point memory layer. The Line generation feature did function properly.

Our county road system has been processed using the LRS plugin with export to a measured LINESTRINGM. Many of our roadside features such as sign inventory includes an attribute field for left or right offset distance.  The "Event layer" plugin is the only one I've found which travels a variable measured distance along centerline then will apply a left or right offset distance to a feature.  Our sign crew then runs qgis with gps enabled to field check database accuracy. That is why the left right offset is important to us.  Hopefully screenshot below helps clarifies this.

I would like to update to newer versions of QGIS, does anyone have a substitute method I might try?

I tried running multiple versions of qgis on one computer. I found it cumbersome, and I don't believe a viable option for our road crews.


texts: OGR2OGR - converting a GML file to GeoJSON

texts:
I'm struggling to use ogr2ogr to convert a GML file into a GeoJSON file. My input is zipped GML files with several layers. I'm only interested in the layer with name 'TopographicArea'.

I've tried converting using the following at the command line:

ogr2ogr -f GeoJSON .\3925845-HW5929.geo.json .\3925845-HW5929.gz

This fails with the error:

ERROR 1: Layer 'TopographicPoint' does not already exist in the output dataset, and cannot be created by the output driver.

I'm presuming this is because GeoJSON doesn't support layers.

How can I tell ogr2ogr to ignore all layers except one?

P.S. I have thousands of GML files to process, so this needs to be scriptable.


texts:
I'm trying to make a python script on arcmap 10.2.2 which will copy values from an old field (selected by the user) and paste them in an new field (named by the user).
I wrote that:

fc = arcpy.GetParameterAsText(0)
layerforNewField =arcpy.GetParameterAsText(1)
newfieldname =arcpy.GetParameterAsText(2)
oldfield = arcpy.GetParameterAsText(3)
calculate = "!oldfield!"

# Import system modules
import arcpy
from arcpy import env
env.workspace = fc

#add new field with "double type"
arcpy.AddField_management(layerforNewField, newfieldname, "DOUBLE", 10, 4)

#copy/paste values from a field
arcpy.CalculateField_management(layerforNewField, newfieldname, calculate, "PYTHON_9.3")

Results: the new field is created, but the values didn't paste. The same script without variables is working. What's wrong? I think there is a problem on "calculate" variable, isn't it?

I have also tried:

arcpy.CalculateField_management(layerforNewField, newfieldname, '!' + calculate + '!', "PYTHON_9.3")

and:

arcpy.CalculateField_management(layerforNewField, newfieldname, """!{}!""".format(calculate), "PYTHON_9.3") with the same results


texts: Getting lat/lon from GeoDjango map/OSMWidget

texts:
I'm building a Django app in which I want users to be able to select a location by clicking on a map. That location is then stored in a Postgres database with the PostGIS extension.

Displaying the map in the form works fine, but the form's PointField that uses the OSMWidget does not return lat/lon values; when I print the return value I get something like SRID=4326;POINT (976253.7252582712 6477844.507319077)

How can I get the widget to return lat/lon values, or, alternatively, how can I convert these values before storing them in the database?

Some code snippets:

# forms.py

from django.contrib.gis import forms

class NewEntryForm(forms.Form):
   # ...
   location_name = forms.CharField(label='Name', max_length=20)
   location = forms.PointField(widget=forms.OSMWidget(
                  attrs={
                         'map_width': 600,
                         'map_height': 400,
                         'default_lat': 50.1091,
                         'default_lon': 8.6819,
                         'default_zoom': 9
                        }))

models.py

from django.contrib.gis.db import models

class Place(models.Model):
   name = models.CharField(max_length=20)
   coord = models.PointField(blank=True, null=True)

   def __str__(self):
      return self.name

views.py

from .models import Place
from .forms import NewEntryForm

def new_entry(request):
   if request.method == 'POST':
      form = NewEntryForm(request.POST)
      entries = request.POST
      if form.is_valid():
         new_place = Place(
                           name = request.POST['location_name'],
                           coord = request.POST['location']
                          )

         new_place.save()

Storing a point via the admin GUI works fine, but if I use the admin GUI to look at the locations stored via above form it's clear that things are not working correctly.

admin.py

from django.contrib.gis import admin
from .models import Place

@admin.register(Place)

class PlaceAdmin(admin.OSMGeoAdmin):
   pass

I'm using Django v. 3.0.5 with Python v. 3.6.10 on Ubuntu 16.04.


texts: Fusing Collection 1 Landsat 7 and 8 Surface Reflectance NDVI

texts:
I'm fusing L7 & L8 surface reflectance into an NDVI time-series. I'm using the method described in Roy et al. 2016 to convert L7 NDVI to L8 NDVI using a simple regression equation found in table 3:

OLI = 0.0235 + 0.9723 * ETM+

However, this method was developed pre-Collection1, and I've heard that perhaps with collection 1 data I no longer need to adjust ETM+. I've looked at the collection 1 description and I don't see any mention of this issue. https://www.usgs.gov/land-resources/nli/landsat/landsat-collection-1?qt-science_support_page_related_con=1#qt-science_support_page_related_con

Do I still need to apply the correction specified in Roy et al. 2016 or can I fuse the NDVI values with no correction?

  Roy et al. 2016. Characterization of Landsat-7 to Landsat-8 reflective
  wavelength and normalized difference vegetation index continuity.
  Remote Sensing of Environment


texts: Splitting point shapefile in ArcGIS Desktop?

texts:
I have a shapefile with few points, I would like to export in separately shapefiles for each point.

I am using ArcGIS 10.1 and the split tool in ArcToolBox only works for polygons, but not for points.

Any help?


texts: Getting values lower than specified using Con, Raster Calculator?

texts:
Expression used in raster calculator (ArcGIS 10.2.2 for Desktop):

Con(("%NDVI.tif%"> (-0.05)) & ("%Height_2015.tif%"  >= 16), "%Height_2015.tif%", 0)

I want an output raster containing values from 16 and higher, but the output raster contains values from 15.937. Both input rasters are floating point.

I know I've had this problem before... Any ideas?


texts: Did GDAL install correctly in Winpython?

texts:
I installed the "gdal-201-1800-core.msi" and "GDAL-2.1.2.win32-py3.4.msi" in WinPython. It looks like the gdal could run in python shell.( there is no error when type "import gdal" ). But I could not use any gdal function such as "GetRasterband()","ReadAsArray". what's wrong with the gdal?

import gdal

import ogr

file=gdal.Open(r'D:\GeoNE\temp\m2000049.tif')

band=file.GetRasterBand(1)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-a8404d484b8e> in <module>()
----> 1 band=file.GetRasterband(1)

AttributeError: 'NoneType' object has no attribute 'GetRasterBand'


texts:
I am trying to port over a large amount of code for drawing lines, bitmaps (with transparency), and text onto our map display.  Originally it was done using Dynamic Display and IDynamicMap but that is no longer possible.

Could anyone tell me the right way to go about this without leveraging dynamic layers?

The methods I have tried (GraphicTracker) have not been successful and I am new to the ArcGIS Engine API.


texts:
I have about 50 JPEG rasters. I need to merge them into one 8bit TIFF and cut by a shape file (border) without NoData values.
When I Clip the merged raster in QGIS it makes holes in it like in cheese. If I do the same procedure in ArcMap it clips without holes and removes NoData but automatically transforms the raster into 32 float data type which I don't need.
How should I clip my raster the way it stays 8bit and without holes in it?

As I said I tried to convert in both ArcGIS and Qgis. And for some reasons when I use "save as" I can't define no data values coz its locked.


texts: spatial database vs spatial datastructure?

texts:
I am building an automated system that has to process several hundred spatial queries in the form of a polygon every day. The queries have to return both spatial and nonspatial data from different database tables. Each table consists of over 500 000 records.

What would be a better approach when performance is a top priority?
I) execute a spatial query every time i need (spatial) data?
II) first bulk-load all data in-memory into spatial datastructure, and then perform those same spatial queries onto the spatial datastructures?

If the latter is the better approach, which kind of datastructure would be recommended?
A few possible datastructures could be:
- PR-trees
- tries
- quadtrees
- R-trees
Notes:
It's safe to assume that there will be no data changes during the processing.
The spatial data is 2-dimensional (points, linestrings, polygons)


texts: 'no release file' error when installing ubuntugis

texts:
I'm trying to install ubuntugis-unstable on Ubuntu 20.04.1 but get an no release file error.
I've used:
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update


texts: Can't access extracted by mask raster from ArcMap 9.3 in ArcMap 10!

texts:
Previously using ArcMap 9.3 I have used the tool extract by mask for cropping some of my rasters and I created a mxd project adding all the rasters together. The output for every raster is in this way:

rastername1

rastername1.stk

rastername1c1

rastername1c2

rastername1c3

and the next one is

rastername2

rastername2.stk

rastername2c1

rastername2c2

rastername2c3

Screenshot:

Now I have upgraded my software to ArcMap 10 and I am not able to insert my raster anymore because I get the error "Invalid raster dataset. Failed to create raster layer."

Everything is ok if I use Arcmap 9.3, the problem is that I can't access the with ArcMap 10.


texts: Creating dynamic chart titles in ArcMap?

texts:
Is it possible to dynamically generate a chart title based on a source feature class attribute value?

Specifically, I am generating a series of cross-sections using an existing polyline f.c. ("XS_2009BEBrklnTerr_interpZ") and the "Create Profile Tool" from 3D analyst.  Sample below:

I would like:

the Profile Graph Title to populate automatically from the [SegID] field (data type = double)
the Profile Graph Subtitle to populate automatically from the [Station] field (data type = double).

Note: line geometry and attributes are contained in the same f.c. in a file geodatabase (Arc 10.0, SP4).

I have tried the following (unsuccessfully) by typing into the text portion of the chart's "Advanced Properties":
- writing as if a label expression (e.g."Segment " & [SegID])
- writing as dynamic text for Data Driven Pages: Segment:<dyn type="title" property="SegID"/>

I was unable to figure out within Arc, so I dived into Python.  It's a lot more complicated than I'd anticipated, but I think I'm on the right track.  I believe my problem now is in using the 3D feature geometry as the input data axes...I will post in a separate question.


texts:
I'm fairly new to OpenLayers so please excuse me if this is an ignorant question.  I'm curious why the LinearRing getVertices implementation

getVertices: function(nodes) {
    return (nodes === true) ? [] : this.components.slice(0, this.components.length-1);
 },

does not return the last point since I was under the impression a LinearRing was supposed to represent a closed ring.  I was using getVertices to serialize to another format which requires closure and found this interesting.  Can someone enlighten me?


texts: Create custom color map for multiple GeoPandas plots to share same scale

texts:
My objective is to create a 2x2 figure where each cell in each grid is on the same color scale. Currently, I haven't found a compound plot option in GeoPandas that allows me to plot one GeoDataFrame and split it by hue or column to keep the scale the same. The problem is that the values in the bottom left plot are actually much higher but are not captured because it has its own pysal categorization from GeoPandas.plot(). My current code:

import geopandas as gpd
import matplotlib.pyplot as plt
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2, figsize=(12, 16))
ax1 = PPR.plot(ax=ax1,cmap='gist_gray_r', linewidth=2,edgecolor='black')
rp1.plot(ax=ax1, column= 'model_benefit',cmap='gist_heat_r', linewidth=0.1, edgecolor='white')
ax1.set_axis_off()
ax1.set_title('map 1', fontsize=20, fontweight='bold')\

ax2 = PPR.plot(ax=ax2,cmap='gist_gray_r', linewidth=2,edgecolor='black')
sp1.plot(ax=ax2, column= 'model_benefit',cmap='gist_heat_r', linewidth=0.1,
edgecolor='white')
ax2.set_axis_off()
ax2.set_title('map 2', fontsize=20, fontweight='bold')

ax3 = PPR.plot(ax=ax3,cmap='gist_gray_r', linewidth=2,edgecolor='black')
rp2.plot(ax=ax3, column= 'model_benefit',cmap='gist_heat_r', linewidth=0.1, edgecolor='white')
ax3.set_axis_off()
ax3.set_title('map3', fontsize=20, fontweight='bold')

ax4 = PPR.plot(ax=ax4,cmap='gist_gray_r', linewidth=2,edgecolor='black')
sp2.plot(ax=ax4, column= 'model_benefit',cmap='gist_heat_r', linewidth=0.1,
edgecolor='white')
ax4.set_axis_off()
ax4.set_title('map4', fontsize=20, fontweight='bold')

And the output:
Does anyone have a way to create a color map of string/values using the matplotlib "OrYlRd" cmap then assign a color to a value in the dataframe? Or an alternate approach for customizing color palettes in GeoPandas plot


texts: how to create a 3d web service from a webscene(.3ws)

texts:
To get 3d visulisation of raster data, I have created a web scene(.3ws) from .sxd file of that raster data. Now i want the web service from this .3ws file.
  Please hel me how to get the url of that webservice.


texts: Edit limited to part of multi geometry collection in kml google earth

texts: I have polylines on kml format ,I want to edit those kml polylines via google earth when I try to modify the polyline I get the error Edit limited to part of multi geometry collection.


texts: Using ModelBuilder and iteration to calculate values from previous row?

texts:
I would like to come up with a model that takes the previous value and adds it to the current value.

For instance

Value
3, 2, 3, 1

Would result in

-, 5, 5, 4

I have been trying to use Iterate Field Values and Calculate Field, but I can't seem to get it to work. Any tips? Would it be easier to add the current value to the next value?


texts:
Can anyone help me use ArcGIS in JavaFX.

I have a sample code but it's in swing application.

Sample code for creating a map

I would like to use it in JavaFX.

Any suggestions?


texts: Selecting features based on relation to other features within same layer using ArcGIS Desktop?

texts:
I want to select all the features in my Waterlines layer that share a line segment with other features in the same layer.  I've done a complicated search cursor iteration in python that takes a couple hours, but I'd rather have something quicker.

I found this page that says you can do it simply with "select by location" which doesn't seem to work from the selection menu in arcmap, but kind of works in arcpy.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Select_By_Location_Select_based_on_spatial_relationship_within_the_layer/0017000000tr000000/

When I ran this:

arcpy.SelectLayerByLocation_management("waterlines_layer", "SHARE_A_LINE_SEGMENT_WITH", "", "", "NEW_SELECTION")

...it selected things that definitely didn't share a line segment with anything else.  But it didn't select everything (which would have at least made some sense).


texts: Is order of selection in Spatial Data important (attribute, location, graphic)?

texts: When dealing with spatial data in a GIS system, does it matter which way you select the information if you're using all 3 - attribute location and graphical selection? In my experience it seems to not matter, but I wanted to confirm this.


texts:
I have been looking at ways to run a ArcGIS model directly in arcpy, without having to export it and correct all sorts of things in the code. But somehow I can't seem to make it work.
This is how I wrote the code, in which Workshop.tbx is the real name of the toolbox, TestAlias is the alias of the toolbox and Workshopmodel is the name of the model I want to run.:

import arcpy
arcpy.env.overwriteOutput = True

arcpy.env.workspace = r"c:/ArcGISdata"
arcpy.ImportToolbox(r"c:/ArcGISdata/Workshop.tbx")

arcpy.Workshopmodel_TestAlias

print "Script finished"

Can anyone help me along?


texts: Calculating Field B from Field A, except where Field B has existing value, using ArcGIS Desktop 9.3?

texts:
Im trying to calculate Field B from Field A except where Field B has existing value in ArcGIS Desktop 9.3. (I suspect its straight forward but I have 'searched' and havent cracked it yet)

Any guidance as to how to achieve this please?


texts: OpenLayers: Permanently scale-independent text labels (including zoom steps)

texts:
On an OpenLayers map, I'm using text labels derived from JSON features for annotation. The labels are relatively flexible and may be switched at certain zoom levels (like changing from country to city labels etc). However, between some zoom levels, they're supposed to visually stay the same all the time, i. e. change their font size to look independent of the scale.
I was able to achieve this with a style function (not showing the formulas to derive the actual font size and style because these are dependent on my use case):
  var vectorLayer = new VectorLayer({
      source: vectorSource,
      style: function(feature) {
        var feature_name = feature.get('feature_name_attribute');
        var feature_size = feature.get('feature_name_attribute');

        var scale_dependent_size = /* some formula depending on feature size and current resolution */;
        var final_style =  /* some formula to convert scale_dependent_size to an actual style*/;

        style.getText().setText(feature_name);
        style.getText().setFont(final_style);

        return [style];
    }

It works okay with the results looking like those in this fiddle (taken from an answer in this thread). If you zoom in or out, the visual effect I'm trying to avoid becomes apparent.
The problem: Whereas the size is correct before and after the zoom operation, it is not during the operation. Visually, it becomes quite noticeable that the scale is changed just after the zooming is completed. The effect I want to achieve should be similiar to raster tiles containing the text but with the added flexibility of using vector layers. I would like the labels of my map to look similar to what Google Maps does, with a smooth impression also during zoom operations. Another good example of how I want it to look like can be found here but this is using geometric features, not text labels.


texts: Error adding GeoServer store from PostGIS

texts:
I can't get a connection up when creating a PostGIS-store.

GeoServer is running fine on IP:80/GeoServer.
PostGIS is running and working fine with PSQL commands
Created database/table 'mydb' and 'mytable' then changed ownership to Postgres

ERROR MESSAGE

Error creating data store, check the parameters. Error message: Unable to obtain connection: Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "main", SSL off)

PG_HBA.CONF
    # Database administrative login by Unix domain socket
    #local   all             postgres                                peer
    local   all             postgres                                trust
    # TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
host    all             all             128.187.0.0/16          md5
host    all             all             69.169.0.0/16           md5
#allow replication connections from localhost, by a user with the# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

Any idea what is going wrong?

I'm on a Ubuntu on AWS-EC2.


texts: Getting names and numbers in specific vectors from a dataframe in a loop R

texts:
I have a huge DataFrame, in which I need to extract some information that generates filenames that I need to search in my working directory later, I also need the value in each cell of the pixel column.
For this I created a loop, in which I wanted to search for these pixel names and values based on the name of the columns.
Just like in the example and code below:

Replicable example
  ###Create a DataFrame
  pixel_tot<- data.frame (name= c ("Area A",  "Area B",  "Area C", "Area D", "Area E", "Area F",  "Area G", "Area H ", "Area I",
                                    "Area J", "Area K",  "Area L",  "Area M", "Area N ", "Area O","Area P"),

            AP= c("PI", "PI", "PI", "PI", "UN",
                  "UN", "UN", "UN", "US", "US", "US","US",
                  "TI", "TI", "TI", "TI"),

            AW= c("wood", "wood", "arc",  "arc","wood", "wood", "arc",  "arc",
                  "wood", "wood", "arc",  "arc","wood", "wood", "arc",  "arc"),

             DIST=c("km0",  "km10", "km0",  "km10","km0",  "km10", "km0", "km10","km0",  "km10",
                    "km0",  "km10","km0",  "km10", "km0",  "km10"),
            pixels= c(598, 234, 789, 546, 8956, 4454, 7989,
                      789, 7866, 454, 7846, 968, 5847, 14758, 4578, 5864))

        ####code

for (k in pixel_tot[,"AW"]) {
  for (i in pixel_tot[,"AP"]) {
    for (s in pixel_tot[,"pixels"]) {

      ## I need to get this information about ( AW and AP) to generate a file name that
      ##I need to call and open, and joining these columns generates that name

      print(paste0("control","_",i,"_",k))

    ### save the pixel value

    Pixel_value<- s

    print(Pixel_value)

}
}
}

This code does not generate any error, but I expected it to form only 16 combinations, but this is not the case. They generate thousands of different combinations.


texts: Find midpoint of street geometry,with grid lines

texts: Currently my application displays street name in middle of whole street, but when we use grids,we want to display street name in middle of street under grid,I want to calculate midpoint of street geometry,I have start point and length of street,I could not use sdo_centroid.Please help in finding midpoint using length?


texts:
I have a catalog tree with a number of subfolders.
In every folder there is point and polygon shapefiles. What I want to do is for every type of shapefile point and polygon to do a merge by type.

Is that possible to be done using python or anything else?


texts: How to repair Geometric Network in Versioned ArcSDE Geodatabase?

texts:
Our Versioned ArcSDE workflow has a feature dataset with Geometric Network in the parent (Default), which users derive in their own versions.  It is now observed that in some versions, the geometric network is no longer valid and does not abide connectivity rules.

How can we repair connectivity/enable Geometric Network again in these versions?
Or should we do this on the default dataset, rather than in user versions?
What are the tools which may help us to retrieve the Geometric Network ?


texts:
I am writing a pygis plugin in which I need to do an overlay.

The code of the function doing the overlay look like

measure=self.dlg.fcbMeasure.layer()
area=self.dlg.fcbArea.layer()
params={'INPUT':measure,
        'OVERLAY':area,
        'OUTPUT':"memory:land_water",
        'INTERSECTION':"memory:land_water"}
processing.runAndLoadResults("qgis:intersection", params)

I thought either OUTPUT or INTERSECTION should name the output layer, but the layer that is created is just called Intersection - how can I run the intersection and end up with a memory layer named "land_water"?


texts: Merging lines (that might cross) at common endpoints without multi-part features in the result

texts:
I have a polyline dataset I'm trying to merge / dissolve segments based on an attribute into continuous single lines. The problem is that some of those segments cross each other but need to be represented as a single-part feature in the end result. The segments share, at most, one endpoint with another segment of the same value and should all snap together nicely since they were digitized that way. (The data will eventually be used in a geometric network and we don't want net junctions diverting traces.)

Has anyone managed to automate this process with my criteria? I've tried various combinations of the Dissolve, Unsplit Line and Merge tools in ArcGIS Desktop 10.3, all to failing to create the continuous lines. Non-ArcGIS based solutions are welcome if that will get the job done.

Update:

So the end goal is to connect separated features and produce continuous feature that loops over itself without the inclusion of the a vertex where the lines cross.

Features before dissolve

Post dissolve - No multipart, Unsplit (per Michael's suggestion). Three features are created as a result (The selected feature, plus features just north and west from the denoted intersection.)


texts: Area calculated within classification program is different from the area calculated by resulting exported image

texts:
I am trying to calculate area of one class (crop). In the program, the area calculation is taking place perfectly. The classification result image, generated from same program was exported to GEE asset.
When I am trying to calculate the area using exported classified imagery, the area figure comes drastically different and high.
I have so many counties to classify separately. Therefore, there is need to classify and export and then calculate the area of crop for each county or sub-county.

Link to the code is given below-
https://code.earthengine.google.com/7c77c5c647c5c3ff02dfa45c71d8df04

In the code, First area chart is originally calculated area and second one is area by exported class image.
Original area-

area by exported class image (drastically different and high area)

Request to help. Help is highly appreciated.


texts: Can the units of the measure tool in QGIS be changed?

texts:
All,

I'm trying to do some error-checking with some rasters I'm creating, and want to measure line distances on the map in feet, rather than meters - which is what the measure line tool seems to be 'stuck' at.


texts: Return integer and fractional part of a decimal number using QGIS 3.10 expressions

texts: I would like to extract a part of a decimal number. In other words, I would like to use 'substr' for decimal numbers to extract integer and fractional part. I could use substr but it does give a different result for a whole number.


texts: Labelling cluster features in OpenLayers?

texts:
I'm trying to label a vector layer with clustered points in OpenLayers. When the feature is clustered I want to show the value of an attribute of all the features included in the cluster.
I've tried to define my label as follows:

label: function(feature){if (feature.cluster) {
                 for(i=0;i<feature.cluster.length;i++)
                {label_array += feature.cluster[i].attributes.yacimiento;
                 label = label_array.toString();
                }
            }
          else{label=feature.attributes.yacimiento;}
      return label;
      }

... and the vector layer just doesn't work

BUT, if I do the same with

label_array = feature.cluster[i].attributes.yacimiento;

it works prefectly displaying only the last item of the cluster

I don't understand what's going on (I might be missing something obvious, for I have no programming skills)


texts: Make IPictureMarkerSymbol file path accessible to all users?

texts:
I've written a little java add-in button for ArcDesktop 10.4, in eclipse, which makes a new ArcMap layer with some points. (NOT Runtime) My goal is to assign a picture as the symbol for each of these points. I have success on my machine, but I can't figure out how to make my picture accessible to all future users.

Here's my class, part of larger program, which does work, but image currently only comes through from path on my own computer:

public class SymbologyChanger {

public SymbologyChanger(ArrayList<Point> pointsForTheLayer, IMap currentMap) throws AutomationException, IOException {

    IGraphicsContainer graphContainer = (IGraphicsContainer) currentMap.getActiveGraphicsLayer();

    for (int i = 0; i < pointsForTheLayer.size(); i++) {
        Point point = (Point) pointsForTheLayer.get(i);

        double symbolSize = 15;
        IPictureMarkerSymbol picSym = new PictureMarkerSymbol();
        picSym.setSize(symbolSize);
        // http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/esriDisplay/esriIPictureType.htm

        picSym.createMarkerSymbolFromFile(1, "C:\\Users\\userName\\eclipseWorkspace\\java_project\\images\\my_image.bmp");

        IMarkerElement markerElement = new MarkerElement();
        markerElement.setSymbol(picSym);
        IElement element = (IElement) markerElement;
        element.setGeometry(point);
        graphContainer.addElement(element, 0);
        }
    }
}

So it's this particular line:

  picSym.createMarkerSymbolFromFile(1,
  "C:\Users\userName\eclipseWorkspace\java_project\images\my_image.bmp");

which is my problem. I've placed the image in the project images folder, along with the button icon. The button icon totally works, but for the points symbol, I've tried:

  picSym.createMarkerSymbolFromFile(1, "images\my_image.bmp");

And this does not work.
Again, I get the image I want for the point symbol, but how to set the path correctly to share with others?
I need the image to work as the point symbol with all machines, not just my own.


texts: How to produce a better inset map in ArcMap?

texts:
Attached is an example of a generic inset map designed in ArcMap 10.  For all the wonderful things that this software can accomplish, there has to be a more sophisticated way to produce better looking inset maps than my default method.

I would like to see different methods of producing inset maps that are more unique and creative than the one I displayed. Ideally, I would like to see examples and explanations that can be produced in GIS software like ArcMap, rather than software such as Illustrator.

Are there any solutions, suggestions and steps to produce a more professional, cleaner inset map?


texts: Most performant KNN method in postgis (, >, st_distance)

texts:
My question is about the fastest way to order query results by approximate distance. I've seen conflicting information about this.

My data are lat/lng points stored using WGS84 (SRID 4326).

The general query is simple enough

select * from table where [condition]
order by [distance function]

However, I'm not sure which of the following performs best:

st_distance(geom, st_setsrid(st_point(:lng, :lat), 4326));

geom <<->> st_setsrid(st_point(:lng, :lat), 4326));

geom <-> st_setsrid(st_point(:lng, :lat), 4326));

geom <#> st_setsrid(st_point(:lng, :lat), 4326));

I also understand that each of these can be sped up with different indexes, but I have trouble translating that in actual performance differences. For example, the docs don't mention anything about indexing regarding st_distance. Some answers on SE say that casting to geography speeds up st_distance. Furthermore, while <#> can use any spatial index, <-> will only make use of a 2D GiST index, and <<->> will only make use of a n-d GiST index.

Does that make <#> potentially the fastest?


texts: Converting altitude in feet to pixels on a mercator map image

texts:
I know the question might seem farfetched given that the map is 2d. But I essentially want to project items-aircraft-above the map and I would like their altitude to be vaguely 'realistic' in terms of map size etc. The whole thing is 3D so it is possible to see the altitude.

I have the altitude in feet.

Is it simply a case of world diameter / image width = number of feet represented in a pixel.
altitude in feet / number of feet represented in a pixe

I get the feeling that would be too simple.

Thanks


texts: In QGIS2.8 version, I added several points in a point vectorgraph. When using the grid - > Conversion - > rasterized vector , The results turn out into a black figure. How to turn a vectorgraph into raster correctly?


texts: Determining map-projected coordinates in custom CRS for Leaflet?

texts:
I have some static USA maps in Lambert Conformal projection that I would like to overlay in Leaflet together with geo-reference support.  They are centered at 38N, 98W.  I have found that the closest CRS equivalent is ESRI:102004 from http://epsg.io/102004

+proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m no_defs

So I modified this definition to +proj=lcc +lat_1=30 +lat_2=50 +lat_0=38 +lon_0=-98, and was able to set up this custom projection in Leaflet using proj4leaflet.  Now, it is time for me to overlay the static USA maps using L.Proj.ImageOverlay.  In order to do that, I need to specify the bounds for the overlay using projected map coordinates.  I could open up http://epsg.io/transform#s_srs=102004&t_srs=102004 and get the coordinates there.  However, those coordinates are valid only for the +lat_0=39 +lon_0=-96.  So how should I determine the correct coordinates based on +lat_0=38 +lon_0=-98 instead?


texts: Collecting public comment (Points / Lines / Polygons) in online mapping application

texts:
Use Case:
Author/deploy public facing web map displaying wildlife locations. Allow public stakeholders to easily draw and attribute points, lines, and polygons denoting important wildlife and recreation areas.

What solutions has the GIS Stack Exchange community had the best success with recently. Particularly interested in solutions effective for stakeholders with minimal technical skill.

This ArcGIS Online solution is helpful, but was answered over 4 years ago.
Another ArcGIS Online thread from 4 years ago.
ArcGIS GeoForm supports data collection from the public but is relegated to points.
ZeeMaps is an option, but I find the interface clunky and unintuitive for lay users.

All feedback appreciated.


texts: Including data from multiple rows in CartoDB infowindow?

texts:
I have a visualization in CartoDB of a set of data points in table pointlayer.  I am using cartodb.js and have a nice map for browser consumption.

When a user clicks on a point, I'd like to run a sql query that returns multiple rows relating to the clicked-upon point, and I'd like to put all that into the infowindow.

select column_a column_b, etc
from anothertable
  join pointlayer
  on pointlayer.point_id = anothertable.point_id
where
  pointlayer.point_id = <cartodb_id of clicked on point>

anothertable may have 0 or more rows for any point_id

Is this possible with infowindows?  Looks to me like the answer is probably no: they are designed for a single row.  I suspect that I need to find a solution other than using CartoDB's infowindow (e.g. using Leaflet's popup), but I thought I would ask.

Getting info from multiple rows in single popup of CartoDB? suggests to "actually query the table and get back all data."  It doesn't state that the infowindow itself can be used to display it...though I could be reading it incorrectly.


texts: Creating basic DEM file with flat geometry in ArcGIS Desktop?

texts:
I want to create a basic DEM file in .ascii format which will just be a rectangular grid and with no slope i.e same elevation at every cell.

Please provide information on how to achieve this.

I am using ArcGIS 9.3.


texts: Grid annotation in degrees minutes seconds

texts:
I am trying to create a grid and annotate it in degrees, minutes ans seconds but it is not giving the results correctly. Kindly help me in solving this. The out put of map is attached below.

mapSettings = canvas.mapSettings()
c = QgsComposition(mapSettings)
c.setPlotStyle(QgsComposition.Print)
x, y = 10, 10
w, h = c.paperWidth() - 20, c.paperHeight() - 20
mapSettings.setOutputSize(QSize(w, h))
composerMap = QgsComposerMap(c, x, y, w, h)
composerMap.moveContent(0, 0)
composerMap.setPreviewMode(1)
composerMap.grid().setStyle(3)
composerMap.grid().setFrameStyle(3)
composerMap.grid().setAnnotationFormat(7)
composerMap.grid().setIntervalX(100)
composerMap.grid().setIntervalY(100)
composerMap.setShowGridAnnotation(True)
composerMap.grid().setAnnotationPrecision(0)
composerMap.grid().setAnnotationDirection(1, 0)
composerMap.grid().setAnnotationDirection(1, 1)
composerMap.grid().setEnabled(True)
composerMap.setFrameEnabled(True)
c.addItem(composerMap)


texts: Extracting raster values to polyline feature

texts: I have a line overlaying a raster containing slope values. I would like to use the line to extract the slope values, and return to its attribute table an attribute containing percentage of slopes below 50 percent, and an attribute containing percentage of slopes above 50 percent along the total length. So far I have been able to extract the pixels coinciding with the line using "Extract by Mask". I am however stuck and not sure what to do with this resulting layer.


texts: Leaflet DomEvent.addListener - why doesn't 'click' work, but 'dblclick','mouseout','mouseover' do?

texts:
I tried to edit this Leaflet Geocoder Plugin in order to add an "X" close button to collapse the expanded geocoder div.

The plugin normally works like this: demo.

I have fiddled around with it, and now it looks like this: jsFiddle (line 56-57)

My edits include creating a submit button..

var xclose = document.createElement('input');
xclose.type = "submit";
xclose.value = 'X';
form.appendChild(xclose);

..and changing the listeners from:

L.DomEvent.addListener(container, 'mouseover', this._expand, this);
L.DomEvent.addListener(container, 'mouseout', this._collapse, this);

to:

L.DomEvent.addListener(container, 'click', this._expand, this);
L.DomEvent.addListener(xclose, 'click', this._collapse, this); //doesn't work

Question:

Why doesn't L.DomEvent.addListener(xclose, 'click', this._collapse, this); work, but the other click events do?

L.DomEvent.addListener(xclose, 'dblclick', this._collapse, this); //works
L.DomEvent.addListener(xclose, 'mouseout', this._collapse, this); //works
L.DomEvent.addListener(xclose, 'mouseover', this._collapse, this); //works

Could it be because of L.DomEvent.disableClickPropagation(container);? If so, how can I make it work? I tried removing that line, but nothing happened.


texts: Script never finishes, throws no errors and creates lock on file until restart?

texts:
I have a simple script that gets all layers in a gdb and uses them to clip a DEM. What's happening though is it starts the clipping but never finishes and after killing the process I am unable to delete the file because of some lock on the file. Any thoughts/ideas on what's causing this or how to fix it? I tried the exact parameters within arcmap with no issues and zippy performance.

[EDIT Working code below]

for dirpath, dirnames, filenames in arcpy.da.Walk(clipLayers, datatype="FeatureClass", type="ALL"):
for filename in filenames:
    if "ENG_NAME" in [f.name for f in arcpy.ListFields(os.path.join(dirpath, filename))]:
        print "Clipping: ", filename
        arcpy.env.overwriteOutput = True
        arcpy.Clip_management(dem, "#", r"M:/Masks_Test.gdb/" + filename + "_Clip", os.path.join(dirpath, filename), "0", "ClippingGeometry")


texts: Delineating coastal subbasins using SAGA GIS or GRASS in QGIS?

texts:
I'm having some problems trying to delineate watersheds using the SAGA watershed delineation tools in QGIS. I have a SRTM DEM (cell size 30 m) which I set the water cells to NULL values, following this recommendation and because I was getting weird watersheds in the big lake and in the ocean. This is my DEM:

I used the Channel Network tool to delineate the drainage network, using a Catchment area calculated using the D8 method, with a Filled DEM calculated with the Wang & Liu method.

When I try to delineate the watersheds, using the SAGA Watershed Basins tool, with the channel network calculated previously and a minimum size of 10,000, the watersheds don't reach the ocean but the rivers do, as it's shown in the following figure:

The result is similar, no matter the minimum size I use. I want to delineate a river basin with its subbasins.  I'm using the SAGA GIS tools in QGIS 2.18.11. I know I can use the Upslope Area tool to delineate the basin (which I have done succesfully), but I don`t get the subbsins. Is there something I am doing wrong?

For some reason, the watersheds delineated with the Fill Sinks (Wang & Liu) tool are closer to what I would expect. This is the result:

However, the only input for this tool is the DEM, there is no way to change the method for flow accumulation, the threshold for the channel network delineation, etc. The result is good but I have no idea how the tool works and I also need to create subbasins.

I have tried to delineate the subbasins using the watershed created with the Upslope area tool. I cut the filled DEM with the watershed and created a new Catchment Area. The problem is when I try to create the Channel network, I keep getting a message about that the extent of the grids is different. The extents are similar up to 6 decimal points. I used the resampling tool, as it's suggested in this question, with the same extent and cellsize and I keep getting the same error.

After trying with different parameters, I gave up using SAGA and I tried GRASS r.watershed tool in QGIS. I tried with Single Flow Direction and Multiple Flow Direction. I set a threshold of 10000. However, the result is similar. It seems it´s something related to the DEM I'm using, but I can´t confirm. Here is the result of r.watershed with MFD:

My DEM can be downloaded here if anyone wants to check it:

DEM for watersheds

I found this question,with a similar problem. However there is no a clear answer. When I set min size parameter to a small value (e.g. 100) the watershed reach the ocean, but there are thousands of subbasins.


texts: I drew a polygon, and then went to delete the layer I drew it in, but it didn't delete the polygon. I know have a random red shape that isn't attached to any of my layers in the middle of my project. Even if I disable all the layers, the shape remains. How do I get rid of it?


texts: ArcGIS - Convert a Shapefile into JSON with coordinates

texts:
I have a shapefile and I would like to convert in ESRI Json with ArcGIS toolbox From feature to JSON.
When i convert it I visualize x and y values in meters while I want latitude and longitude information.
How can I set this option to visualize geo coordinates in json file?


texts: Is it possible to lock a single feature from editing in ArcObjects?

texts:
We're developing an ArcMap addin. Now we need a way to lock a feature from editing/deleting. Is this possible with ArcObjects or do we have to create our own implementation of locking?

Example:

User A starts editing a feature X. The feature should now be locked from editing by everyone else until user A finishes his/her edit.


texts: Display attribute of shapefile in google earth engine

texts: I want to display a few cities along with their boundary and their name and imported the same (shapefile) in GEE but still unable to display the city name and on the top of all other layers.


texts: How to set the target schema using osm2pgrouting

texts:
Is it possible to set the target database schema using osm2pgrouting?

After some debate and troubleshooting, I've decided to host my OSM-based pgRouting data in the same database as the rest of my data, but want to use a different schema (one big issue was using dblink, which I can't get to work anyway).

However, osm2pgrouting doesn't expose the ability to specify the target schema.


texts: Spatial Views in SDE - What causes them to become unregistered from the geodatabase

texts:
Spatial views in ArcSDE allow you to join columns from a 'non-spatial' table in the database to a table with a 'geometry column'.  They can also allow you to format and choose the attribute columns that you want to have included in your feature class.

A spatial view is created with the SDE commandline tools to 'register' the view with the geodatabase.  The view won't show up in ArcCatalog unless it is registered.

I have a data maintenance process that utilizes spatial views.  After running unattended for close to a year, I am now having a problem where the spatial view becomes partially unregistered from the geodatabase.  This prevents the geoprocessor from seeing the feature class.  It also introduces the fairly common SDE issue where you can't re-create the view because the tool tells you that it already exists, but you can't delete it because the tool tells you that it doesn't exist.

Has anyone else run into this issue and come up with either a prevention or remediation strategy.

Platform: ArcSDE 9.3x, Oracle10g, UNIX.


texts: Rendering custom OpenStreetMaps style (land=white, water=black): do I need a dedicated computer just to do this?

texts:
EDIT: My goal is NOT to use OpenStreetMap or cloudmade as a web map. I described exactly what I want ("a full, rasterized set of tiles for the entire world at zoom=10 (around 68 Gigapixels, water=black, land=white, no labels"). I only meant to use the cloudmade.com link as an example to illustrate what I'm shooting for. (As it is, the cloudmade style is only 90% of the way there.) I need the tiles offline. I need the image (68 Gpix) I described as a mask in a larger raster map task for a custom map I'm building using NASA and USGS data.

As an illustration

I made a custom style that sort of shows what I want:

http://maps.cloudmade.com/?styleId=22688#

(No labels, no roads, no features of any kind except all water features (rivers, lakes, oceans, you name it) as black with land being solid white, and the nice Mapnik antialiasing of values in between.)

What I really want

I would like a full, rasterized set of tiles for the entire world at zoom=10 (around 68 Gigapixels).

I considered downloading and installing Planet.osm (11 GB compressed) and running Mapnik (for days/weeks?) to get this data. However, Planet.osm looks like it will take 100GB or maybe even 1TB once the database and index are built. I don't have that kind of disk space on my laptop and since I don't need the full dataset, is there a smaller subset of the data I could download (it says here that the polygon data is only 700 MB)? Actually from what I can tell, the data has doubled in size in the last year so I would need a beefy machine to deal with this.

Is there an easier, direct way to get these tiles (level 10, black and white, just land on water) batched, or do I basically need a dedicated computer to do this?


texts: How can I parse the SLD file that sits in Geoserver so that I can apply the styling to WFS layer?

texts:
I have a layer that can be configured to render as WFS or WMS.  I want to apply the same sld styling that I have defined in Geoserver to make it consistent.  But when I try to get the SLD text from geoserver I get an empty text.  I use the following code to get the style from geoserver:

void init()
{
   OpenLayers.Request.GET({
        url: "http://localhost:8080/geoserver/rest/styles/general.sld",
        success: complete
    });
}

function complete(req) {
    var format = new OpenLayers.Format.SLD();

    sld = format.read(req.responseXML || req.responseText);

    setLayerStyles();
}

The req.responseXML and req.responseText is always empty.  However, if I copy the sld file locally and then try to do a get I will successfully get the text from the sld file.

If I try to open the link on the web browser using the geoserver sld link then the browser attempts to download the file instead of viewing it.  This could be the reason why the text returned is empty.  If I try to open the sld link locally that I copied across from geoserver then the file would open up in the web browser.

Any one know how to solve this?


texts:
I am new with leaflet and I need help to change the color of a polygon on a choropleth map dynamically.

In my website I have an slider, and depending on the position of the handle, the colors of the polygons of the map vary. So I need to make these changes automatically.

I have found two options to do so, but they are too slow.

The first solution is to remove all the map and to create another one with the updated information. As the map is formed of several poligons it takes too much time so it is not a good solution.
The second one is to introduce a new layer to the map with the information of the updated polygons above the old ones. Although at first it works well after several changes the map goes slower.

I have other two posible solutions but I don't know how to implement them:

The first one is to use "onEachFeature" function. However as in my case the changes of the map are not related with the mouse events I don't know how to activate it.
The second one is to make the changes on the poligons of the map manually, but I don't know if it would be posible.

I would be grateful if someone could give me a solution to my problem.

PD: I try to explain my problem as well as possible, however if there is something that you do not understand I could explain it with more details.


texts:
I'm trying to use GDAL using C++ but I get NULL always when I try to open a WFS server for getting the data set

  const char *pszFilename = "http://demo.opengeo.org/geoserver/wfs";

    GDALDataset  *poDataset;    GDALAllRegister();
    poDataset = (GDALDataset *)GDALOpen(pszFilename, GA_ReadOnly);


texts: QGIS 3.10.3 crashes removing a polygon layer created via script

texts:
I created a polygon layer from a line layer(qgis:linestopolygons), set its style ('qgis:setstyleforvectorlayer') and put it in a group of layer table.
Everythings works but when script has completed and I try to remove the new poligon layer or I try to begin a new project by the relative menu commands, QGIS crashes.
If I load the same layer with menu command, then I can remove it without QGIS crash. Below the code:

alg_params = {
            'INPUT':stats['EstraiTramiteEspressione']['OUTPUT'],
            'OUTPUT':self.dlg.mQgsFileWidget_3.filePath() + "/pol_cdl.shp"
        }
        outputs['DaLineeAPoligoni'] = processing.run('qgis:linestopolygons', alg_params)

    vlayer_pol = QgsVectorLayer(self.dlg.mQgsFileWidget_3.filePath() + "/pol_cdl.shp", "pol_cdl","ogr")
    crs = vlayer_pol.crs()
    crs.createFromId(4978)
    vlayer_pol.setCrs(crs)
    QgsProject.instance().addMapLayer(vlayer_pol,False)

    sty=self.dlg.mQgsFileWidget_5.filePath()+'/cdl.qml'
    alg_params = {'INPUT': vlayer_pol, 'STYLE': sty}
    outputs = processing.run('qgis:setstyleforvectorlayer', alg_params)

    #crea gruppo per tipo e trasferisce layer
    groupName = tipo + " da " + dap + " a " + ap
    root = QgsProject.instance().layerTreeRoot()
    group = root.addGroup(groupName)
    group.insertChildNode(0, QgsLayerTreeLayer(vlayer_pol))      root.findLayer(vlayer_pol.id()).setCustomProperty("showFeatureCount", True)

    if self.dlg.checkBox_13.isChecked():
        return


texts: Getting huge range of values when using Flow Accumulation tool in ArcGIS Desktop?

texts:
I'm trying to use ArcGIS Desktop to delineate watersheds for a series of sampling sites. I've been following the protocol laid out by WhiteboxDev in General steps to create watershed boundary in ArcGIS Spatial Analyst?

However, I'm having troubles with the flow accumulation tool. When I run it based on my flow direction raster, I end up with values that range from zero to nine million, which seems wrong, and can't be used for the next steps.

Does anyone have an idea why this might be happening, and what I can do to fix it?

I haven't used any other layers to weight the output, and I think my flow direction layer is accurate.

I'm using the NASA SRTM elevation data, which has 1 arc-second (~30 m) cells. In Arc, the cell dimensions are listed as (0.00027777778, 0.00027777778), which I assume is in degrees. I understand the idea of the flow accumulation tool, I just don't understand why it's skewing all of my data.


texts: If I have a SDE table view between two Feature Classes am I able to drag and drop into ToC or will I have to create a feature class of the tableset? The files are in a SDE database. I would also like to be able to export as an excel file.


texts: Python script hanging forever in Pycharm with import arcpy?

texts:
I'm trying to get arcpy to work in Pycharm. I've done this successfully in the past. However, now when I try to do anything involving arcpy in Pycharm, the program runs then hangs forever. I have it down to a simple print statement. When I import arcpy it prints but hangs. When I remove arcpy it prints and exits. Any ideas? I just reinstalled both arc and pycharm. I don't think it would have anything to do with the fact I'm using arcgis 10.4?

import arcpy
print 'why is this not exiting?'


texts: How to determine the individual slope values of GPS point features in ArcGIS Pro

texts:
I have created a geodatabase raster displaying the slope of a region's terrain and have a number of GPS points which I uploaded into ArcMap (using the GPX to features tool). The points are locations of several animals in the wild, and I wish to work out what incline/slope in metres each point falls on. This is to assess if individuals have preferences for steeper or flatter terrain within their habitat. As my raster file was converted from UTM it is already in metres. I'd ideally like the output to include a list of the points with the corresponding slope in metres in a separate column.

Do I need to perform an overlay function to do this? I am currently using ArcGIS Pro.
I am somewhat familiar with ArcGIS but not to a highly skilled level.


texts: WFS Filter performed before or after reprojection?

texts:
I'm trying to perform a WFS filter with a polygon in EPSG:3031, (the native projection is EPSG:4326 I think). And I'm aware that WFS/GeoServer supports reprojection on the fly. But will the features be filtered before or after they are projected into 3031? That is, does the polygon get projected to the 4326, and then the filter results are projected back, or are the features projected to 3031, where they are filtered?

How would I write a query to do the filtering in the non-native projection? Is this possible?


texts:
I have a digital elevation model.
I want to select the areas where the angle of elevation between a given peak and any other point on the map is bigger than a certain degree.

More simply put, I want to show where a certain mountain looks "big". Is there a way to do it in QGIS?


texts: Geopackage: update query generates an error "no such function: ST_IsEmpty"

texts:
I created a geopackage using QGIS 2.18.3 and it works fine with QGIS. I am using SQLiteStudio 3.1.1 to add check constraints and again, the geopackage has been working fine. However, if I try to execute an update query that sets a single column to NULL (update ParkTrees set system_id = null) using SQLiteStudio I get this error:

[07:33:14] Error while executing SQL query on database 'ParkTreesFileSpec': no such function: ST_IsEmpty

How do I edit data in geopackage created by QGIS without using QGIS?


texts: Why my Google Sheet document is not updating in ArcGIS Online?

texts:
I have a Google Sheet that updates from a survey I have live in Google forms. I added this to my content in ArcGIS and added as a layer to a map. I was sure to set the refresh interval. I have been checking the map every single time there are changes in the original Google Sheet, but these are not reflected in the map.
I also tried by adding the file directly to the map as a .cvs (Add layer from Web) using the URL provided in google and making sure this is set to 'published'. however, I get the same result. Actually, when I try to do this there is a note saying 'Features will not update if referenced CSV changes.'
So, I would like to know how could this be done. I'm stock with Google sheets as this is linked to the survey, which is where I got my data.


texts: Calculating summary statistics of table while prioritising certain values

texts:
I have a data set of species each of which is assigned a score, for each spatially joined location (grid square) I need to find the sum score of unique species. There is a complication in that subspecies are involved, where a subspecies and parent species are present in the same location, only the score from the subspecies should be taken.
See below for an example
    Species     Site   Score
    SppA         1      5
    SppB         1      1
    SppASsp1     1      1
    SppA         1      5
    SppA         2      5
    SppB         2      1
    SppA         2      5

In the above example, site 1 would score 2, as the score for SppASsp1 (the subspecies) would be prioritised over SppA (The parent species) along with SppB. Site 2 would score 6 as only SppA is present along with SppB.
Is there anyway to achieve this using ArcGIS Pro or otherwise (QGIS, Python, Pandas perhaps?), I have undertake a crude analysis using Summarize within but this doesn't allow to prioritise certain values. I feel I would need to make an additional column (eg priority) but am not sure how to progress beyond this.
I would like the output to comprise unique species and prioritised subspecies where applicable, the above example would look like this:
    Species     Site   Score
    SppB         1      1
    SppASsp1     1      1
    SppB         2      1
    SppA         2      5

this would then allow me to use summary statistics to calculate the final site score:
Site   Score
1      2
2      6


texts: Set colors in colormap to specific index values

texts: I have multiple pictures with 8 bit indexed colors (0-255). In the end I want some of the colors at specific index values. Black has to be value 0 and white 255. Is there a possibility in ArcGIS to change the index position of colors? If not, maybe there is some different solution?


texts:
I've wrote below code for an aerosol changes video, using Sentinel-5 products. When I'm going to save the video in Google Drive this error occurred:

  Task details: myvideo

  State: Failed

  Started 17s ago (2019-08-27 20:18:34 +0430)

  Runtime: 9s

  Id: ZTMTUZWKR2TUL3TXP0E57VBZ

  Source script

  Error: ImageCollection must have 3 or 4 bands

code link: https://code.earthengine.google.com/9127141eaed10f0c40b485f488c202e9

var dust = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_AER_AI')
.filterBounds(table)
.filterDate('2018-01-01','2020-01-01')
.select('absorbing_aerosol_index');

var dust_test = dust.map(function(img){
return img.clip(table);
});

var coll4Video = dust_test
  .map(function(image) {
    return image.uint8();   // need to make it 8-bit
  });

Export.video.toDrive({
    collection: coll4Video,
    description: "myvideo" ,
    scale: 1000,
    framesPerSecond: 2,
    region: table
});


texts:
Is this the the best solution to calculate the area of the features?

parent = iface.mainWindow()
mc = iface.mapCanvas()
fldname = "m2" #field which has the values for squaremeters
myLyr = mc.currentLayer()
d = QgsDistanceArea()
d.setSourceCrs(myLyr.crs(), QgsProject.instance().transformContext())
d.setEllipsoid(QgsProject.instance().ellipsoid())
#https://gis.stackexchange.com/questions/309721/creating-and-updating-a-field-from-calculation?rq=1
#https://gis.stackexchange.com/questions/289601/how-to-fill-fields-with-layer-name-in-pyqgis
with edit(myLyr):
   fldindex = myLyr.fields().indexOf(fldname)
   if fldindex == -1:
       print("Das gesuchte Feld {} ist nicht im Layer {}!".format(fldname, myLyr.name()))
   else:
       fts = myLyr.getFeatures()
       for f in fts:
           geom = f.geometry()
           v=(d.measureArea(geom))
           #print("Fläche in qm ist {}!".format(v))
           f[fldindex]=v
           myLyr.updateFeature(f)


texts: Error when importing buildings from OSM through BlenderGIS?

texts:
When I try to import buildings using the addon BlenderGIS, I receive these errors (image).
What is causing this?


texts: Getting specific airport information with Overpass API

texts:
Hello I am new to OpenStreatMap and Overpass API.

I would like to make a query in such a way that I can specify an airport name (for example: wien flughafen austria or the ICAO code) and get nodes, ways and relations about the taxiway, taxilane and parking_position.

I was able to achieve this by using the osmnx python package by typing:

G = ox.graph_from_place('wien flughafen austria',
                        infrastructure='way["aeroway"]',
                        simplify=False,
                        custom_filter = ('["aeroway"~"taxiway|taxilane|parking_position"]'))

However I would like to do it using the Overpass API. I know that a way to make more specific queries is by using http://overpass-turbo.eu/ interface.

The maximum I was able to achieve was by typing:

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“aeroway=aerodrome and icao~=LOWW global”
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “aeroway=aerodrome and icao~LOWW”
  node["aeroway"="aerodrome"]["icao"~"LOWW"];
  way["aeroway"="aerodrome"]["icao"~"LOWW"];
  relation["aeroway"="aerodrome"]["icao"~"LOWW"];
);
// print results
out body;
>;
out skel qt;

This however does not contain information about the taxiway, taxilane and parking_position.

Would you be able to suggest the right way to make the query please?


texts: getPart() method returns incorrect geometry from buffer in ArcGIS

texts:
I created 4 most basic polygons:

And ran this script:

import arcpy
infc = r'D:\Scratch\POLYGONS.shp'
d=arcpy.Describe(infc)
SR=d.spatialReference
with arcpy.da.SearchCursor(infc, ("SHAPE@","LABEL")) as rows:
    for shp,label in rows:
        buf=shp.buffer(5)
        n=buf.partCount
        for i in xrange (n):
            prt=buf.getPart(i)
            pgon=arcpy.Polygon(prt,SR)
            arcpy.AddMessage((int(buf.area),int(pgon.area),label))

OUTPUT:

[68735, 68707, u'RECTANGLE']
[29892, 29846, u'TRIANGLE']
[47832, 47832, u'CIRCLE']
[55126, 55060, u"'COMPLEX'"]

Anybody could possibly help me to understand result.

UPDATE:

I modified the code:

import arcpy
infc = r'....POLYGONS.shp'
outBuffer=r'...OUT_BUFFER.shp'
outPart=r'...SCRARCH\OUT_PART.shp'
d=arcpy.Describe(infc)
SR=d.spatialReference
with arcpy.da.SearchCursor(infc, ("SHAPE@","LABEL")) as rows:
    for shp,label in rows:
        buf=shp.buffer(5)
        arcpy.CopyFeatures_management(buf, outBuffer)
        n=buf.partCount
        for i in xrange (n):
            prt=buf.getPart(i)
            pgon=arcpy.Polygon(prt,SR)
            arcpy.CopyFeatures_management(pgon, outPart)
            break

to check actual shapes. When working with geometries it would be expected that the first part of a single part polygon would be identical to the polygon itself.

This is an overlay of input and outputs and you can see where mismatch happened - at the corners:

Something very sinister is happenning inside arcpy.Polygon, it simplifies the shape using some sort of 'logic'. Handling true curves(?). Why result is so ugly?

NOTE:

same result obtained with exporting to geodatabase
both outputs came up with input's spatial reference

This buffer issue is a part of a bigger job, where I have to deal with potentially multi-part polygons. The workaround I am using is explosion of buffer to single parts, using arcgis tool (!). It works, but ridiculously slow due to number of iterations. Why on earth the abc of geometry handling is not working?

If you know solution different from my workaround,  I'll award 200 points to your answer.

Well, as it happens, after posting I realised I shouldn't be bothered with parts of the buffer, because label point of polygon is placed inside larger part of multipart polygon.


texts:
I have gone through similar questions to mine here, but I didn't find a solution. Please help!

When cropping a raster image by using g.region & r.mapcalc, I get a new image but the resulting  image doesn't have the same resolution. I have used r.resample in the outer raster map but is still different. I have tried to change the resolution using g.region, and even though the resolution is the same, the image display is not.

Is there a way in grass to cut an image from the main raster image and keep the resolution unchanged?

Also, I have tried using zoom to choose the crop area and its works! but as I have to do the same with a lot of images and need to be precise (when zooming), so it is difficult and takes a lot of time.

How could I solve this? Many thanks!


texts:
I want to do ->Layers Panel -> select Layer -> go to properties -> change style -> changing angle from python .

Please suggest required python api.


texts: GeoServer UTF-8 WFS Export UTF-8 Problem

texts:
I've been working on a problem and I still can't find the solution. I've a
UTF-8 table and a view from this table which is published as a WFS service
in GeoServer. I can export UTF-8 characters in GML but I can't change
encoding in JSON and SHP export which seems to be Western - Windows 1254.

How can I change the encoding to UTF-8 to fixed the shown of special
characters?

Best regards.

A.


texts:
I try to make a menu bar with icons which show the same icons in the map when clicked, for example hotels or bars.

I made a form with radio buttons for choose and click submit. This goes to PHP, connects to PostgreSQL, executes the query, and returns a result. It is not good solution though, because I want the user click on a icon to dynamically show the icons in map without any need to click on a submit button.

Is it possible, does an example exist?

I try to make it with jQueries and AJAX
i make a jQuery which if i click show a alert massage i try to put the AJAX conection to return the JSONarray but is not make anythin
This is a snapshot of php and javascript code.
PHP
conectin database
make fetch

insert  data in array with this line of code

if($type=="warning"){

while ($row = pg_fetch_array($result,null, PGSQL_ASSOC)) {

        $row_array['gid'] = $row['gid'];
        $row_array['cause'] = $row['cause'];
        $row_array['duration'] = $row['duration'];
        $row_array['image'] = $row['image'];
            $row_array['km'] = $row['km'];
        $row_array['coords'] = json_decode($row['geom'], true);

        array_push($json_response,$row_array);
    }
}
   echo $json_response;

JavaScript
code

$(document).ready(function(){
                $(".warning").click(function(event){
                    $.ajax({
                        url: 'php/ajax-follow.php',
                        type: 'post',
                        data: {'type': 'warning'},
                        dataType: 'json',
                        success: function(data) {
                            imgAr = JSON.parse($json_response);
                            alert(imgAr);
                        },
                        error: function(xhr, desc, err) {
                            console.log(xhr);
                            console.log("Details: " + desc + "\nError:" + err);
                        }
                    });
                });
            });


texts: How to convert a compound geometry (Oracle) to a geometry made of straight line segments only?

texts:
I have an Oracle Spatial table containing compound geometries (i.e. geometries containing both straight lines segments and arcs) that I want to project in another reference system.

Using SDO_CS.TRANSFORM returns:

13294. 00000 -  "cannot transform geometry containing circular arcs"
*Cause:    It is impossible to transform a 3-point representation of
           a circular arc without distortion.
*Action:   Make sure a geometry does not contain circular arcs.

Is there a way to convert the arcs to straight lines with a SQL request?

I've read Converting arcs to straight line segments? which mentions using FME or ArcGIS Desktop to do the conversion but I don't have access to such tools. What I am looking for is a way to do that only with Oracle Spatial (I do not care if the resulting segments are raw approximations of the original geometries).


texts:
I've been trying to use the Function Editor in QGIS to create a function to return the end of a string following some kind of delimiting character (as I can't find a right-sided equivalent to strpos), but get an Expression is invalid error when I try to use it.

The function is defined in the Function Editor as follows:

from qgis.core import *
from qgis.gui import *

@qgsfunction(args=2, group='Custom')
def RightOfString(delim, inpstring, feature, parent):
    'Returns values to the right of a '\
    'delimiting character.\n'\
    'Syntax:\n'\
    'RightOfChar([delimiter to find], [Expression])'
    k=str(inpstring).rfind(delim)
    if k > 0:
        return str(inpstring)[k+len(delim):]
    else:
        return str(inpstring)

When I try to call this using RightOfString( '- ', "Description" ) (where Description is a field in my table), I get an Expression is invalid error. The "More info" part of the Output preview gives the following:

Parser Error:

Eval Error:
RightOfString() takes exactly 4 arguments (3 given)

If I remove the feature, parent from the definition I still get the same kind of error, in which it thinks I have provided 3 arguments.

Any ideas of how to fix this, or of another formula that can do something similar?


texts: How to load the only selected features from the layer in postgresql to Qgis canvas

texts:
I am using the uri to load the layer from the postgres to qgis canvas but it is not loading the selected features without where condition it is loading the lAYER.

    canvas = qgis.utils.iface.mapCanvas()
    csql='ST_Intersects("p1".geom, "p2".geom)'
    uri = QgsDataSourceURI()
    uri.setConnection("localhost", "5432", "ZBE", "postgres", "postgres")
    uri.setDataSource("public","Sample", "geom",csql,"dn")
    vlayer = QgsVectorLayer(uri.uri(), "test", "postgres")
    if not vlayer.isValid():
        print "not valid"
    QgsMapLayerRegistry.instance().addMapLayer(vlayer)
    canvas.refresh()


texts: Need to match the Coordinate system on vector and raster datasets

texts:
I have a google satellite image that I am using as my basemap. The problem is that the shp files that I got from some source are projected in WGS 1984 UTM, Zone 42 North, Meter, but its GCS is 'unnamed'. I tried using 'go to xy' with the raster image and everything seems to be fine there. Although I tried projected the datasets using 'define projection' too but to no use.

When I simply drag the shapefiles over the raster image there is just a slight difference between the projection. I need the datasets to align accurately.


texts: FME Workbench cannot be run outside of the ArcGIS environment

texts:
Just upgraded from ArcGIS 10.3.1 to 10.5 and am now trying to run a spatial ETL tool from command line. I have ArcGIS and the Data Interoperability extension but I do not have stand-alone FME installed.   I never had a version older than 10.3.1 on this computer. I get the error saying it can't be run outside of the ArcGIS environment described in the article below. We have concurrent use licensing. Should I follow the instructions in this article or does it only apply to much older versions? I can't quickly test this on my own due to restrictions on the computer, so I'd like to know if this is what I need to do in advance.

https://knowledge.safe.com/articles/474/fme-workbench-reports-that-it-cant-be-run-outside.html


texts: arcgis 10.3.1 crashes when trying to click on raster properties

texts:
I am trying to open the properties of a raster dataset, however Arcgis 10.3.1 crashes every time I try to click on raster properties. This happens in ArcCatalog and in ArcMap, and with any raster dataset saved in either a geodatabase and folder.

I've had 10.3.1 for two months though haven't worked with raster datasets until now. I never had this issue with previous versions of ArcGIS

A google search found me this link https://geonet.esri.com/thread/172145 where someone had the same problem but there's no resolution.

What else should I try to fix this frustrating situation?


texts: Update for Deprecated setLayerInsertionPoint() in QGIS3

texts:
The setLayerInsertionPoint() with the QgsProject.instance().layerTreeRoot() object is deprecated.  The documentation says:
since QGIS 3.10 use setLayerInsertionPoint( const InsertionPoint &insertionPoint ) instead

but I can find no example of how to implement this update.  My current code is as follows:
QgsProject.instance().layerTreeRegistryBridge().setLayerInsertionPoint(QgsProject.instance().layerTreeRoot(), 0)

It seems the only change is the first argument.  How should I update the statement to comply with current requirements?
QgsProject.instance().layerTreeRegistryBridge().setLayerInsertionPoint([what_goes_here?], 0)


texts: ArcGIS Versioning, Post & Reconcile, Compressing, and Lost in Space

texts:
Here is the short version, and I'll post the long detailed version below.

I'm needing to figure out an easier way to post changes to the data on our SDE Geodatabase. Versioning is not setup, and the data posting process is horrendous.

I supposed to get on the GIS server, kill all GIS services manually, kill all remaining user connections manually, then using ArcMap, update the data and make changes, set as registered any files that need it, reapply privileges, and then restart GIS server services.

Assuming "versioning" will fix my problem and allow me to his "reconcile" and the "post" and then DONE then that is what I need help setting up with the pre-existing SDE geodatabase. ArcGIS 10.0 is what we have currently along with SQL Server 2008.

Long version: So we lost our GIS admin, and the person before the last admin actually setup the server. I don't think either of them really knew too much about what they were doing administratively and the server is most likely not working correctly. I have ZERO training with ArcGIS but have visited several places nearby with GIS. Every other place I've visited has a simple process of hitting two buttons: Reconcile & Post. There is no taking anything offline, or messing the SDE, or anything of the sort.

I'm struggling with these vague instructions left to me and I really need to figure out how to not only post data sent to me by GIS analysts, but how to properly setup and administrate our current server, until we go to 10.2 which a vendor will be setting up CORRECTLY from the ground up. I've found mentions of compressing databases in the help that ESRI provides, but I still haven't found a way to do it. The walkthrough doesn't seem to work on our setup. I'd really like to find out how to not only get versioning going, and users setup, but to get the GIS database maintained automagically.


texts: Change data source encoding of GetFeatureInfo response for a WMS in QGIS

texts:
How do I change the data source encoding of the GetFeatureInfo Request of a WMS-Layer in QGIS 2.18.x/3.x? I can't find any setting to handle the encoding. I need UTF-8 encoding for special characters like 'ä;ö;ü;ß' of a german WMS-Service.

As you can see in the screenshot below, the "Identify Results" shows a wrong charset.


texts:
I am using this example to setup a control layer.

http://leafletjs.com/examples/layers-control.html

L.control.layers(baseMaps, overlayMaps).addTo(map);

How do I just update overlayMaps with latest markers? In other words, the user may or may-not have the overlayMaps "checked" and I just want to update the markers based on latest data.


texts:
I am using the metadata catalogue Geonetwork which deals with the metadata.
As far as I can see this metadata contains details about createdate,changedate,origin,title etc but does not contain anything related to features of the geographical data. I just want to be sure about my understanding
Correct me if I am wrong


texts: Discontinuous elevation contours at boundary of CanVec datasets

texts: I am using Quantum GIS and I am working with the elevation contours from two adjacent CanVec datasets.  The problem is that many of the contours' endpoints at the shared boundary do not coincide with their counterpart from the other dataset.  I want to have these endpoints connected and then I want to merge the two datasets into one.  Can anybody give any suggestions on how to do it?


texts: Selecting points within polygon and updating attributes using ArcPy?

texts:
I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales area they are in and update their attribute table to show the sales area. I have searched python+point+in+polygon for other posts and I know how to select the polygons but I can't figure out how to populate the address points.

I found the following script that works but takes almost two hours to run.

import arcpy
import os

# Allow overwrite
arcpy.env.overwriteOutput = True

# Script user input parameters
polygonLayer = arcpy.GetParameter(0)
pointLayer = arcpy.GetParameter(1)
workspace = arcpy.GetParameter(2)
copyField = = arcpy.GetParameterAsText (3)

# Add new field to target feature class
fieldList = arcpy.ListFields(pointLayer)
fieldNameList = []
for field in fieldList:
   fieldNameList.append(field.name)
fieldType = arcpy.ListFields(polygonLayer,copyField)[0].type
if not copyField in fieldNameList:
    arcpy.AddField_management(pointLayer, copyField, fieldType)

arcpy.MakeFeatureLayer_management(polygonLayer, "PolygonLayer")

pntCursor = arcpy.UpdateCursor(pointLayer)
for pnt in pntCursor:
    rowID = pnt.OBJECTID
    arcpy.MakeFeatureLayer_management(pointLayer, "PointLayer", '"OBJECTID" = ' + str(rowID))

    # Polygon selection based on CONTAINS selection method
    arcpy.SelectLayerByLocation_management("PolygonLayer", "CONTAINS", "PointLayer")

    # Copy field values from polygon to point layer
    polyCursor = arcpy.SearchCursor("PolygonLayer")
    for poly in polyCursor:
        pnt.setValue(copyField, poly.getValue(copyField))
        pntCursor.updateRow(pnt)

    arcpy.Delete_management("PointLayer")

del pntCursor, polyCursor, pnt, poly

I don't think I need to create a new field so I have simplified my script too:

# Import arcpy module
import arcpy
import os

# Allow overwrite
arcpy.env.overwriteOutput = True

# Script user input parameters
polygonLayer = arcpy.GetParameter(0)
pointLayer = arcpy.GetParameter(1)
workspace = arcpy.GetParameter(2)
fsaPoly = arcpy.GetParameterAsText (3) #FSA in FSA_Boundaries
fsaPnt =  arcpy.GetParameterAsText (4) #FSA in Addresses

# Select all Address in FSA
 polyCursor = arcpy.SearchCursor("PolygonLayer")
   for poly in polyCursor:
# Select based on CONTAINS
    arcpy.SelectLayerByLocation_management(poly, "CONTAINS", "PointLayer")

# Add FSA to Address
        pntCursor = arcpy.UpdateCursor("pointLayer")
            for pnt in pointCursor:
            pnt.setValue(fsaPnt, fsaPoly)
            pntCursor.updateRow(pnt)

del pntCursor, polyCursor, pnt, poly

I know my update cursor is wrong but i'm stuck on how to update one feature class using information selected from the other.

I know I can do this manually but I need to do it for multiple cities so I would like to automate the process.

I am using Arc 10.2.2 to run my python script.