texts: Georeferencing X Y (AND Z) with GCPs in QGIS

texts:
I have GCPs recorded to centimeter precision in lat, long, and elevation.
I want to georeference my UAV-photogrammetry-generated GeoTIFF and DEM with these GCPs (since the GPS on my UAV is only accurate to 5 meters).
I have only found tutorials describing how to use the "Georeferencer" in QGIS to georeference a GeoTIFF in XY with GCPs via their lat/long coordinates.
As this will definitely benefit the horizontal accuracy of my model by correcting any global horizontal warping of the GeoTIFF, it seems the elevation data from my GCPs will be unused.

Is there a way to also incorporate the elevation data from the GCPs?
I imagine my DEM would benefit from the elevation data of a dozen properly placed GCPs (in the peaks and valleys).

Is there an algorithm in QGIS to effectively "warp" or "stretch" the DEM in the "3D space"?
I imagine that the DEM could do a "best fit" and connect through the elevation points of the GCP coordinates while smoothly interpolating the curvature in-between based on the original DEM data?


texts:
I would like to be able to intercept QGIS panels (QDockWidgets) closings.

I read the API online help but i don't clearly understand it.Is there any usable close signal linked with dockWidgets?

In a next step i would like to implement my own QDockWidgets with their own behaviour but ... how can i achieve this for existing integrated QGIS panels?


texts: Find the closest line to a polygon Python Rtree

texts:
I have a series of fields and roads I am trying to find the nearest road to each field. I want to add field to each of my polygons with the index/name/etc of the closest road.

Would this be the correct method to find the nearest road for each field?

Below is the code i am trying

So i have loaded my shapes and created an empty index.

fieldlyr = fiona.open(fields, 'r')
roadlyr = fiona.open(roads, 'r')
# search radius, i've changed sizes to make it large enough
areaft = 2500
index = rtree.index.Index()

So i add my fields to the index?

for fid, feat in fieldlyr.items():
  geometry = shape(feat['geometry'])
  index.insert(fid, geometry.bounds)

I then buffer my roads

for feat in roadlyr:
  geometry = shape(feat['geometry'])
  geometry_buffered = geometry.buffer(areaft)

Then i believe this will give me the lists of intersections?

fids = [int(i) for i in index.intersection(geometry_buffered.bounds)]

How would i get road id A is nearest to polygon id 2 and so on.

is this even the correct method?


texts: Changing Datasource of layer in mxd using ArcPy?

texts:
I want to change the datasource of a layer in mxd by programmatically using ArcPy, I have write some code and executed but not getting any results. Please suggest me how to modify my code for results.

import arcpy
mxd = arcpy.mapping.MapDocument("C:\Users\_gis_dev_gds\Desktop\ForDataSource\India_Admin0.mxd")
mxd.findAndReplaceWorkspacePaths("C:\Users\_gis_dev_gds\Desktop\ForDataSource\IND_adm","C:\Users\_gis_dev_gds\Desktop\ForDataSource\IND_rds")


texts: Need to learn more about Precision and Accuracy

texts: I am currently taking Introduction to Image Interpretation online and there is a section in it that talks about Precision and Accuracy. I wanted to know if someone out there has any good information that I can use to learn more about it.


texts:
I'm trying to make a quite simple analysis in Postgis, but I'm finding some problems. I want to in the first place create buffers for then, intersects themselves but one, this will be differenced. With this product I want to intersects again with another layer. But, here is the problem Postgis complains about a non-existent error topology. I say non-existent because there is no feature in that coordinate.

> Error performing intersection: TopologyException: Input geom 1 is
> invalid: Self-intersection at or near point 723120.23091093975
> 4379700.195452339 at 723120.23091093975 4379700.195452339

Here is the SQL sentence that I'm using:

     select 1 as id, st_intersection(diff_1.st_difference, mapa_ruido_dia.geom)
    from
    (select 1 as id, st_difference(intersectionEMT_valenbisi_carrilBici.st_intersection, buf_ocio.st_union)
    from
    (select 1 as id, st_intersection(buf_carril_bici.st_union,inter_emt_valenbisi.st_intersection)
    from
    (select 1 as id, st_intersection(buf_emt.st_union,buf_valenbisi.st_union)
    from
    (SELECT 1 as id, ST_union(st_buffer(emt_paradas.geom, 200)) FROM emt_paradas )as buf_emt,
    (SELECT 1 as id, ST_union(st_buffer(valenbisi.geom, 200)) FROM valenbisi )as buf_valenbisi) as inter_emt_valenbisi,
    (SELECT 1 as id, ST_union(st_buffer(carril_bici.geom, 200)) FROM carril_bici )as buf_carril_bici) as intersectionEMT_valenbisi_carrilBici,
    (SELECT 1 as id, ST_union(st_buffer(ocio.geom, 250)) FROM ocio )as buf_ocio)as diff_1, mapa_ruido_dia
     where mapa_ruido_dia.gridcode='1' or mapa_ruido_dia.gridcode='2'

Here is the database

This is the place where postgis says there's a problem,and the two layers I want to intersect

EDIT:

What I try to do is the next:

First I want to create a buffer for emt_paradas, and the layer valenbisi, and then intersect them, the result I will call "intersect_1".
Second, I want to create a buffer for carril_bici, and intersect with "intersect_1". The result I will call "intersect_2".
Third, I want to create a buffer for layer ocio and make a difference with "intersect_2". The result I will call: "diff_1".
Finnaly I want to intersect "diff_1" with layer mapa_ruido_dia, ideally where the field gridcode equals one and two.


texts:
I am looking for a different, more elegant solution to a spatial statistics problem.  Raw data consists of an x-y coordinate for each individual tree (i.e. converted to a point .shp file).  Although not used in this example, every tree also has a corresponding polygon (i.e. as a .shp) which represents the crown diameter.  The two images on the left show landscape-scale kernel density estimates (KDEs) derived from a point .shp file of individual tree locations--one from 1989 and the other from 2009.  The graphic on the right shows the difference between the two KDEs where only values +/- 2 standard deviations of the mean are displayed.  Arc's raster calculator was used to perform the simple calculation (2009 KDE - 1989 KDE) necessary to produce the raster overlay on the right hand image.

Is there a more appropriate method for analyzing tree density or canopy area change over time either statistically or graphically?  Given these data, how would you assess the change between the 1989 and 2009 tree data in a geospatial environment?  Solutions in ArcGIS, Python, R, Erdas and ENVI are encouraged.


texts: Unable to load .glb (GLTF) in a scene of GIScene.js

texts:
I would like to load a .glb file, which is the binary format of GLTF in a scene of GIScene.js (https://giscience.github.io/GIScene.js/).

    <meta charset="UTF-8">
    <title>GIScene.js Scene</title>

GIScene.js - Scene

Using this code, nothing is loaded in the scene of GIScene.js. I know that we can load a GLTF and/or GLB file using three.js. I am not sure if we can load a GLTF and/or GLB file in GIScene.js, even though GIScene.js is based on three.js. Can someone explain how to solve this issue, if it is possible.


texts:
I am trying to do a buffer analysis of my shapefile by Python script but I have this problem in every beginning.

The warning message is:
ImportError: cannot import name 'QgsGeometryAnalyzer' from 'qgis.analysis'

I am using QGIS Desktop 3.6.1.

Does anyone know how to solve this issue? Should I install QgsGeometryAnalyzer manually?


texts: Need geocoding service to replace geocode.com service

texts:
I have used the geocode process at geocode.com for many years and now they are no longer doing this service so I'm looking for another service to help me with my geocoding.  I wanted to list out what I'm looking for and I wanted to see if anyone knows of another service that could provide me this information.  I'm looking for a batch geocoding process that I will need to run about 100,000 address once every year or so.

These are the fields that were returned from the previous process I used.

STD_ADDR -    Postal standard street address
STD_CITY -    Postal standard city name
STD_ST   -    Postal standard state abbreviation
STD_ZIP  -    Postal standard 5-digit ZIP code
STD_P4   -    Postal standard Plus4 code
STD_CR   -    Postal standard carrier route
MAT_ADDR -    Matched Address
MAT_CITY -    Matched City
MAT_ST   -    Matched State
MAT_ZIP  -    Matched ZIP code
MAT_LAT  -    Matched latitude (decimal degrees)
MAT_LON  -    Matched longitude (decimal degrees)
FIPS_ST  -    State FIPS code
FIPS_CTY -    County FIPS code
CEN_TRCT -    Census Tract
CEN_BLK  -    Census Block
FIPS_PLC -    FIPS Place
FIPS_MCD -    FIPS MCD Code
FIPS_MSA -    FIPS MSA Code
MAT_CENT -    Centroid Type Code
CBSA     -    CBSA Code
METROD   -    Metropolitan Division Code
MICROF   -    Micropolitan Flag
MAT_STAT -    Matchmaker Status Code
MAT_TYPE -    Match Type Code


texts: How to write a custom function for a label?

texts:
One of my projects has a layer label that is calculated by an expression from seven field values as follows:

 if(coalesce("caption" ,'') = '', '', "caption" || '\n') || trim(concat("Distance",' ', "Unit", ' ', "Label", ' ',"Distance 2",' ', "Unit 2", ' ',"Label 2", ' '))

I want to replace this with a custom function in order to do some additional processing without writing a very complex expression.

Using the function editor I have put this custom function in.

from qgis.core import *

from qgis.gui import *

@qgsfunction(args='auto', group='Custom')

def loclabels(capt, dist1,unit1,label1,dist2,unit2,label2, feature, parent):

    cap=coalesce(capt,'')

    cap2 = trim(dist1 + ' ' + unit1 + ' ' + label1 + ' ' + dist2 + ' ' + unit2 + ' ' + label2)

    if cap == '':
            fullcapt = cap2
    else:
            if cap2 != '':
                fullcapt = cap + '\n' + cap2
            else:
                fullcapt = cap

    return fullcapt

Calling this and passing the same fields as the original expression always returns a null value. In fact even trying to return a constant returns a null. The function is syntactically correct (no errors in the code) but simply fails to return any useful data.

What is missing?


texts: Displaying PostgGIS geometry on GeoDjango map widget?

texts:
I'm trying to display a custom map feature on a GeoDjango map. The geometry is a multipolygon stored in a PostGIS database backend.

And I have trouble to find the correct piece of documentation that explains how to load and add my geometry from the database. This is what my PostGIS contains:

SELECT * FROM aptroomat_worldborder;

This is my model.py equivalent in my GeoDjango project:

from django.contrib.gis.db import models

class WorldBorder(models.Model):
    name = models.CharField(max_length=50)
    area = models.IntegerField()
    pop2005 = models.IntegerField('Population 2005')
    fips = models.CharField('FIPS Code', max_length=2)
    iso2 = models.CharField('2 Digit ISO', max_length=2)
    iso3 = models.CharField('3 Digit ISO', max_length=3)
    un = models.IntegerField('United Nations Code')
    region = models.IntegerField('Region Code')
    subregion = models.IntegerField('Sub-Region Code')
    lon = models.FloatField()
    lat = models.FloatField()
    mpoly = models.MultiPolygonField()
    objects = models.GeoManager()

    def __str__(self):
        return self.name

This is how I define my form in forms.py:

from django.contrib.gis import forms

class WorldBorderForm(forms.Form):
    world = forms.MultiPolygonField(widget =
        forms.OSMWidget(attrs = {'map_width': 1024, 'map_height': 600}))

And my views.py containing the callback:

from django.shortcuts import render
from myproject.forms import WorldBorderForm

def index(request):
    form = WorldBorderForm()
    context = { 'form': form }
    return render(request, 'myproject/index.html', context)

This is how the result looks including my template, using an OSM base widget:

This is pretty much what I get from reading the GeoDjango documentation and following the GeoDjango tutorial on World Borders.

But the missing piece in the docs is: How to display my geometries from the PostGIS database in my GeoDjango map widget? I can't seem to figure out how to connect both.

Any ideas?

Source code is on github.com/donSchoe/sabracta.

Versions used in this project are:

python 3.4.3
postgresql 9.4.1
postgis 2.1.5
django 1.7.4


texts: How to use a .qpt made in another project?

texts:
I'm trying to make maps in print composer of several different projects.
I would like the maps to look the same, just for different areas, so I tried to use the .qpt that I made in the first project in the second one, but GIS data doesn't display? I just get the legend, frame and scalebar from the first map to show?

I read the manual, but the problem is that I still don't understand how to update the map with the information showing in the second project's map canvas?

What am I missing?


texts: Using GeoWebCache tiles with default geoserver url

texts:
I am having GWC tiles access issue when integrated in another application using GWC url. //systemname:8080/geoserver/gwc/service/wms.

The error is given below.

I have created new grid set (Epsg:900913 with 128*128 tile size) with 21 customized map scales with respect to target application scales (which is using bing maps overlay)

  400: X,Y values for the tile index were calculated to be {318.09479476312816, 690.2686949979606} which had to be rounded to {318, 690} and exceeds the threshold of 10%. Perhaps the client is using the wrong origin ?

I have seen some GeoServer users got this error, but not posted back final answers about how they have resolved this issue.

Possibility check:

When I have accessed the Geoserver url like //systemname:8080/geoserver/wms, everything works fine but with a very slow response, so i wanted to use Tiles with geoserver url with direct integration enabled with GeoServer WMS adding "&tiled=true" to the wms url.

Will it take gwc tiles & display in webmaps and how to confirm that it is accessing gwc tiles only?


texts: Calculating 3d polygons' surface area using ArcGIS Desktop?

texts:
I've got a polygon feature class with Z values enabled. The polygon entities represent billboards. I'm looking for a way to measure the front surface area of this entities - i.e the area of the billboards from one side.

Can I do this using a Geoprocessing tool?

Some snapshots

Polygon in ArcMap

Polygon in ArcScene


texts:
Executing: CreateEnterpriseGeodatabase Oracle \localhost\orcl #
  DATABASE_AUTH sys ***** SDE_SCHEMA sde ***** #
  C:\Users\Med\Desktop\ags103.ecp Start Time: Wed Sep 21 09:45:00 2016
  User does not have required privileges to create database objects.
  [ERROR: Must be connected to a 64-bit database to create geodatabase.
  ] Failed to execute (CreateEnterpriseGeodatabase).

When I try to create enterprise geodatabase I get this error..


texts: Show multiple Lanes (e.g. both directions) for one OSM way geometry

texts:
What's the best-practice way to show multiple lanes for one OSM way in Mapbox GL JS?

Let's say we have the following OSM way which is a collection of nodes:

Is there an easy way to visualize both driving directions at the same time like in the following?

The solution should work no matter of the direction of the way segments (angle)
The solution should work in combination with zoom, i.e. when zooming out the lanes should stay "on the road" (this is not the case when using line-offset e.g.)

I could of course calculate the geometry for each way myself in a pre-processing step but this seems like a very common use-case so I'm confused that I can't find any examples or Mapbox functions which support this directly without pre-processing.


texts: Leaflet L.geoJSON from a js variable geojson object not showing on map

texts:
I create a js geojson object variable in my code.  I would like to then create a layer based on the geojson variable and add to the map. I have tested the geojson object (When I stringify the geojson object the geojson maps correctly in various web geojson mappers).  If I place geojson into a file with var geojson = {...}  and then run.  It appears on map correctly

My code runs without throwing errors, but the layer does not appear on map.

   //****  Ive tried several options same result

   //    var json_Converted1JSON = new L.GeoJSON(geojson.returnJSON,{
   //   var json_Converted1JSON = new L.GeoJSON.AJAX([geojsonx], {
   //  var json_Converted1JSON = new L.GeoJSON.AJAX([geojson], {
      var json_Converted1JSON = new L.geoJSON.ajax([geojson], {
        dataType:'jsonp',
        pane: 'pane_Converted1',

    style: doStyleConverted1,
   pointToLayer: function (feature, latlng) {
            return L.circleMarker(latlng, geojsonMarkerOptions)

         },
      onEachFeature: pop_Converted1,

.....

My geojson object and l.geoJSON layer variables show the following values:

Any suggestions welcome.  Also, is there a way to add "var geosjon =" as a string to my js geojson variable object?

Geojson file string below:

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-122.248391,44.13595817]},"properties":{"SiteId":"14159500","Name":"SOUTH FORK MCKENZIE RIVER NEAR RAINBOW, OR","Flow":"336","DateTime":"2018-04-02T08:00:00.000-07:00","PerFlow":8}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-122.3331192,44.16234819]},"properties":{"SiteId":"14162200","Name":"BLUE RIVER AT BLUE RIVER, OR","Flow":"107","DateTime":"2018-04-02T09:15:00.000-07:00","PerFlow":2}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-122.47062,44.1248487]},"properties":{"SiteId":"14162500","Name":"MCKENZIE RIVER NEAR VIDA, OR","Flow":"3490","DateTime":"2018-04-02T09:00:00.000-07:00","PerFlow":78}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-122.9196644,44.059348]},"properties":{"SiteId":"14164700","Name":"CEDAR CREEK AT SPRINGFIELD, OR","Flow":"21.2","DateTime":"2018-04-02T07:45:00.000-07:00","PerFlow":0}},{"type":"Feature","geometry":{"type":"Point","coordinates":[-122.9645273,44.0712365]},"properties":{"SiteId":"14164900","Name":"McKENZIE RIVER ABV HAYDEN BR, AT SPRINGFIELD,OR","Flow":"4470","DateTime":"2018-04-02T09:15:00.000-07:00","PerFlow":100}}]}


texts:
I would like to know if it's possible for my OD cost matrix to know which segments are been used to get to the destination. In other words I would like to know which network segments have been used and how many times to reach my destination?

Is it possible?


texts: How to convert double bearing into x and y coordinate

texts:
If I have a double bearing from different point which is point A and point B on a single point (object), how do I get the x and y value?

Lets say the number of point A is 84 degrees and for point B is 245 degrees.


texts:
Currently using OpenLayers to allow users to zoom/pan to an area and drop a modifiable 1x1KM Square Polygon. As this polygon is modifiable, for the purposes of validation I need to ensure the final "saved" polygon does not have any crossed lines or does not self-intersect. Some research into this has yielded that both the JSTS and TurfJS libraries are capable of checking a status of a polygon. However I have been unsuccessful thus far as the kinks method (TurfJS) returns an e.forEach error when passing the newly passed feature to turf.

x=vectorLayer.getSource().getFeatures();
kinkedPoly=turf.polygon(x[0]);
unkinkedPoly=turf.kinks(kinkedPoly);

https://jsfiddle.net/5m2ec1yq/1/


texts: Is there a way to automatically calculate attribute values for new features?

texts:
I am creating a vector point layer which will be added to over time.  I have been using the field calculator to populate fields such as X and Y coordinates.

I'm wondering if there is a way to have QGIS automatically calculate values in the columns for which a new point is created.  Eg. when I put in a new point it automatically fills out the X and Y coordinate fields.

Thanks!


texts:
I'm newbie to python and I wrote this script. It is supposed to check the text in the fields fld_o and fld_d and write a value (just numbers in a sequence) to a newly created field fld_name. While looping if it comes across a text in either of the two fields which was already there is any of the previous rows in either of the fields then it should write the same value from that previous row to this row in the new field. The script ran without problems. But somehow the results are not as expected. You can see the two rows highlighted both have Werl in common so how can they have a different number in the new field? When the loop reaches the first highlighted row it should add Werl to the dictionary and assign it the same value as Hamm i.e. 54 and write it to the new field and then later when it reaches the second highlighted row it should take the already assigned value of 54 from Werl and assign this to Wickede and write it in the new field as well. At least that's what I expected.

import arcpy
arcpy.env.overwriteOutput = True

fc_in = 'E:/SUT/Thesis/Geodata/NRW_Gemeinde_SpatialJoin_SelectCopy.shp'

fld_o = 'GEN'
fld_d = 'GEN_1'
fld_name1 = 'Sub_Region'

arcpy.AddField_management(fc_in, fld_name1, 'SHORT')

dct = {}
sub_region = 0

with arcpy.da.UpdateCursor(fc_in, (fld_o, fld_d, fld_name1)) as cursor:
    for row in cursor:
        origin = row[0]
        dest = row[1]
        if origin in dct and dest in dct:
            row[2] = dct[origin]
        elif origin in dct:
            row[2] = dct[origin]
            dct[dest] = dct[origin]
        elif dest in dct:
            row[2] = dct[dest]
            dct[origin] = dct[dest]
        else:
            sub_region = sub_region + 1
            row[2] = sub_region
            dct[origin] = sub_region
            dct[dest] = sub_region

        cursor.updateRow(row)


texts: How to get long and lat data for elements of the type  in OSM?

texts:
I downloaded the geonames file for my city. Then I used osmfilter to keep my nodes of interest (those with name tags in this case). I am trying to construct some sort of dictionary which maps location tags to long/lat pairs. However in my .osm file which I get from osmfilter, only node elements are associated with long/lat data. However, when I use the Nomiantim website to reverse geocode, and I enter the name of a street that actually is specified as a way element in osm, Nominatim gives me the coordinates of the center point of the street (how does Nominatim do this, what extra data does it use?). My question is whether I can calculate/access center point coordinates for "ways" through the data I have in my osm file.

I should add that I don't want to work with Nominatim. The idea is to rely on the .osm file for the construction of this dictionary/map.


texts: Changing ArcGIS Server URL and reestablishing links to ArcGIS Online

texts:
I've migrated the location of my ArcGis Server and changed the base URL I will be using with my services.   Is it possible to automate the process of reconnecting my services in ArcGIS online with the new server URL or do I have to do it manually?

I'm using 10.3 Server


texts: Dividing 10 acres of land into 100 *100 feet parcels

texts:
I have used hand held GPS to determine the acreage of a land. And I have plotted them into QGIS. But I don't know how to divide it into 100*100 parcels of land.
And how to also carve out an 80ft and 40ft road from it using QGIS.
I am aiming to plan the 10 acres of land for habitation.


texts: How to use USGS Bulk Download on EC2 linux Server?

texts:
I am interesting in downloading Landsat 8 rasters to an Amazon EC2 instance and would like to know how to do it.

I already install USGS Bulk Download but I do not know how to use it in terminal mode (so far I only use the Windows 7 version with the Graphic User Interface).


texts: How to make an SQL select query between two field with LIKE operator

texts:
I want to select records by comparing two similar text field in ArcGIS Desktop 10.3 (data stored in an ORACLE ArcSDE database).

I'm looking to select all records where field1 contain a string that is a part of the string in field2 (both fiels on the same table).

(field1 is the name and field2 the location, usually I have a name like "School" and a location like "Example street" but sometime the name is "House on this street" and the location is "this street", my goal is to filter these)

I know how to compare a field with part of a string :

field1 LIKE '%string%'

But I can't get it to work with two field, I tried lots of variation of

field1 LIKE '%field2%'

or

field1 LIKE '%' & field2 & '%'

But it never work, I get error messages like invalid character or missing closing parenthesis.

So is it possible to compare two field with the LIKE operator and how ?


texts: Copying feature class to file geodatabase without its related domains

texts:
I am using the "Feature Class to Feature Class" tool to copy a feature class from an enterprise geodatabase to file geodatabase, but I would like to strip the output feature class (and its geodatabase) of all related domains and descriptions. I would like the attributes of the destination feature class to only contain the actual codes, not the descriptions.
I acknowledge that this behavior can be accomplished by exporting to a shapefile with the right environment settings, but I am not interested in using this method because of other factors (for example: truncation of field name lengths).
I know that my question is similar to Using CopyFeatures_management without copying source GDB domains to 'in_memory' workspace?, except I'm not dealing with an in-memory feature class, so I suspect there might be different answers possible.
I'm ideally looking for a solution that simply drops the domains upon export. If that's not possible, I might be interested in a solution that uses python code to remove/delete domains after the destination feature class is already in-place, but there are a lot of domains and fields utilizing them, and I haven't seen any nice tidy code that

Identifies and lists feature classes and fields utilizing domains
Disassociates the fields from the domains
Lists all of the domains
Deletes the domains

Is there a simpler way to do this, that I'm not thinking of?


texts: Where can I download all 3,141 County US Polygons clipped with high resolution shoreline data?

texts:
After having done quite a bit of research I have been unable to find a single shapefile download which includes all of the current 3,141 counties with their associating data clipped with the highest resolution shoreline data available.

Does anyone know where I can find this data?


texts: How to project correctly Copernicus VCI product

texts:
I have downloaded time series data of the VCI product from the Copernicus Land Services, which they are in h5 format. The data set covers the African continent.

It is known that the h5 files have an issue with their projection, when someone tries to import them in a spatial analysis software.

What I'm trying to do is to first pass the projection (EPSG:4326) using gdal.warp in python and create a netcdf file which will contain all these data.

Following is the code in python

import gdal
wOptions = gdal.WarpOptions(
    dstSRS= "EPSG: 4326",
    outputBounds=(60, -40, -30, 40)
)
dataproj = gdal.Warp(
    format="NETCDF",
    destNameOrDestDS= "Test.nc",
    srcDSOrSrcDSTab="20160101/g2_BIOPAR_VCI_201601010000_AFRI_PROBAV_V1.0.h5",
    options=wOptions,
)

The output is a rotated image.

What am I doing wrong, and how can I fix it?


texts: Python parser of ArcGIS Field calculator returns ERROR 000539: Error running expression?

texts:
I like field calculator and use it often, however found something very disturbing today when attempted to do this on a table of 3D feature class.

def abc(shp,id):
 return shp.length

----------------------

abc( !Shape!, !UNIQID!)

Returns:

Executing: CalculateField LINES L abc( !Shape!, !UNIQID! ) PYTHON_9.3 "def abc(shp,id):\n return shp.length"
Start Time: Mon Sep 12 12:30:28 2016
ERROR 000539: Error running expression: abc( GPVARIANTOBJECT0, L1 )
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
NameError: name 'L1' is not defined

On this table:

The same expression works fine on 2d features.
Moreover if I remove second argument and run it as:

def abc(shp):
 return shp.length
#----------------------
abc (!Shape!)

It also works as expected on table with 3D shapes.

So adding another variable to list of arguments results in a crush.

Somebody else can confirm this odd behaviour please.

I am working with 10.3.1 and it is happening only with second argument being text, numeric work fine.

I found a workaround by swapping arguments:
    abc(!UNIQID!,!Shape!)

Still weird.

UPDATE after @Midavalo comment:

Yes the same odd behaviour on 2D shapes


texts: Excel to Table Conversion on multiple Excel files in folder using ArcPy gives ERROR 000814

texts:
I am trying to convert all of xls files (including single sheet) a folder into dbf tables in a gdb.

Here is my code:

import arcpy, os, xlrd
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:/Users/****/Desktop/Assignment_5/excels.gdb"

# Excel is input, gdb is output directories

excel = "C:/Users/****/Desktop/Assignment_5/excel_files"
gdb = "C:/Users/****/Desktop/Assignment_5/excels.gdb"

# Walk through the folder for all xls files and convert them to dbf files

for root, dirs, files in os.walk(gdb):
    for f in files:
        outname = gdb + str(os.path.basename(f[:-4])) + ".dbf"
        arcpy.ExcelToTable_conversion(f, outname)

What I get in shell is nothing more than this:

Traceback (most recent call last):
  File "Y:/students/***/Assignments/Assignment_5/Assignment_5.py", line 32, in <module>
    arcpy.ExcelToTable_conversion(f, outname)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\conversion.py", line 63, in ExcelToTable
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000814: Invalid file type
Failed to execute (ExcelToTable).

What is the problem is with my code?


texts: I have a vector layer of about 62km^2. I have a vector layer of roads within that area. How do I calculate the road density (km/km2)? I did a union between the road layer and the area layer, then I calculate the total line length in the area? I'm working in QGIS.


texts: Returning results to user of Python script from ArcToolbox?

texts:
I have a script in a custom toolbox which sums the values in a given field.  After the user indicates which field (currently I have them typing it in but would love to know how to get the ArcToolbox to generate a dropdown after an input is identified) the script returns the value in a win32gui box.

Using win32gui means I have to install win32com package on the users machines.  Is there another easier solution to return the value of sum-ing the values in a field..preferably if the dialogue box lets you copy the text with the mouse?

I am using ArcGIS Desktop 9.3.


texts: Why won't OGR connect to my PostGIS database, but QGIS will?

texts:
Trying to connect to my PostGIS database with some success...

One hiccup is that OGR will not connect to my server from a remote machine, though QGIS can connect to it just fine from that same machine.

Here is the connection string I'm using:

ogrinfo -ro PG:"host='machineName' port='5432' user='userName' dbname='postgisDB'"

This connection works in the following scenarios:

Connect using 'localhost' from PostGIS server machine
Connect using 'machineName' from PostGIS Server machine
(as stated) Connect using 'machineName' through QGIS from remote machine

I've tried adding a fully qualified domain name, as well as a password, to no avail.

Thanks!!!

-m


texts: Maintain Relationship Between Feature Class and an Attribute Table After Recalculating Primary Key (Unique ID)

texts:
I have a feature class that has a unique id field.  The field is populated using some basic code (using the Calculate Field tool in ArcGIS):

def CalcGUID():
  import uuid
  return'{'+str(uuid.uuid4()).upper()+'}'

When ever the feature class is updated, the unique id fields needs to be recalculated.  This issue is that the feature class is associated with a stand alone attribute table and is related using the unique id field.  How can the unique id fields in both files be recalculated while still maintaining the relationship?

This work was originally performed using FME and was a straight forward process.  However,  FME is no longer available to perform the updates. I have access to ArcGIS.


texts: Getting spreadsheets to autopopulate tables?

texts:
I am working on the Arcgis local government solutions Election Results web app and hosting it out to arcgis online organization. After looking at the spreadsheets, the tables and related feature classes in their solution that you download, I understand everything but how the spreadsheets populate the tables. The spreadsheets have fields for each candidate in a precinct so candidate one, candidate two are separate fields. The precincts records do not repeat. The Tables have precinct records that do repeat, showing the candidates as a list compared to in separate fields like the spreadsheets. The feature classes are related to the tables, and the tables are auto populated by the spreadsheets. I just want to know how to make this work. It seems logical that you wouldn't update the tables independently of the spreadsheets, it seems more likely that you update the spreadsheet and that populates that tables.

How do the individual precinct records in the spreadsheets become multiple precinct records in the tables?


texts: ArcMap 10.3.1-Attribute Table Sorting Issues

texts:
I have received a shapefile from a third party that contains a column of alphanumeric characters. ArcMap has it listed as a 'string' in the field properties. The numbers range from 1-6000 with a combination of letters after the numbers. So it looks like:

1
10
100
1000
1001

Then the list continues in a random order and it includes letters at the end such as:

1387a
6176b

I'm trying to find a way to sort this properly? Would I be best splitting it and then sorting and concatenating it again? Is there any easier way to sort this column?


texts: Feature Layer Attribute table to Datatable and make it editable

texts:
Currently I'm using this to turn it into a data table

 featureCursor = layer.FeatureClass.Search(que, false);
                    row = featureCursor.NextFeature();

                    if (row != null)
                    {
                        for (int i = 0; i < row.Fields.FieldCount; i++)
                        {
                            dataTable.Columns.Add(row.Fields.get_Field(i).Name);
                        }
                        while (row != null)
                        {
                            dataRow = dataTable.NewRow();

                            for (int j = 0; j < featureCursor.Fields.FieldCount; j++)
                                dataRow[j] = row.get_Value(j);

                            dataTable.Rows.Add(dataRow);
                            row = featureCursor.NextFeature();
                        }
                    }

Does anyone know a more efficient way on doing this.

Also I'm binding the data table to a datagrid, does anyone know a good way I can do this so that I can make the attribute table editable, and values reflected in the feature layer.

I can do this, but not cleanly, has anyone tried this before?


texts: Combining overlapping polygons and their attributes using ArcGIS Desktop?

texts:
I have two global polygon features (layers). One is the highly detailed country shapes GADM (Global Administrative Areas) and is overlapping the less border accurate TDWG (World Geographical Scheme for Recording Plant Distributions).

I want to combine GADM with TDWG layer in the way the Identity tools does in ArcMap. I need to benefit of the highly detailed outer borders of GADM and also get the extra info with its inner borders from TWDG (like the illustration for Identity tool).

Using the tool gives satisfactory results, however it combines the attributes from both layers only when they overlap, and this can also be an issue at borders between countries where I would want that GADM borders should be considered instead of TWDG. I need to find a way to combine attributes for the remaining non-overlapping zones that share the borders with the output from Identity tool and solve the country overlapping border issue as well (see selection in image below).

The final goal is to intersect the output with points and extract the underlying data (points that fall out of GADM borders, i.e. in sea/ocean, should be excluded).

Below are two more print screens that catch the overlapping country borders and also the non-overlapping areas issue (it happens at the border with sea/ocean):

Perhaps another approach would be to use Spatial Join in ArcMap and intersect the points inside GADM with TWDG. Then use a search radius for points that didn't get a match.

However, I remain curious about how to solve the overlapping issues described above.


texts: Is there a free source of U.S. time zone borders?

texts:
I have a mapping app in which I need to display the borders between U.S. time zones. The easiest and most accurate way would be to feed in a list of lat/long coordinates representing the vertices of these borders, and "connect the dots".

So, the question, simply put, is whether a publicly-available, free database of these geocodes exists, and where?


texts: How to create a efficent linestring out of geography points using postgis

texts:
I'm trying to create a linestring out of geography points. At the moment I'm doing it like this:

select ST_GeographyFromText(ST_Makeline(a.record_point)) from (
select (record_point::geometry)
from records order by record_timestamp) a

Problem is that most points have unnecessary decimal places (6 is sufficient) and some points are exactly the same. I can set the decimal place precision when converting to KML but is there another way to do this and how to get rid of overlapping points?

My own solution:
It is PostgreSQL specific because of the window function. Basically I just leave out spatially equal sequential geometry points and reduce the precision with geojson converter (kml converter has the same option).

select st_asgeojson(ST_MakeLine(points.record_point),6) from (
select (record_point)::geometry as record_point
lag( (record_point)::geometry, 1) over w as prev_point,
from records
window w as (order by record_id)
order by record_timestamp
) points where not st_equals(record_point, prev_point)


texts: Create a route by using points (pgRouting)

texts:
I'm currently working on a routing model for 17th and 18th century voyages. These routes are based on data from old shipping logbooks.

I made a separate layer in QGIS which contains point. I exported those points to a shape layer, converted them to a sql structure. I am following the pgRouting workshop, and I am currently trying to convert it to a network topology using the pgr_createTopology function.

However, at the moment I'm getting an error (false) and I am wondering whether this is point-model is the right way to approach it. Especially since the osm examples seem to use a closed model where every line is connected.

Edit:

So this is basically what I'm looking for. I have a different network of places inside a table, and I have a table with the routes that are basically points. They do not overlap. By using a function I want to connect the points to the route and make a simple polyline. Apparently this isn't possible with pgrouting, but maybe it still is possible by just using postgis? I need the routes of 20 000 voyages, so the network doesn't need to contain more complicated stuff such as bidirectional. I do need this (for instance the Brouwer Route only goes from The Cape/Cape Town to Indonesia and not vice versa), but I could probably cheat this by making different networks and writing queries that specify different voyages.


texts: Cutting/ exporting multiple terrain profiles to CSV files with QGIS?

texts:
I am trying to cut multiple terrain profiles and export them to CSVs (individual or combined).

I have a shapefile of the profile lines, and a DEM to cut the profiles from.

I can do this manually multiple ways (i.e. Profile Tool) and either copy the profile data or export it by clicking some buttons...but I am wondering if there is a way to automate this for MANY profiles.

I.e., run a script/plugin that cuts profiles at every line in the shapefile and exports them to a CSV file.


texts: How to create a Custom editor application using ArcGIS API for Flex?

texts: I have seen demo of esri editor and then run in my flash builder as well.It is working well.Now I have a question that Is it possible to create my own editor?ORIf I want to place my own/desired icons/symbols instead of given by API editor? If yes then Please Guid a bit about this


texts: Is there a database of boundaries of cities/regions around the world?

texts:
I am looking for a list of boundaries of cities/regions around the world. I am interested in knowing for instance what the boundaries of a city such as San Francisco are.

Is there a database? I could only find center coordinates of the regions, but no data source that offers shapes of those regions.


texts: Connecting to / view contents of Recycle Bin with ArcCatalog?

texts:
Can you connect ArcCatalog to the Recycle Bin on the desktop?

I deleted (not using ArcCatalog) a folder which contained several shapefiles and .gpx files for a non-work related project that I thought I would never need again, but unfortunately I may have to track it down. These shapefiles are unique enough that I would be able to recognize it using the Preview window in ArcCatalog.

From what I have  read , the Recycle Bin is a hidden directory but there are ways to show what is within the directory. I am able to connect to c:\$Recycle.Bin using ArcCatalog, but it appears to be empty and I am not sure how happy the IT department would be if I did what was recommended in that link.

It is possible to create a new folder and drag the folders from the Recycle Bin into it and search that way, but I have a feeling I may need to do this a few more times in the future due to reckless file deletion in the past. Also, many of the folders have the same name, and some of the folders within the Recycle Bin are massive, so it would be a time consuming process.

By doing what the article suggested and making the Recycle Bin and its contents visible in Windows Explorer, making a connection to the Recycle Bin in ArcCatalog, then making the Recycle Bin not visible again, the connection to the Recycle Bin in ArcCatalog remained.


texts: Using ArcGIS JavaScript API feature table using bootstrap wrappers

texts:
I am trying to create a feature table following this sample. https://developers.arcgis.com/javascript/3/jssamples/featuretable.html
This sample uses the data-dojo-type="dijit/layout/BorderContainer and dijit/layout/ContentPane as the containers for the map and the feature table. I however want to use the bootstrap container class as the wrapper for the map and feature table. Here's the html code for the esri sample that shows the feature table.

Here is my sample using bootstrap.

My code only works if I set the style for the columns and rows as above which is not ideal. Can someone explain to me why if I leave out the style, my feature table does not show up?


texts: Calculate percentage overlap of polygons in WGS84

texts: I'd like to calculate the percentage of overlap (not area) of polygons in two different layers. Both layers are in WGS84 (EPS:4326). There are several tutorials on how to calculate area overlap for projected layers, e.g. Calculating percentage of overlap between two different layers, however, I'd like to avoid having to reproject all layers. Is there a tool in QGIS to do this?


texts: Openlayers stylemap label not working wfs

texts:
I have created a style map like following:

    var scadaPointStyle = new OpenLayers.StyleMap({
        "default": new OpenLayers.Style("null", {
            "rules": [
                new OpenLayers.Rule({
                    "symbolizer": {
                        "Point": {
                            pointRadius: 15,
                            fillColor: "#3DCDE0",
                            fillOpacity: 0.9,
                            strokeColor: "white",
                            label: "${point_id}",
                            fontColor: "white",
                            cursor: "pointer"
                        }
                    }
                })
            ]
        }),
        "select": new OpenLayers.Style("null", {
            "rules": [
                new OpenLayers.Rule({
                    "symbolizer": {
                        "Point": {
                            pointRadius: 15,
                            fillColor: "#323D34",
                            fillOpacity: 0.9,
                            strokeColor: "white",
                            label: "${point_id}",
                            fontColor: "white",
                            cursor: "pointer"
                        }
                    }
                })
            ]
        })
});

And my vector layer is like this:

    var vector = new OpenLayers.Layer.Vector(null, {
            "protocol": new OpenLayers.Protocol.WFS({
                featureType: featureType,
                version: "1.1.0",
                url: myurl,
                featurePrefix: myeaturePrefix,
                geometryName: myGeometryName,
                srsName: mysrs,
                isBaseLayer: false
            }),
            "styleMap": scadaPointStyle,
            "strategies": [new OpenLayers.Strategy.BBOX(), new OpenLayers.Strategy.Cluster()],
            "eventListeners": {
                "featureselected": onSelected,
                "featureunselected": onUnselected,
                "loadstart": onLoadStarted,
                "loadend": onLoadEnd
            }
    });

Point style is working and appearing on map. But label text is undefined.

I added contecxt to style like this:

context:function(feature){
       return faeture.attributes.point_id;
}

but didn't worked.

May be about cluster strategy?

I removed cluster strategy but this time pint style didn't appear.


texts: Remove Sentinel 2 tiles with a given cloudy pixel - Google Earth Engine

texts:
I have a point of a given latitude and longitude.

I would like to filter out all Sentinel2 tiles where the particular pixel which the point is within is cloudy.

This is different from the more common question of how to filter Sentinel2 tiles based on a threshold percentage of cloudy pixels, for which the Sentinel2 product has a built-in value for each tile (CLOUDY_PIXEL_PERCENTAGE).

Here is the code so far, which simply creates a point and uses it to grab available Sentinel2 tiles for that location:

var point = ee.Geometry.Point([13.93, -14.51]);

var sentinel2 = ee.ImageCollection("COPERNICUS/S2_SR")
  .filterBounds(point) // Filter tile by point
  .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 20));  // Remove cloudy plots

print(sentinel2)


texts: Wrong result when clip a raster with PostGIS

texts:
I'm newbie of GIS, I have my first project with GIS without experience before.
I want to clip a zone of raster for the calculation of NDVI index. It is ok when I did it with GDAL and TIFF file. But I want to save raster and geom to PostGIS because I found that is quicker.

In the image 1 you can see the zone which I want to clip.
But when I using the Query:
SELECT b4.rast
FROM area as ar, band4 as b4
WHERE
ST_Intersects(b4.rast, ar.area) and ar.area_name = 'nefta';

Then I use ST_AsGdalRaster(rast, 'GTiff') to convert to GDAL TIFF file for NDVI calculation.
My result which I have is an other zone you can see the black rectangle:

What is the problem with my procedure? The Geometry and  Raster file I converted to WGS84: 4326 before pushing them to PostGIS.


texts: What's the relationship between NetCDF dataset and ncdf4 class in R

texts:
I want to process ERA reanalysis data in R so I install RNetCDF package and ncdf4 package.When I open my reanalysis file using open.nc() and nc_open() functions separately in two packages, I found my file class is ncdf4. But when I want to get my file's attribute,the dim.inq.nc() function reback error message :

setwd("D:/RTest/0601/")
d1 <- nc_open("T1.nc")
dimension <- dim.inq.nc(d1)

  Error: class(ncfile) == "NetCDF" is not TRUE

So I want to know the relationship between NetCDF and ncdf4 datasets.


texts: Error when using relative paths for hyperlink

texts:
I'm trying to create a hyperlink to images related to objects within an attribute table.

I can get this working fine using absolute paths however I'm getting problems when I try and use relative paths. When I try and open a hyperlink from a relative path I get a message saying:

  Unable to open "Images\boulder1.jpg" Please make sure the path is
  correct and the document exists.

My images are contained within a folder called "Images" and this folder is in the same folder as the mxd.

I've been using this website to ensure I have the correct relative path for my images. I've tried different ways of pathing to my images "..\Images" ".\Images" etc but I keep getting the same error.

I've tried putting the relative path in the hyperlink base option of map document properties and in the attribute and neither is working.

Also I have store relative pathnames to data sources ticked on. Although I'm not sure if this makes a difference if I'm not moving the mxd.

Does anyone know why I am getting this error and how to solve it?


texts: Creating vertical polygons in ArcGIS Desktop?

texts:
I am trying to convert vertical line (cross-section) features to the polygon, but all regular ArcGIS tools (e.g. Feature to Polygon) that I applied can't convert vertical lines to vertical polygons.

Do you know a tool that can do it automatically?

I also have point feature class with xyz coordinates of every point


texts:
I want to draw a complete graph for these points with coordinates.
In an ArcMap environment, can a complete graph be drawn with points?


texts: Measuring length in Southeast Korea projection

texts:
I have a GIS dataset currently projected in Web Mercator.
Is there an option for a more accurate segmentation length projection when I need accurate lengths in Southeast Korea?


texts: No visual after loading geotiff in Qgis Dufour

texts: I installed the latest version of QGis 2.0 for mapmaking. Before I used the 1.8 version and I had no problems in loading Geotiffs. With the latest version, it loads the same files but it doesn't show any image. I haven't got any clue why in this version it doesn't load/show these files. Does anybody know?


texts: Selecting points on surface using ArcScene

texts: I have a 3D surface and tons of points, and I want to only select points on the surface. How can I select these points?


texts: Vertex marker in Edit Vertices not appearing on half screen

texts:
I'm using ArcMap on ArcGIS Desktop 10.5 and when I enter the Edit Vertices context, the vertex markers on the left side of the screen are hidden. You can click on them, but the marker does not appear. In the screenshot you can see I've selected a line for editing, the right side of the screen shows the line and vertex markers but at a certain point as you move left you see they no long appear.
Has anyone else experienced this bug or have any suggestions on fixing it?


texts: Cannot install TimeManager 0.7: no module named six

texts: I was able to extract and copy dateutil to C:\OSGeo4W\apps\qgis\python\dateutil and the error saying that dateutil wasn't found disappeared. But now I am getting the error no module named six. Tried extracting the content of the PyPi package to C:\OSGeo4W\apps\qgis\python\six, but the error remains. I suspect it's because there is no such thing such as __init__.py in the folder. So how do I "install" six, given my somehow special QGIS-Python configuration (without the usual C:\python27\)?


texts:
I try to find a way to create DEM model for two overlapping images from different sources. The upper image has transparency of 50% and as you can see they don't quite overlap correctly. The projections are adjusted correctly (EPSG:3006 - SWEREF99 TM), but they still look this way.

Why is this happening?

I am new to QGIS and GIS in general.


texts: Visualizing shapefile of polygons in Google Earth Engine Explorer

texts:
I've just imported a shapefile of polygons in Google Earth Engine Explorer using the website http://shpescape.com/

The problem is that the polygons do not appear when I want to make them visible in the Google map.

May you help me with this ?


texts: CartoType - set min/max on map view while Zooming Out

texts: Working with the .NET CartoType SDK on Windows. How can I set a limitation on Zoom Out? In the "Windows Maps" app I am able to Zoom Out to a very little map size. How can I prevent this?


texts: How to symbolize/represent overlapping line shapefiles (cycling routes) as points/markers/symbols?

texts:
I am currently trying to visualize bike trails and cycling routes as polyline shapefiles on a map. For the the sake of clarity, I intent to link the different cycling routes with point vectors (or represent the routes as point vectors / markers). I would like to do it like outdooractive.com does it: https://www.outdooractive.com/mobile/de/routes/#fu=1

Does anybody know whether and how this is possible in QGIS / QGis2Web?


texts: Dissolve field while preserving another related field

texts:
I am using 'Store' as dissolve field and 'Profit' as statistics field with statistic type 'MAX', and would like to preserve the related 'Fruit'.

This is my original table:

____________________________
| Store |  Fruit  | Profit |
|   A   |  Orange |   20   |
|   A   |  Apple  |   30   |
|   B   |  Banana |   15   |
|   B   |  Grape  |   10   |
|   C   |  Apple  |   35   |

This is what I want:

________________________________
| Store |  Fruit  | MAX_Profit |
|   A   |  Apple  |     30     |
|   B   |  Banana |     15     |
|   C   |  Apple  |     35     |


texts: Loop using Reclassify function: string 'RemapRange' object is not callable

texts:
I am a newbie of python teaching myself using the arcpymanual.
I am running a Reclassify script on slope grids. It works fine for the first loop then I get an error message for the remap line. I cannot figure out what the problem is because I copied the syntax from the arcpy manual. Is it due to loop syntax?

  Runtime error
      Traceback (most recent call last):
        File "", line 21, in
      TypeError: 'RemapRange' object is not callable

SCRIPT:

import arcpy
from arcpy import env
from arcpy.sa import *

# Set the current workspace
arcpy.env.workspace = r"C:\workspace\rsn\pippi"
# Overwrite pre-existing files
arcpy.env.overwriteOutput = True

# Process: Reclassify

rasters = arcpy.ListRasters("s_*", "GRID")

for raster in rasters:

    print(raster)

    outRaster =  r"C:\workspace\rsn\pippi\re_" + raster
    print(outRaster)

    RemapRange = RemapRange([[0, 15, 0], [15, 30, 1], [30, 90, 2]])

    outReclassRr = Reclassify(raster, "Value", RemapRange, "DATA")
    print outReclassRr
    outReclassRr.save(outRaster)

Can anyone give any suggestions?


texts:
I'm changing from OpenLayers 2 to 4 and I'm stuck with adding multiple layers.

This is my OpenLayers 2 code:

featlayer = new ol.layer.tile("Orders",wmsfeat,{layers: sQLayers,transparent:true});

And this my actual OpenLayers 4 code:

var layers = [
new ol.layer.Tile({
    source: new ol.source.TileWMS({
  url: twSettings.wmsmap,
    params: {'LAYERS': wmslayer},
    ratio: 1.1
    })
})
];

var map = new ol.Map({
  layers: layers,
  target: 'mapdiv',
  view: new ol.View({
  projection: projection,
    center: ol.proj.fromLonLat([parseInt(setPos[0]),parseInt(setPos[1])], projection),
})
});

I'm trying to convert the featlayer in this way:

var featlayer = [
new ol.layer.Tile({
    source: new ol.source.TileWMS({
  url: wmsfeat,
    params: {'LAYERS': sQLayers},
    ratio: 1.1
    })
})
];
map.addLayer(featlayer);

But I have some errors:

a.addEventListener is not a function at ol.js:47
a.eg is not a function at ol.js:120


texts: While learning SAGA in QGIS, I get error. What is the reason?

texts: I use QGIS3.0 in linux(ubuntu 16.06 LST). And whenever I try to use saga toolbox, I get some error like image. I select "save to temporary file". What is the reason? please help me.


texts: Changing projection and extent of raster using gdal

texts:
gdalwarp -of GTiff -t_srs "EPSG:4326" input.tif  output.tif

I want to change the projection of input.tif raster (from sinusoidal) and also its global extent to: top:90, left: -180, right:180, bottom:-90

How can I do this either using gdal or rasterio?


texts: Determining and selecting certain line using spatial analysis?

texts:
I have some lines on a picture. I need a green line to be selected as a reason to having a wrong parameter which painted this line green, not red.

The yellow one seems to be almost perpendicular to red, and don't need to be selected. I tried to figure out how to make an angle list of all lines which are not red. The angle is measured in clockwise direction according to an intersection of red and other lines. Then I need to select only those lines, which angle is close to zero (or < 25 for example).
How can this task be solved?
Unfortunately, I don't know anything from ArcPy, use only tools from system toolboxes to make a model in modelbuilder.


texts:
I'm trying to visualize some directional depth slices and I'm having some trouble getting QGIS to render the lines like I want and it's been driving me crazy.

I have a python script that outputs my intermediate output as LINESTRING in the following format:

id;wkt
0;LINESTRING(p1,p2,p3,.....p800)
1;LINESTRING(p801,p802,....p1600)
....

and then I import the file using Layer -> Add Layer -> Add delimited text layer and selecting WKT and the appropriate options.  I then change the layer properties to show arrows, because I'd like to see the direction of the lines.

The issue is that QGIS is drawing these enormous circles - it appears to be connecting the beginning and the ends of each line together through some kind of "enormous circle" algorithm.  I'd really, really love to get rid of these circles and just see the lines.


texts: After re-open of old project file, several layer selections no longer available

texts:
I'm new to QGIS.

I created a QGIS project, loaded 1 to 3 shapefiles via Add Vector Layer (from 2008 TIGER/Line Shapefiles http://www2.census.gov/cgi-bin/shapefiles/state-files). The maps look fine and I can interact with them.

Under Layer many of the "middle" options are available after loading the shapefile, e.g., Open Attribute Table, Toggle Editing, Save as ..., Properties.

I then save the project.

After closing QGIS and re-opening the project file, all of the layer options mentioned above (and a few others) are now greyed out and unavailable.

Are these options only available right after loading a shapefile?  What good is a project file if one cannot interact with data saved with the project?

And why are the Edit options always greyed out and not available?

What am I missing?

Thanks for helping me understand QGIS.


texts: Selecting all links (multilinestring) that do not touch current link (multilinestring) using ArcPy?

texts:
I have a network of links (multilinestring) and nodes (point) which is topology of a rail network. I have an issue with the network. There are certain links that are not touching the main network at all and thus are not relevant to my work.

How do I select all the links that are not touching the (main) network?

I have tried using select by location using arcpy but thats annoyingly slow. This code repeatedly runs the command SelecLayerByAttribute and selects the touching link. The command is run in a loop sufficient times to ensure there are no other new links touching the network.

Code:

import arcpy
arcpy.SelectLayerByAttribute_management('NewLinks_lyr',"NEW_SELECTION", '"FID" = 100) #link with FID 100 is in the main network
for i in range(1,1000):
    arcpy.SelectLayerByLocation_management('NewLinks_lyr',"BOUNDARY_TOUCHES",'NewLinks_lyr',"","ADD_TO_SELECTION","NOT_INVERT")
arcpy.CopyFeatures_management('NewLinks_lyr', railway_ln3)


texts: Losing Attributes Following Merge in ModelBuilder?

texts:
Using ArcMap 10.1, I am working on a project adding polygons to an aerial. The polygons have data associated such as Location, Numerical Value, Street Name, Date, etc...

I use the merge tool as I am combining each individual polygon(100+) to a single shapefile for obvious reasons. But every time I merge, through ModelBuilder, the resulting table does not contain the data needed. I am building an Excel sheet as well with the same data but this seems to be redundant and repetitive unnecessarily. Why does ArcMap rid the table of the column and row data when the merge occurs? I am having to redo all the work numerous times. The first image is how the table looks with the columns: SHEET, STA, DATE completed and filled. The second image is after the merge. Granted, there have been numerous table mods over the course of the week, not associated with this issue.

The goal is to reduce time investment, do the job correctly, but efficiently. Re-filling each field is ridiculous every time. THe alternative is to complete the table in Excel, but that defeats the purpose of having each polygon separate. Also, I could build the table in ArcMap, but then the merge can never take place making them a single polygon as well as the individual poly's.


texts:
I have an application that uses my Leaflet map. I want to use it like navigation. But the path is not updated. Where is the problem?
setInterval(livetrack, 5000);
function livetrack() {
  $.get("/xxxx?car_id=" + carid).done(function (data) {
    var xvar = data;
    if (new_marker != "") map.removeLayer(new_marker);

    var b = xvar.split(",");

    new_marker = L.marker([b[1], b[2]], { icon: iconCar }).addTo(map);

    lati = b[1];
    longi = b[2];

    another_func();
  });
}

function another_func() {
  /* etc */
  rotate_update(data);
  /* etc */
}

function rotate_update(data) {
  veriler = L.Routing.control({
    show: false,
    addWaypoints: false,
    draggableWaypoints: false,
    fitSelectedRoutes: false,
    autoRoute: true,
    waypoints: [
      L.latLng(lati, longi),
      L.latLng(data.last_lati, data.last_longi, iconCus),
    ],
    createMarker: function (i, wp, nWps) {
      if (i === 0 || i === nWps + 1) {
        return (mymarker = L.marker(wp.latLng, {
          icon: iconCar,
        }));
      } else {
        return (job_start = L.marker(wp.latLng, {
          icon: iconCus,
        }));
      }
    },
  }).addTo(map);
}

In this way, the code creates 2 car icons and 1 customer icon. The 1st car icon continues on its way live, but does not draw a route to it. The second car creates the route between the icon and the customer, but this car icon is not moving.
How can I delete one of these icons and update the route live?


texts: Mapping problem with tidyverse, sf & tmap

texts:
I am having a strange issue (which i think has only arisen recently) when I am trying to plot some regional data I have manipulated with tidyverse & sf. I am using tmap to plot. So I select and summarise Mexican & US regions, the polygons are plotting fine + colours, but my code doesn't seem to drop the country names (ADM0_NAME), they are all list from the original dataset.

gual$area <- st_area(gual)
gual_us_mex_new <-
  gual %>%
  dplyr::select(ADM0_CODE, ADM0_NAME, ADM1_NAME, ADM1_CODE, area) %>%
  dplyr::filter(ADM0_NAME == "Mexico" | ADM0_NAME ==  "United States of America") %>%
  dplyr::filter(!ADM1_NAME == "Alaska" & !ADM1_NAME ==  "Hawaii") %>%
  dplyr::group_by(ADM0_CODE, ADM0_NAME, ADM1_NAME, ADM1_CODE)  %>%
  dplyr::summarise(area = sum(area, na.rm = TRUE)) %>%
  ungroup()

library(tmap)

tm_shape(gual_us_mex_new) +
  tm_polygons("ADM0_NAME")

result


texts:
I am a new to the map processing world.

I started with QGIS and loaded a data set from Tiger products (namely US rail roads) I can view each part of the road and I can get its vector data as well. But I am unable to understand the vector data of the segment. can some one help me/ point me to any helpful resource

This is the sample set of a rail road segment:

GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

I want to know significance of this attributes, let say what the Degree value signifies the longitudinal distance form greenwich ? and If I want extract more properties of this line lets say its width and its latitude and longitude values how can I get from QGIS. When I did ctrl+c and ctrl+v I got following text

{wkt_geom   OBJECTID    LINEARID    FULLNAME    MTFCC
MultiLineString ((-118.48735999999996693 .....  ))  15313   1101576760604   Southern Pacific RR R1011}

Are this vaules are its positions coordinates ?


texts: Creating tile server with already created .png - tiles

texts:
I have a web application which shows a basic OSM card with OpenLayers.
Now I want to display radar data in form of a second layer where the user can view the radar data of the last 10 hours in 15 minutes intervalls. I already get the data via python and convert them to a .tif file.
Afterwards I use the QGIS python API to run the processing call "qgis:tilesxyzdirectory" which generates for each dataset my .png tiles.
As a result I have 40 folders (10 hours à 4 datasets) and all of them contain the rendered tiles from the specific time.
Now my next step would be serving those tiles to the webapp.
My initial thought was putting those tile images to a database and request the specific tiles manually via an API but now I found the concept of WMTS.
How can I add different different tile sets to the WMTS and provide the server as a tile server in OpenLayers?


texts: How to Get Statistics Running on an ArcGIS Online Hosted Layer?

texts:
I have Published a Shapefile as a Hosted Layer on ArcGIS Online.

I now want to run some Queries on it, which will include a Group by query,  which can supposedly be done by using the outStatistics & groupByFieldsForStatistics parameters.

The Help for the outStatistics says that

  outStatistics is supported on only those layers/tables that indicate
  supportsStatistics is true.

How Do I enable this supportsStatistics on my hosted feature service?


texts: Convert coordinates to census tract for large dataset

texts:
I have about 20 million sets coordinates from the Philadelphia, PA, USA region.  For each set of coordinates I would like the FIPS code of the corresponding census tract.

I looked at this thread: Free api to reverse geocode latitude, longitude to census tract?
However, I think any http/API solution would be too slow.  Also, I don't think QGIS could handle so many points.

Ideally I'd like to use Python for my solution.  Maybe there is a function that can import polygons from a shp file and identify which contains a given latitude/longitude pair?


texts: How to add a Satellite / Terrain Base-Map to a QGIS Project

texts:
When doing a project in QGIS it is very hard to find a satellite images suiting to be used as the BASE MAP of my project. Therefore, I would like to have a Google or Bing or Esri like BASE MAP as the Base Map of my project
Therefor please explain,
How to add a Satellite or Terrain or Satellite/Terrain Street Hybrid Base Map to my QGIS project which will be Automatically Updating.


texts: Serve very basic WMS data to a GIS system from my PHP server

texts:
Apologies for the basic nature of this question - I hadn't heard of GIS until this morning! I have a PHP server with some basic data for geographic points in a MySQL database - each one has a latitude, longitude, an image and some text. A customer asked me if I could feed this as a layer into their GIS system (based on Geocortex), and I mistakenly said that I was sure it would be easy. Uh-huh.

After much research and experimentation, I'm at a loss as to what my general approach to this problem should be - should I install a GIS system and somehow copy my data there? Should I roll my own PHP to respond to WMS requests and return the specific layers I need? And how on earth do I go from my data set to the drawing layer that Geocortex seems to need?


texts: Exporting entire bbox from overpass turbo?

texts:
I'm trying to export all the elements (peak, tracks, routes, streets.....) of a bounding box I have selected.

I'm trying to do this with the wizard, but within it, I have to choose specific tags and so export one element per each time, right?


texts: Get OGR driver Name for QGIS VectorLayer

texts:
Is it possible in the Python script to get the name of the OGR driver (for example, "Esri Shapefile" or "MapInfo File") for the QGIS vector layer?
__
QGIS 2.18


texts:
I have downloaded OSM in pdf format and are using the code below to import it into postGIS

osm2pgsql -K -G -U postgres -W --hstore --style ~PATH\osm\openstreetmap-carto.style --tag-transform-script ~PATH\openstreetmap-carto.lua -d osm ~PATH\osm\west-midlands-latest.osm.pbf

I have got the style files from https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md

When I add my layers to QGIS no style seem to be applied to the layer, am I missing something? I was expexted it to look similar to http://www.openstreetmap.org/ am I missing something obvious?


texts: How to split points by polygon using ArcGIS Desktop?

texts:
I am looking for a way to split points by a county polygon feature class.  The attached image shows two feature classes: one composed of points and the other a county polygon feature class.  The split tool would be ideal if it allowed points.  I would prefer a clean output without additional fields added to the point attributes.  Additionally, I would like to have the county name from the polygon feature class defining the new point feature classes (e.g. Kiowa, Clark, Comanche).  I appreciate any solutions and advice.

For this example, the final product should be three point feature classes named "Kiowa", "Clark" and "Comanche" produced from one, larger point feature class.  An automated solution would be ideal, as I have many, many merged point FCs over dozens of counties to work with (approximately spanning the state of KS).


texts:
I am using QGIS version 2.14.1 (Essen). I can open it no problem and load shapefiles correctly. However, when I go in the file properties and select "style"/ "unique symbols", the system crashes and the following error message appears:

qgis bin.exe has stopped working

I have uninstalled QGIS and reinstalled it, tried system restore but to no avail, the problem keeps occuring. Any idea how to fix this?


texts: ODK Aggregate PostGIS and MapServer WFS with attached images

texts:
I am using ODK Collect to collect ground data. The data collected are stored into a PostgreSQL/PostGIS database then I publish them as WFS through MapServer and read them with Leaflet (Leaflet-WFST plugin). Everything works fine except for the images (stored as bytea in PostgreSQL).

I tried to use <img src="data:image/png;base64,"+byteaField> in the html pop-up but it seems that the bytea field is not correctly exported from PostGIS to the WFS.

Someone has already done that?

This is a print screen of my PostGIS view table:

This is my WFS GetFeature: http://earthtrack.aber.ac.uk/cgi-bin/mapserv?map=/home/sec27/odk/wfs.map&SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=lccs_variables_img

More information:

PostGIS: POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released 2017/11/20" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" TOPOLOGY RASTER

Mapserver: MapServer version 7.2.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


texts: When adding new features in QField 1.7.4, the label doesn't show up in the mobile project

texts:
Strange problem when working in the field on a mobile project: when I add a new feature in a point layer, the point is visible but the predefined label in the QGIS project doesn't show up in the QField app (red circle on the printscreen). Labels of older features which were synchronized are visible in the QField app (green circles on printscreen)!
When I synchronize back to the project, then the label of the new point features added in the field do show up in the QGIS project...
I work in QGIS 3.10.8 and QField 1.7.4.
The project is saved as a Geopackage and the label style is saved in the Geopackage as a standard style.
I didn't have this problem in older versions of QField and it happens in two projects and different point layers.
What could go wrong? Is it a bug in the 2 or 3 latest versions of QField?


texts: Watch when the View changes from Data View to Layout View

texts:
I'm creating a dockable window add-in that requires the Active View to be the Data View.

I would like to disable my window when the user enters Layout View, but I've been unable to find an event that is triggered when the View changes.

I've attempted to us the "ActiveViewEvents" but none of them go off when switching views. And I know I can check if I'm in Layout view via:

IMxDocument doc = ArcMap.Document as IMxDocument;
if (doc.ActiveView is IPageLayout){/*disable window*/}
else {/*enable window*/}

but I'm at a loss on where to put this sort of check.

What event can I utilize to check when the users changes the View?

I want this event to be fired any time the user changes the view, and I do not want to put this check on every control.

 and/or


texts:
Description of the problem (what I need):

I have a set of bounding boxes (maybe the actual data is a location[longitude, latitude] in which case the bounding box will have identical corners). I have a search box (it is a bounding box too). Now I want to find which bounding boxes in my set intersect with my search box.

Question: Which databases/tools (I prefer open source ones and among them I prefer free ones) can do this?

Note: Currently I am using an in-memory RTree that I have developed. But my data is increasing and maintaining it; is becoming hard.


texts: ArcGIS 10.1, Python 2.7 "RuntimeError: A column was specified that does not exist. "

texts:
When this error is returned, a problematic column must have been encountered.

I would like to know WHICH non-existent column has been "specified".

How do I obtain this apparently obvious piece of information? Is there a good reason why it  is not supplied by default?

The code included a searchCursor that iterates through a list of variables. I guess I could comment all these out and one by one bring them back in till I find the culprit.


texts: Viewshed: why does a larger input cell size result in a larger viewshed area?

texts:
At Arc Desktop 10.7.1 I am conducting a viewshed analysis using the Viewshed tool. I am trying to understand how the input raster cell size affects the area covered by the output viewshed raster.

This screenshot illustrates my issue.  The yellow symbol, lower-right corner, is the single input point, with OFFSETA = 200 m.  I conducted two Viewshed analyses, one where the input raster was a 10-m DSM (blue output), and the other where the input raster was a 3-m DSM (red output, superimposed over the blue).  The input DSMs were generated from the same lidar source.

The screenshot includes a 3-m DTM hillshade as a viewing reference. It was not used in the analysis.

The blue and red viewsheds radiate across the body of water located in the screenshot center.  It is obvious that the viewsheds are influenced by forest along the southeast shoreline (the input DSMs are not shown here).  Thus, the general output trend makes sense: the shoreline tree canopy "shades" the water for a distance to the northwest, where the viewshed eventually comes down to the surface.

QUESTION:

I am surprised that the blue viewshed (10-m input DSM) covers such a greater extent than the red viewshed (3-m input DSM). I expected the blue viewshed to cover a slightly larger area simply due to the larger input cells.  But how to explain the tremendous output difference shown in the screenshot, particularly within the highlighted area?

I considered that perhaps the viewing angle is dependent on the input cell size.  But the ESRI Viewshed documentation simply states, "The visibility of each cell center is determined by comparing the altitude angle to the cell center with the altitude angle to the local horizon."  It does not mention a varying viewing angle.

A web search turned up nothing regarding input raster size and the resulting viewshed extent. I thus turn to SE for assistance.


texts: Importing MODIS LST data from MRT in ENVI

texts: I am doing a project on heat island effect using MOD11_A2 data. After processing in MRT I have  separate bands.  While importing them into ENVI, which bands should I select in the RGB option?


texts: Pyqgis How to merge all the active layers? or layers in the registry?

texts:
I was wondering if there is a way to merge multiple layers. I actually would like to merge all layers in the registry programmatically, all of them are point layers and have the same fields.
I have thinking I might copy all features from all layers and paste them into a new vector layer... but I believe there should be an easier option. What do you think??
Would that be possible?


texts: Improving the speed of a Postgis spatial query

texts:
I have a query that is slow on PostgreSQL 9 + PostGIS (running on a Linux computer), despite my efforts to improve its speed.

I basically have a table that contains Polygons called polygones_zones. Actually these polygons come from MultiPolygons that represent land areas broken down into mere polygons in a previous step using the PostGIS function ST_Dump() - the reason for doing this was to improve the speed of the query.
This table has about 330,000 rows.

On the other hand, I have a table with Points called sites. This table has about 290,000 rows but when running the query, I currently use only a ~4000 sample of them  before using the spatial joint.

I want to know in which areas (the original MultiPolygons) the Points are contained (Postgis function ST_Contains() ).

Everything has a 2D geometry : the Polygons were created using ST_Force2D and on the table with the points, there is a constraint "CHECK (ST_NDims(geom) = 2)". All geometries have been controlled as valid.

I have a GIST index on the geometry columns of both tables and have run a VACUUM ANALYZE and a TABLE REINDEX on both of them just before running the query.

The table definitions :

CREATE TABLE polygones_zones (
    pkid serial PRIMARY KEY,
    category varchar(50) NOT NULL,
    value varchar (255),
    origine varchar(255) NOT NULL,
    origine_id integer,
    geom geometry(Polygon, 2154)
    CONSTRAINT enforce_dims_geom CHECK (ST_NDims(geom) = 2)
);
CREATE INDEX polygones_zones_geometry ON polygones_zones USING GIST(geom);
CREATE INDEX ON polygones_zones (origine, origine_id) ;

CREATE TABLE sites (
    pkid serial PRIMARY KEY,
    origine varchar(20) NOT NULL,
    origine_id varchar(20) NOT NULL,
    status varchar(255) NOT NULL,
    geom geometry(Point, 2154),
    CONSTRAINT enforce_dims_geom CHECK (ST_NDims(geom) = 2)
);

CREATE UNIQUE INDEX ON sites (origine, origine_id ) ;
CREATE INDEX ON sites (status);
CREATE INDEX sites_geometry ON sites USING GIST ( geom );

And now the query :

SELECT
        sites.pkid,
        zones.origine ,
        zones.origine_id ,
        FALSE,
        zones.category,
        zones.value
        FROM
        (
            SELECT pkid, geom
            FROM sites
            WHERE status = 'selected'
        ) AS sites
        JOIN
        (
            SELECT DISTINCT ON (origine_id , origine)
                category, value, geom, origine_id , origine
                FROM polygones_zones
        ) AS zones
            ON ST_Contains(zones.geom , sites.geom)
;

The reason for the "DISTINCT ON (origine_id, origine)" is that when the MultiPolygons have been broken down into Polygons, the identifiers of the original MultiPolygons have been recorder in these two fields. Hence, if a multipolygon has been broken into two overlapping polygons that both contain on of the points in the table sites , without the DISTINCT, the JOIN would return two rows instead of one. Using the DISTINCT ON ensures that for a single original MultiPolygon, the JOIN will only return one row.

Running this query on the sample of Points that is about 1/100 of my data takes about 30 mn. That would mean the query on the whole data set should take about 50 hours !
What can I do to improve its speed ?

Edit : after John Powell's pertinent comment, here is the result of EXPLAIN :

"Nested Loop  (cost=525286.40..547598.60 rows=24 width=40)"
"  Join Filter: ((polygones_zones.geom ~ sites.geom) AND _st_contains(polygones_zones.geom, sites.geom))"
"  ->  Index Scan using sites_statut_idx on sites  (cost=0.42..4.44 rows=1 width=36)"
"        Index Cond: ((statut)::text = 'selected'::text)"
"  ->  Unique  (cost=525285.98..527794.86 rows=72658 width=1599)"
"        ->  Sort  (cost=525285.98..526122.27 rows=334517 width=1599)"
"              Sort Key: polygones_zones.origine_id, polygones_zones.origine"
"              ->  Seq Scan on polygones_zones  (cost=0.00..30379.17 rows=334517 width=1599)"


texts: How to export a single band raster to an ascii XYZ file in QGIS 3.14?

texts:
In QGIS 3.14 , how can I export a raster (GeoTIFF) file as a XYZ formatted textfile, like;
Lon      Lat     z
123.456  34.567  23.45
123.447  34.588  20.22
...      ...     ...

Seems I have two options to export (save) raster files:

Mouse 'Right-click' on the layer to activate the context menu and choose  Export > Save As...
From Raster menu, choose Translate (Convert Format) which is equivalent to the GDAL Translate in the Processing Toolbox.

The first option offers me lots of export formats - (below image) - but I cannot figure out which one returns simple ascii xyz textfiles.

With the second option, I can modify GDAL command call (to add -of XYZ) like I did in QGIS 2.18, but unfortunately QGIS 3.14 does not allow me to remove pre-existing -of GTiff.


texts: How to control opacity for kmz files in google maps api

texts:
I need to load several kmz files at one time via Google Maps API, and want to control the opacity for some of the kmz files. Is there a way to do it?

I checked https://stackoverflow.com/questions/4651930/using-a-kmllayer-object-within-the-google-maps-api-is-it-possible-to-allow-a-us, but the methods do not work for me.

By editing opacity via the css, the whole map's opacity will be changed...


texts: QGIS installation failed - requires matplotlib which has been installed by Anaconda

texts:
Is there any way to specify python environment variable to solve this?

When I tried to install QGIS on my machine - mac OS 10.9 and Anaconda has installed numpy, scipy, and matplotlib, I got the error message:

  matplotlib was requires.


texts: I'm searching for a way to get the bounds of a bounding box a user can drag on a map with gwt-openlayers but i can't figure out how to translate the javascript stuff to the javaside of the wrapper classes. There is a javasript example for what i need to do. Is this possible with gwt-openlayers?


texts: Creating automatic unique ID in Survey123 for ArcGIS?

texts:
I am working on Esri Survey 123 on a project.

I want to create an automatic unique ID of 6 numbers.

I can Make it by generating a unique password that consist of date and time: Example Date: 12/01/2017 Time: 12:05   ====>  Id= 120171205.

But can we do this in esri survey 123?


texts: Why is there a NULL-entry in the "Fields and Values" section of the QGIS field calculator

texts:
In the QGIS field calculator you can choose the Fields you want to add to your field calculator expression.

I wonder why there is also "NULL" listed as one option?

Choosing NULL as a value makes sense to me (for example 'field1 is null') but choosing NULL as a column identifier does not make sense to me.

Am i missing something or is this just a bug?


texts: Free News Feeds to display over maps api?

texts: I'm wondering if anyone out there knows of any free news feeds which you could display over a map api? I've had success with Twitter, but I'm looking for any free services that would offer services similar to http://info.sigacts.com/


texts: Creating shapefile layer from points added using Go To XY tool of ArcMap?

texts: How do you create a shapefile from points created using the Go To XY tool?


texts: How to improve the quality of raster tiles at high zoom levels in Geoserver

texts:
I have been testing the functionality of GeoServer as a WMS raster server and I have noticed that the quality of the tiles at high zoom levels is low. Here is an example of the GeoServer tile vs the original.

GeoServer Tile:

Original:

The single pixels need to be view-able for my intended purpose. I thought it might have been due to the png compression so I set that to 0, which did not fix the problem. I created overviews, which improved the visuals at lower zoom levels but the degradation was still present at high zoom levels. I set the interpolation method to bilinear from nearest neighbor which made no difference. I also tried using the GeoWebCache to pre-cache the tiles and this didn't help either. I used the default EPSG:4326 gridset. Does anyone know the reason for my problem and how I can fix it?


texts:
i have Issue with labelling for overlapped lines,that i want to show the labels superposed , that mean:
Label 1
       Label 2
       label 3

on the Map in Qgis , the Lines are overlapped, and i need to show the information for every line as label but lying upon each other  here is how is look in Qgis now with attribute table.


texts: Snapping polygon to raster cells using ArcMap

texts:
I'm working with raster datasets that all share the same raster cells. I have a polygon that clips out an area of interest from these datasets, but it isn't aligned with the raster cells.
Is there a simple way to snap this polygon to the raster cells using ArcMap?
To illustrate, I want this polygon line to snap to the raster cells (on all sides of the polygon):


texts: How to load postgis raster layers into R?

texts:
It is easy to get Vectorlayers into R from a PostgreSQL+PostGIS solution.

library(rgdal)
dsn="PG:dbname=plots host=localhost user=test password=test"
plots = readOGR(dsn,"Plots")

But how to do the same for raster layers stored in-db and/or out-db?
I am a bit confused if this is even possible as I haven't found any help or similar questions on the net.

At least readGDAL finds the driver, but returns error messages that I am unsure how to handle.

>dsn="PG:dbname=plots host=localhost user=test password=test port=5432"
>readGDAL(dsn,"map")

PG:dbname=test host=localhost user=test password=test port=5432 has GDAL driver PostGISRaster
and has 0 rows and 0 columns
Error in offset[2]/(cellsize[1]/abs(gt[2])) :
  non-numerical arguement in binary operator
additional: Warnings:
1: In dim(x) : no bands in dataset
2: In dim(x) : no bands in dataset

The imported raster should be fine as I can load it via QGIS.
If this is possible can someone provide a working example?

OS: Debian Jessie + PostgreSQL 9.4dev + PostGIS 2.. R.version > 3.0.0

GDAL version:

rgdal: version: 0.9-1, (SVN revision 518)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
Path to GDAL shared files: /usr/share/gdal/1.10
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: (autodetected)

GDALInfo (even if pointed directly to table):

>dsn="PG:dbname=plots host=localhost user=test password=test port=5432 table=map"
>rgdal::GDALinfo(dsn)
Error in .local(.Object, ...) : Error retrieving raster metadata


texts: Compiling QGIS 2.14 32 bit with Visual Studio

texts: I have two plugins for QGIS 2.8 32 bit until now compiled in Visual Studio 2008. Now I want to bring them up to QGIS 2.14 32 bit, but get error message in compiling because Error C2065: 'nullptr' undeclared identifier. Does anybody knows, which Version of Visual Studio used for compiling QGIS 2.14 32 bit. To my knowledge (thats awhile ago) only QGIS 64 bit was compiled in VS 2010, should I now also change to VS2010?


texts: How to combine table data to perform mean center analysis?

texts:
I have two tables: one in Excel and one in .txt format. I need to move these into ArcMap 10.1 and combine them with a polygon shapefile of counties in a state. However I don't know how to do this.

Afterwards I need to calculate the mean center of the population of the state by using the data provided by the two tables. Each table consists of a list of the counties and the population of each county for different years. The fields are the years and the first field states the county names.

I've tried merging the two tables in Excel and then importing my table in ArcMap, then when I try to do a join between the shapefile and the table I get null values where the attached table values should be.

Can someone explain to be how I would exactly get this data joined to the polygon shapefile? I'm fairly new to GIS so please be mindful of my lack of knowledge on this subject when answering.


texts: Unzipping geoprocessing package (GPK) file?

texts:
I was under the impression that all ArcGIS package files could have their contents examined and potentially used by renaming them to *.zip and unzipping them.

This impression is supported for map package (*.mpk) files by @KHibma's answer to Opening MPK file without ArcGIS Desktop? and I thought I had used it succesfully on geoprocessing package (*.gpk) files in the past.

However, today I am unable to use a tool within a *.gpk which I think is because it was created using ArcGIS Desktop 10.5.x when I am using 10.2.1.01. When I rename this *.gpk as *.zip and try to examine it in Windows Explorer I get:

  Compressed (zipped) Folders Error

  Windows cannot open the folder

  The Compressed (zipped) Folder ....zip is invalid.

Is it possible to unzip a geoprocessing package (*.gpk) file to see whether it may contain some useful ArcPy code when that *.gpk cannot be unpacked to provide a usable toolbox?


texts: Counting Block Group Populations in buffers using ArcGIS Pro?

texts:
I am trying to find the total population in 2-mile buffers to find the population 2 miles around primary care clinics. So far I have done this:

Added block group outlines and joined the areas with census data for the population for these areas. Calculated the area in square miles of each area
Added 2-mile buffers.
Intercepted buffers and block group areas.
Calculated area of block groups within the buffers and used this to calculate the new population within each buffer
Use a summary table to display the population for each clinic.

My issue is that the population values are way too high, and when I look at the data in Excel, many of the block group are listed multiple times per clinic. I wonder if this because the buffers are overlapping, as I do not see this for the buffers that have no other overlapping buffers.

What can I do to fix this?


texts:
I would like to use the function aggregate (R raster package) to assign to a grid point of the new raster the number of grid points of the old raster that have a certain value

for(val in 1:10)
{
    new.raster <- aggregate(old.raster, 10, fun = function(x) length(x[x == val], na.rm=TRUE))

    #...some computation involving new.raster...
}

I've moved "na.rm = TRUE" around in every way imaginable, but R keeps complaining about an "Error in FUN(newX[, i], ...) : unused argument (na.rm = TRUE)". Any ideas?

If it's possible to write this piece of code in a more efficient manner (having the function fun outside the aggregate function, or the like), I'd be happy if you could let me know as well, as I'm running the code for a very large number of rasters.


texts: Normalized interpolation doesn't work for WGS84

texts:
I am trying to interpolate linestring on WGS84 coordinate system by factor 0.5.
LineString length is 427 meters (measured by different tools), so I expect to get line with length=213.5 meters. But I get 227 meters. Is that well-known problem?

import shapely.wkt
line1 = 'LINESTRING (-0.13339 51.51013, -0.13109 51.5077, -0.132505 51.507191)'
l1 = shapely.wkt.loads(line1)
start_pt = l1.interpolate(0.5, normalized=True)


texts: Batch exporting to tiff using ArcGIS Pro

texts:
I've been trying to code a script to export my map series to tiff. I was able to do this in ArcMap but am unable to figure it out by myself in ArcGIS Pro.
Can you help me with my basic code T_T  ...it was copied from one of the geonet helpdesk posts. Tried to switch it up to TIFF instead of PDF export.
aprx = arcpy.mp.ArcGISProject(r"import_path")

arcpy.env.overwriteOutput = True

out_tiff = (r"export_path")

lytlist = aprx.listLayouts()[0]

if not lytlist.mapSeries is None:

    mseries = lytlist.mapSeries

    if mseries.enabled:

         mseries.exportToTIFF(out_tif + "iOV", multiple_files='TIFF_MULTIPLE_FILES_PAGE_NAME', resolution=300, tiff_compression = "NONE", image_quality = "BEST")

It errors that 'MapSeries' object has no attribute 'exportToTIFF'
...which i'm sure is a rly easy thing to fix, but I don't have much experience with coding.


texts: Python function/library for spatio-temporal clustering?

texts:
I want to cluster based on time lat and long. Is there a way I can do this?

The context is I am trying to detect connected sites in same electric ring. The data I have is the location of the site(lat/long), date-time of electricity failure and date-time of power-up.

Simply I want to cluster sites that go down when there is a power outage.


texts: Use ArcPy to add snapping guides to a layout in ArcGIS Pro

texts:
I'm wondering if there is a way, ideally with Python, to add multiple snapping guides to a layout in ArcGIS Pro. Essentially, I want to reproduce something like the steps below:

Right click on the Ruler to bring up the "Add Guides" window:

Select the guide orientation, placement, and margin:


texts:
I have a script that creates symbology for a polyline (contours) and then adds it to a .mxd file.  My problem is that it picks the “FontName” as the default field to label on the map (see attached image) and I want to change it to a different field within the attribute table (“TextString”).  I’ve looked at the labelclass object for use in arcpy, and tried to use the script below, but first of all, I’m not even sure the layer I am trying to do this with is supported (it’s a File Geodatabase Feature Class) because whenever I run the script, nothing happens (it runs b/c I get “script…returned exit code 0” at the bottom of the PythonWin window.)  Does this mean that the layer is not supported and if so, would it be supported if I pull it out of the .gdb?  Any help would be greatly appreciated.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
for lyr in arcpy.mapping.ListLayers(mxd):
    if lyr.supports("LABELCLASSES"):
        if lyr.showLabels:
            print "Layer name: " + lyr.name
            for lblClass in lyr.labelClasses:
                if lblClass.showClassLabels:
                    print "    Class Name:  " + lblClass.className
                    print "    Expression:  " + lblClass.expression
                    print "    SQL Query:   " + lblClass.SQLQuery


texts: Why does the resolution decrease with increasing incidence angle in the Sentinel-1 SAR sattelite

texts:
On this link (Sentinel1 webpage for a SLC product), the resolution is written as a range from the highest corresponding to low incidence angle, to the lowest resolution corresponding to high incidence angle.

My question is how is the resolution related in general to the incidence angle? And if they are really related, why is the resolution affected by the change in the incidence angle?


texts: Retaining subsecond time precision in date/time field in Geodatabase

texts:
I have a set of points (essentially tracks) with subsecond time precision, that would be useful to visualise/analyse.  I have tried the "Convert Time Field" tool from string, float and double field types but the date/time field does not retain the sub second decimal. Also, the seconds value in the resulting date field is missing but replaced with the round millisecond value.

I have used String to Date with these formats: yyyy-MM-dd HH:mm:ss.s ; yyyyMMddHHmmss.s to one, two and three decimal places.

Float/Double: yyyyMMddHHmmss.s

The results have been veried but most seem to lose the second values, either represent as 00 or the decimal value is represent in the seconds position.

There is not much on the forums or help pages or people having similar problems.  Any ideas?

As a side note, the "Convert Time Field" tool does not like decimal seconds as base 10 values. The tool fails to convert any values above ##.6 of a second.  So I have converted the decimal values to base 6. Therefore, 0.96 (base 10) converts to 0.58 (base6).


texts: Using transformation parameters in ArcMap?

texts:
I have transformation parameters for location which name is MILAS.

So, how I can use this parameters for transformation? Which folder should I put?

Link to a copy of the file:  https://files.fm/u/wm6gfzgp


texts: Files resulting in dBASE table and projection file but not shapefile?

texts:
Received data from an agency I'm working with. The documentation they included said what they're sending me is a Shapefile. When I go into ArcCatalog all that appears is a dbase table and project file. This is supposed to be parcel data and I was hoping maybe the dbase table had XY data or anything else I could plot, but it unfortunately does not.

Wondering if I'm doing something completely wrong (not sure what), or if they sent me the incorrect file.