texts: WFS Intersect Filter using a Polygon returns all features in Layer

texts:
I am having trouble using 'Intersect' filter on a WFS GetFeature query. Every query I make seems to return all features available in the queried layer (and not just the features intersecting the polygon I specify).

I used the topp:states layer from the publicly accessible demo Geoserver.

The POST request I made to the above server was:

<wfs:GetFeature xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.opengis.net/wfs"
    xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs"
    xmlns:ogc="http://www.opengis.net/ogc" service="WFS" version="1.0.0">
    <wfs:Query typeName="topp:states">
        <ogc:Filter>
            <ogc:Intersect>
                <ogc:PropertyName>the_geom</ogc:PropertyName>
                <gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-106.86953585585587,42.627785135135127 -107.47663975975976,38.803030540540533 -105.29106570570572,35.342538288288281 -99.280737057057067,36.01035258258257 -98.4307915915916,41.413577327327317 -106.86953585585587,42.627785135135127</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon>
            </ogc:Intersect>
        </ogc:Filter>
    </wfs:Query>
</wfs:GetFeature>

This is how the intersector polygon (in green) looks like in relation to the states:

As would be expected from the above diagram, I am hoping that the intersect query would return 7 states. Instead, what I get in the WFS response is all of the 50 states.

Am I doing something wrong in the WFS query?

I have already made sure that the polygon I used to intersect against is in the same SRS as the layer (EPSG 4326).


texts: How to find length of a discontinued line feature

texts:
I wanted to find the length of features in a road layer. So I go through each feature in the layer and used,

line = feature.geometry().asPolyline()

to find the points which particular feature is created and then used haversine formula to calculate the length. But there are some features(roads) which are not as continued lines (shown in image-yellow coloured), so the line returns an empty list.

Is there any way to find length of those type of features?


texts: QGIS expression to set all attributes in the blob field to true

texts:
I would like to use an expression to set the blob field true for all attributes.

How do I do this?

  "aufteilen"  =  'true' or "aufteilen" = 1

doesn't work


texts: How to form a V-Shape field of view from any given point (i.e. latitude longitude)

texts: I want to visualize the V-Shape polygon which can be referred to field of view as well. So, far i have been able to find the latitude and longitude of a certain point when i give an input of latitude and longitude with some specific distance. So, what i have to do next in order to form a full field of view like shape ? I have been studying as well that i have to calculate some angles like azimuth and elevation e.t.c. I got stuck into this and i'm seeing no way out.


texts: Increasing resolution of Cartopy stock background?

texts:
I am trying to create a small application that will show zoomed in maps. If possible, I would like to avoid using map tiles.

Going off the example on this page: https://scitools.org.uk/cartopy/docs/v0.15/matplotlib/intro.html

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

ax = plt.axes(projection=ccrs.Mollweide())
ax.stock_img()
ax.set_extent([35,45,35,45])

plt.show()

result:

I realize that this is the nature of a bitmap image.

I am just wondering if there is some method I don't know about for showing it in a higher resolution/dpi?

And if not, is there any middle to solution between this and using, say, Open Streetmap tiles?

I think that in order to use a tiled map I would need to run my own server, but I will largely be showing the same few map sections repeatedly, so I would think there must be some way around this.


texts: Image Adding Problem to QGIS Plugin GUI with Qt Designer

texts:
I'm using QGIS 3.1 and I created a plugin. Finally, I want to add a image(.png) to my plugin's GUI with Qt Designer. But when I add it, QGIS gives an error when it opens and my plugin does not work.
These is my steps:

First, I open my "...base.ui" file with Qt Designer and I create a empty label

Image source selection with pixmap

Scale to image and saving after that

------- Errors --------------

--- My compile.bat and recources.qrc files ----

Edit:
---Error Messages as text format---
Couldn't load plugin 'save_attributes' due to an error when calling its classFactory() method

TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

(Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.10.3-A Coruña A Coruña, 0e1f846438 )

Note: Maybe the method that I applied was wrong. I can try to image adding with different way, if you tell me.


texts: geopandas.overlay() doesn't work in google colaboratory this return AttributeError: 'NoneType' object has no attribute 'intersection'

texts:
When I try to make an intersection between two Geodataframes in google colab, I get it the next error message:

This is my pace of code:

link1 = 'https://drive.google.com/open?id=10OXg2zhFp9Dhxqz_4mXqw4R16_13VoMv'
wdir, id = link1.split('=')
id

downloaded = drive.CreateFile({'id':id})
downloaded.GetContentFile('Forest_zone.geojson')
print('The files was downloaded')

forest_zone = gpd.read_file('Forest_zone.geojson')

link2 = 'https://drive.google.com/open?id=1t5b5aUfVrOh3e5uBylmbVaXsBshc6l6f'
wdir, id = link2.split('=')
id

downloaded = drive.CreateFile({'id':id})
downloaded.GetContentFile('Study_area.geojson')
print('The files was downloaded')

study_area = gpd.read_file('Study_area.geojson')

inter = gpd.overlay(forest_zone, study_area, how='intersection')

if you want to see all notebook for helping me, this is the link of my current notebook:

https://colab.research.google.com/drive/1kTba6gqc5yDj_a3AhgwOIV3LUXG18Frs


texts: Output not overwritten despite "overwriteOutput = True"

texts:
As I understand it, overwriteOutput is an environment setting that controls whether an output overwrites an existing file of a duplicate name. Just re-checked the help pages, which confirms.

Despite having checked the relevant box in Geoprocessing > Geoprocessing Settings, as well as specified in my standalone python script that overwriteOutput = True, I received an error that the output file already exists.

bathy = r'F:\Joe_School\Thesis\data\kur_5m_bathy\kure_5m'
out_prof = r'F:\Joe_School\Thesis\scripts\Jerry\scratch.gdb\testprof'

import arcpy, os, math, time
from arcpy import env
import arcpy.management as DM
arcpy.CheckOutExtension("spatial")

env.overwriteOutput = True
desc = arcpy.Describe(bathy)
env.outputCoordinateSystem = desc.spatialReference
env.workspace = os.path.dirname(out_prof)

centroid = pointx, pointy = (367521.402, 3147853.81)
XMin = pointx - 200
XMax = pointx + 200
YMin = pointy - 200
YMax = pointy + 200
patch = SA.ExtractByRectangle(bathy, SA.Extent(XMin, YMin, XMax, YMax), "INSIDE")

DM.CreateFeatureclass(os.path.dirname(out_prof), os.path.basename(out_prof), "POLYLINE", "", "", "", patch)

It errors out on CreateFeatureClass.

Message File Name   Line    Position
Traceback
    <module>    <module1>   22
    CreateFeatureclass  c:\program files (x86)\arcgis\desktop10.3\ArcPy\arcpy\management.py 1807
ExecuteError: ERROR 000258: Output F:\Joe_School\Thesis\scripts\Jerry\scratch.gdb\testprof already exists
Failed to execute (CreateFeatureclass).

Given that there are 2 places that I know of to set this env setting, which takes precedent, and how do I make my script overwrite duplicate files?

I looked at arcpy.env.overwriteOutput = True appears not to be working?, but the problem there seemed to be with an associated function, and not the 'overwriteOutput' setting.


texts: Determine angle down to horizon from different flight altitudes

texts:
I'm a pilot, not a GIS expert.  What I need is a formula or a web site that I can supply the variables to answer my question.

I need to know the angle down to the horizon from different flight altitudes.  This is for a specific flight over the ocean so terrain is not a factor.

Knowing the angle to .1 degree will be sufficient accuracy.  Knowing the angle for every 2 thousand feet from 25,000 feet to 41,000 feet will cover my needs.


texts: Changing categorized style color simultaneously in QGIS?

texts:
I work with this polygon:

and i need that all features will be with border line only without fil colors. I seek for a way to do it simultaneously to all the categorized features, and not treat every feature seperatly.

So the result will be only border lines with a ramp color like in features 12 and 25 (i changed them manually for the example).


texts:
I have over sixty layers in a map. These are all grouped by categories. I am trying to figure out the best way to export all the layers for a given selection to a file geodatabase and also maintain the group layers.

I looked into the GP tools but didnt find a tool that supports seelction set.

Looking for some ideas.

Thanks
Jay


texts: How correctly convert WGS84 to Pulkovo 1942 with height?

texts:
I have next python code:
import pyproj
import sys
import logging
from pyproj import Transformer
from pyproj import CRS

lat = sys.argv[2]
lon = sys.argv[3]
z = sys.argv[4]
transg = Transformer.from_crs(CRS("EPSG:4329"), CRS(sys.argv[1]))
x2, y2, z2 = transg.transform(lat, lon, z)
print(str(x2) + ","+ str(y2) + "," + str(z2))

I know what EPSG:4329 is depricated, but with EPSG:4979 i get same result.
When doing this and using these input parameters: EPSG:28412 67.8 70.3 212.3345
I get the answer: 7524200.466198465,12554906.059735224,212.3345
What can I use similar, but so that the height is recounted too?
P.S. EPSG: 28412 I chose based on https://epsg.io/28412


texts: Geoserver2.6. REST cURL automation to add GeoTIFFs (batch)

texts:
I would like to add and publish hundreds of GeoTIFFs to my GeoServer datastore. I have started to write a batch file to manage GeoServer by REST API.
I have finally figured out how to create a new workspace and datastore. But do not know how to add hundreds of GeoTIFFs from a local folder. I have tried to use a loop and wildcards.I cannot figure it out.

For the following code I got the error message:

curl: no URL specified!
curl: try 'curl --help' for more information
uebung1.bat: line 28: http://loclahost:8080/geoserver/rest/workspaces/DPP/datastores/BarometricPressure: No such file or directory
mat80localhost 138 <.../TERENO_StationViewer/batch>:

Here is the batch-code:

#!/bin/bash
curl -u admin:geoserver -v -XGET -H 'Accept: text/xml'\
    "http://loclahost:8080/geoserver/rest/workspaces"
echo ""
echo ""
echo ""
curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' \
     -d '<workspace><name>DDP</name></workspace>'\
     "http://localhost:8080/geoserver/rest/workspaces"

echo "----- Then create the datastore. ------------------------------------"
echo ""
curl -u admin:geoserver -v -XPOST -H 'Content-type: application/xml' \
     -d '<coverageStore><name>BarometricPressure</name><workspace>DDP</workspace>
      <enabled>true</enabled>
      <type>GeoTIFF</type>
      <url>/misc/klima2/monitoring/climate_data/raster/BarometricPressure/2014/</url>
         </coverageStore>'\
  "http://localhost:8080/geoserver/rest/workspaces/DDP/coveragestores?configure=all"
echo ""
echo ""
curl -u admin:geoserver -v -XGET -H 'Accept: text/xml'\
  http://localhost:8080/geoserver/rest/workspaces
echo ""
echo ""
for f in *tif; do
curl -u admin:geoserver -v -XPUT -H 'Content-Type: image/tiff' \
-d "$f %.tif"
"http://localhost:8080/geoserver/rest/workspaces/DPP/datastores/BarometricPressure";


texts: What are some good examples of geospatial UI's

texts:
I am interested in understanding and applying practical geo-spatial examples for some of the transportation data that I have. I have several geocodes that I will pull from the database, and display in maps - as map clusters and points, similar to Redfin.

I want to unlock more value of my data - for instance allow the user to draw a ploygon and compute the number of points inside the polygon. Click on 2 markers and display distance etc. This makes the map more feature rich as opposed to a simple cluster of markers.

I like what leaflet offers and the abilities in Postgres/PostGIS to issue geospatial queries, and I am looking to build UI where users can query in a more intuitive mouse click and drag operations. Please point me to some good examples or sites that have implemented this.


texts: Creating QGIS Print Composer map templates?

texts:
The company I work for has asked me to create a number of templates for the different maps we include in our reports. What would be the best way of creating templates (logo, scale bar, legend).

Is there any resource (youtube or guide) you can suggest?


texts:
I have a problem with the rendering of a GeoTIFF on GeoServer. This is a single image WMS request but this happens also on tiled requests.
Not every request produces this problem. Sometimes it loads fine, but I can't figure out the difference between the requests, beyond the bboxes.

Some minutes later, for the same request:

Source data
An hillshade GeoTIFF, of 10m resolution and 35mb of total size on disk. Info from QGIS:
CRS EPSG:32626 - WGS 84 / UTM zone 26N - Projected
Extent  365536.2790999999851920,4248935.6501000002026558 : 410236.2790999999851920,4269055.6501000002026558
Unit    meters
Width   4470
Height  2012
Data type   Float32 - Thirty two bit floating point
GDAL Driver Description GTiff
GDAL Driver Metadata    GeoTIFF

WMS request
SERVICE: WMS
VERSION: 1.3.0
REQUEST: GetMap
FORMAT: image/png8
TRANSPARENT: true
LAYERS: context:hillshade_Azo_Pix
CRS: EPSG:3857
STYLES:
WIDTH: 2505
HEIGHT: 1032
BBOX: -3202736.94991267,4622674.188938925,-3106999.571998813,4662115.695528585

GeoServer
Version 2.19.0, running on OpenJDK 11 on Ubuntu 16.
I've tried with and without MarlinRenderingEngine and results are the same.
There is little to no load on this system.
Logging
I also inspected the logs (default, geoserver_dev and geotools_dev profiles) and i can't see anything suspicious beyond this:
2021-05-08 18:54:18,312 WARN [lite.gridcoverage2d] - Could not reduce the grid geometry inside the valid area bounds: ReferencedEnvelope[-2.147483647E9 : 2.147483647E9, -85.0 : 85.0]


texts: postGIS: what is more efficient: single or two-point search

texts:
I have seen different approaches to conducting searches.  Which is the best approach in storing the data for database efficiency:
saving both longitude and latitude points

longitude
latitude

vs saving a generated point from both longitude latitude?

POINT(#{longitude} #{latitude})

Context: rails 3.2.18 application, postgresql 9.3.4, postgis 2.1.3
Two types of queries are to be conducted for finding objects:

Point with radius and
Within a polygon

Instinctively, a single point would mean less indexing.
Jason Scheirer's comment below is of the same opinion:

I would think that having the point geometry pre-generated as a column value would be more efficient than building it for each row on every query.

However, that does not mean there are underlying mechanics, particularly for the polygon, are more efficient in one mode rather than the other...


texts: Split all OSM roads within boundingbox in 20m segments and save to new table

texts:
I have a PostGIS database with all streets from OSM within a given bounding box. Now I want to split all roads from my table planet_osm_roads into segments of max 20 meters length and save those segments to a new PostGIS table.

The geometry of the roads is save in "way geometry(linestring,900913)". Can anyone give me a hint on how to accomplish this?


texts:
I am studying the use of GRASS GIS within QGIS and I need a little help with the understanding of the v.kernel module.
I didn't find any human help within the manual (very cryptic)

I have a point data vector and I need to study the density of the points
distribution in my mapset using a bandwidth of 1000 meters.

How do I set the parameter <stddeviation>, or in other words ... what is this parameter related to?
What is the correct use of this parameter in relation with the settings
of the bandwidth?
Can I simply set the parameter with a value of 1000?


texts: Input parameters for i.topo.corr algorithm in QGIS Python console

texts:
I'm trying to run the i.topo.corr algorithm in the QGIS Python console, on a multi-band WorldView image. I'm still getting an error that the input value is incorrect. For this algorithm, the inputs are the bands on which the algorithm will be applied:

input: Name of reflectance raster maps to be corrected topographically

Parameter type: QgsProcessingParameterMultipleLayers

Accepted data types:
    - list[str]: list of layer identifiers
    - list[str]: list of layer names
    - list[str]: layer source list
    - list[QgsMapLayer]
    - QgsProperty

According to the documentation (https://docs.qgis.org/3.4/en/docs/user_manual/processing/console.html#processing-console), the value for a multiple input is:

« Multiple input. The value is a string with input descriptors separated by semicolons (;). As in the case of single layers or tables, each input descriptor can be the data object name, or its file path. Simply use a string with the name that identifies the data object to use (the name it has in the QGIS Table of Contents) or a filename. »

There is my code in QGIS Python console. I don't know how to refer to the bands of my image in the input parameter:

import processing

processing.run("grass7:i.topo.corr", {'INPUT': 'ImageName_band1';'ImageName_band2';'ImageName_band3',
    'BASEMAP': 'Illumination_model_name',
    'ZENITH': 69.7,
    'METHOD': 2,
    'OUTPUT': r'output_directory'})

I tried many thing for the bands in imput parameter: imageName.1, imageName_1, imageName@1, imageName_B1, etc.


texts: GeoServer WMTS WKB error when QGIS reads PostGIS fine

texts:
Is there some problem that can make PostGIS point geometry unreadable by GeoServer WMTS? The points are generated with st_makepoint with lon/lat float args.
I'm especially confused because I have other layers that work fine.

 java.lang.RuntimeException: org.geotools.data.DataSourceException: An exception occurred while parsing WKB data org.geotools.data.DataSourceException: An exception occurred while parsing WKB data An exception occurred while parsing WKB data Unknown WKB type 77

https://geo.hyphae.design/geoserver/stream/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=stream%3Asbir_sid_f5ck5f8hwjibdgpmuck6&maxFeatures=50&outputFormat=application%2Fjson

"0101000020E6100000A59849E0237255C0EB43A5DF7F194340"
"0101000020E610000079686721247255C0968E24FB79194340"
"0101000020E61000003D31E96B247255C0951046B274194340"
"0101000020E6100000360300AA247255C0E7FCE14A70194340"
"0101000020E6100000328F64D3247255C0C8EF495B6D194340"
"0101000020E61000008956934CF37155C019ED4CFCAC194340"
"0101000020E6100000F1FE97ABEE7155C057CF52977C194340"
"0101000020E61000003B2A2E7FF07155C006EAB3A87C194340"
"0101000020E6100000ADCDB51EF47155C09CB92CCB7C194340"
"0101000020E61000001000BADBF77155C09B1B27CF7C194340"


texts: Is there a concept of a Z value or "altitude" associated with each point of a polygon that can be exposed with WFS in GeoServer?


texts: adding polygon to database in openlayers

texts:
I want to add a polygon to the database. I used the following code. The problem is that I am to able to save in database. Whatever polygon I draw on map it gets save temporary and as soon as I reload the application all the polygon vanishes. Please help

wfs_layer = new OpenLayers.Layer.Vector("wfs_layer", {
       strategies: [new OpenLayers.Strategy.Fixed(),saveStrategy],
       visibility: false,
       protocol: new OpenLayers.Protocol.WFS({
       version: "1.0.0",
       srsName: "EPSG:4326", // this is the default
       url:  "http://localhost:8089/geoserver/IIRS1/wms",
       featureType: "india_state",
       featureNS: "http://www.opengeospatial.net/IIRS1",
       extractAttributes: true,
   geometryName: "the_geom",
schema: "http://localhost/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=IIRS1:india_state"
    })
        }
);

vector = new OpenLayers.Layer.Vector('vector');
map.addLayers([wfs_layer,vector]);

// saving

function saveSuccess(event) {
          alert('Changes saved');
          }
            function saveFail(event) {
           alert('Error! Changes not saved');
              }

        var saveStrategy = new OpenLayers.Strategy.Save();
        saveStrategy.events.register('success', null, saveSuccess);
        saveStrategy.events.register('fail', null, saveFail);

//adding draw polygon button to tool bar

    action = new GeoExt.Action({
    text: "draw_poly",
    control: new OpenLayers.Control.DrawFeature(
        vector, OpenLayers.Handler.Polygon),
    strategies: [saveStrategy],
    map: map,
    toggleGroup: "draw",
    allowDepress: false,
    tooltip: "draw_polygon",
     });
actions["draw_poly"] = action;

toolbarItems.push(action);
 toolbarItems.push("-");

// Saving button

action = new GeoExt.Action({
    text: "Save",
    control: new OpenLayers.Control.Button({
           trigger: function() {
      if(feature) {
                  feature.selectControl.unselectAll();
                  }
      saveStrategy.save();
  }
    }),
    map: map,
    // button options
    toggleGroup: "Save",
    allowDepress: false,
    tooltip: "Save",
     });
actions["Save"] = action;
toolbarItems.push(action);

toolbarItems.push("-")


texts:
I downloaded the FlowMapper plugin for Qgis and I can't seem to find any information on how it is supposed to work...

Also the text seems to cut-off and not fully showing for the input fields so I'm not quite sure what the fields should be anyway...

Here is an example of what I mean:

I tried to select a file storing my node coordinates but am not allowed to (greyed-out) pick files that are .csv, .dbf, .shp or seemingly any of the filetypes on my computer... Which is why I started looking for some information on how to use the FlowMapper plug-in, after finding nothing descriptive I thought it would be easier to ask someone who has maybe used it successfully before.

For reference I have a point file of centroids of polygons and I have a collection of lat long points which contain an attribute that should connect them to one of the above mentioned centroids. Maybe there is a better way to do this?

QGIS 1.8.0 on Mac


texts: OpenLayers 3 - zoom to a selected feature

texts:
I am working with OpenLayers 3. I used a dropdown menu to select a feature and I would like to zoom to the extent of the selected feature.  At the moment, it is possible to select by the dropdown menu but not to zoom. Is there any way to fix this?

    function selectByDivision(){
            var divisionUser = document.getElementById('division-select').options[document.getElementById('division-select').selectedIndex].text;

            var selectedFeatures = select.getFeatures();
            selectedFeatures.clear();
            var features = lyr_divisions3857.getSource().getFeatures();

            if(features){
                  for(i=0;i<features.length;i++){
                                            if(features[i].get('DIVISION')==divisionUser){

                                                        feature= features[i];
                                                        selectedFeatures.push(feature);
                                                                                //map.zoomToExtent(features[i].getDataExtent());

                                                        var polygon = selectedFeatures.getFeatures();
                                                        var extent = polygon.getGeometry();

                                                        var size = (map.getSize());
                                                        view.fit(
                                                        extent,
                                                        size
                                                        );

                                                        map.getView().fit(extent, map.getSize());
                                                        }
                                                    }
                            }
                        }


texts: Features disappear when switching 2D to 3D?

texts:
I'm working on OL3-Cesium. Right now my main focus is to add parallel lines to a given line string. That's working perfectly fine in 2D view. But as soon as I switch to 3D view, the parallel lines I added disappear. I'm unable to pin point the problem. Or is it a limitation with Cesium ?
I've provided a gif describing the same.

http://i.imgur.com/kmtkW5D.gif

As you can see, I'm able to create lines parallel to the original line string. But as soon as I switch to 3D view (Blue flash) , all that remains is single line string. New line strings disappear.
I'm not able to catch the mistake. I've done almost the same thing earlier as well, that was with polygons. i.e. earlier also I've added features corresponding to the existing features in 2D mode and they stayed in 3D view as well. But this time, it's not working.

Views/ suggestions please ?

Edit:
Hi all, I found the solution and have posted it in the answer section.
Can anyone now help me understand the reason why this change of feature type resulted in disappearance of the features in 3D view ?


texts:
I am trying to georeference a newly acquired satellite image to a previously georeferenced image, i.e. match the newer raster to the older one with manually or automatically created control points. I'm trying to work out whether these control points are created by first selecting a point on the georeferenced raster (or vector), then the corresponding point on the unreferenced raster, or is it the other way around. Or when I automatically generate points, which are the red and green crosses?
There is little detail in the help pages for ArcGIS. The most info I can find is this (my emphasis):

The connection between one control point on the raster dataset (the from point) and the corresponding control point on the aligned target data (the to point) is a link.
The example below shows a from control point (yellow cross) placed on the vector target data at a street crossing and the associated control point (green cross) placed on the raster dataset.

Source: Fundamentals of georeferencing a raster dataset
Is it just me or are those definitions of the from and to points contradictory? What is correct?


texts: Can you use Google Maps offline, with OpenLayers?

texts:
I use OpenLayers, GeoServer and PostGIS in my application. Is it possible to have Google maps offline? No need to connect to internet to get it. I'm working to make my app working offline only for security matters.

If not, then what do you recommend me to replace it with?


texts: popular solution for display both tiles and vector data in android map app

texts:
We are planning to build a location based app like google map in android.

We have some experiences in the PC development,that's to say we have a similar javascript api like google map javascript api, while, we load our own data which are pre-processed to millions of tiles through our original geographic data of arcgis format combined with the template(.mxd) document. We use the same strategy for both the vector data and satellite data.

However We do not think it is a good idea to use the tile strategy in mobile platform since it will cause the storage problem. We hope the user can cache the data for offline use.(At least they can cache the vector data(not the tiles but other vector format),since the original satellite data is image which is seem not suitabe to cache).

So we plan to render the vector data using opengl and render the satellite as it is (display the images one by one in an order just like it in the PC).

According to the docs,we should use a sub class of GLSurfaceView to use the opengl renderring. But which kind of view can be use for the images layout for satellite data? And how to switch betweem them?

I am new in android and I hope someone can give me some advices. Thanks.


texts: Layer fields refactoring does not work for CSV export file

texts:
In my graphical model does not working refactoring layer fields. Entry layer has two fields, which first is string and second is integer.
My Refactoring functions change first column to int and second to string.
Problem is in result CSV file, where both columns are string.
The entry layer:
{
   "type":"FeatureCollection",
   "name":"input_layer",
   "crs":{
      "type":"name",
      "properties":{
         "name":"urn:ogc:def:crs:OGC:1.3:CRS84"
      }
   },
   "features":[
      {
         "type":"Feature",
         "properties":{
            "id":1,
            "string_col":"a",
            "int_col":1
         },
         "geometry":{
            "type":"Point",
            "coordinates":[
               17.188928015181641,
               50.339572602501271
            ]
         }
      },
      {
         "type":"Feature",
         "properties":{
            "id":2,
            "string_col":"b",
            "int_col":2
         },
         "geometry":{
            "type":"Point",
            "coordinates":[
               17.141655627366305,
               50.278921237002351
            ]
         }
      },
      {
         "type":"Feature",
         "properties":{
            "id":3,
            "string_col":"c",
            "int_col":3
         },
         "geometry":{
            "type":"Point",
            "coordinates":[
               17.20468547778675,
               50.234027334108539
            ]
         }
      }
   ]
}

Graphical script:
from qgis.core import QgsProcessing
from qgis.core import QgsProcessingAlgorithm
from qgis.core import QgsProcessingMultiStepFeedback
from qgis.core import QgsProcessingParameterVectorLayer
from qgis.core import QgsProcessingParameterFeatureSink
import processing

class Model(QgsProcessingAlgorithm):

    def initAlgorithm(self, config=None):
        self.addParameter(QgsProcessingParameterVectorLayer('entrylayer', 'entry layer', types=[QgsProcessing.TypeVectorPoint], defaultValue=None))
        self.addParameter(QgsProcessingParameterFeatureSink('Result', 'result', type=QgsProcessing.TypeVectorAnyGeometry, createByDefault=True, defaultValue=None))

    def processAlgorithm(self, parameters, context, model_feedback):
        # Use a multi-step feedback, so that individual child algorithm progress reports are adjusted for the
        # overall progress through the model
        feedback = QgsProcessingMultiStepFeedback(1, model_feedback)
        results = {}
        outputs = {}

        # Refactor fields
        alg_params = {
            'FIELDS_MAPPING': [{'expression': '"string_col"', 'length': 0, 'name': 'string_col', 'precision': 0, 'type': 2}, {'expression': '"int_col"', 'length': 0, 'name': 'int_col', 'precision': 0, 'type': 10}],
            'INPUT': parameters['entrylayer'],
            'OUTPUT': parameters['Result']
        }
        outputs['RefactorFields'] = processing.run('qgis:refactorfields', alg_params, context=context, feedback=feedback, is_child_algorithm=True)
        results['Result'] = outputs['RefactorFields']['OUTPUT']
        return results

    def name(self):
        return 'model'

    def displayName(self):
        return 'model'

    def group(self):
        return ''

    def groupId(self):
        return ''

    def createInstance(self):
        return Model()

Result CSV layer contains both column marked as string:
string_col,int_col
"0","1"
"0","2"
"0","3"

Is it possible refactor fields and save to CSV file in correct data types?


texts:
I have an ArcPy script, which I use with ArcGIS Pro. I use one feature class as input_feature, do some calculations and write results in another feature class (output_feature).
Is it possible to use the the same feature class as input and output? I want to write my calculation in the same feaure class, which was the input.


texts: ArcGIS Network Analyst Creating Service Areas Beyond Network?

texts:
I am experiencing weird off shoots which are beyond  my network when creating service areas using Network Analyst. The red circle in the picture below shows an example. I am currently using ArcGIS 10.0 SP5.

ArcGIS 10 Network Analyst Service Area Problem/Peculiarity with Solving, but did not have an answer beyond using detailed polygons instead of generalized polygons.

Where might this error come from?

Perhaps it is due to a dirty/poor network or a peculiarity within the calculation of generalized polygons.


texts: How to change which python GDAL is "connected" to?

texts: I would like to use GDAL with Python 2.7 on Ubuntu 14.04. I have installed gdal-bin and python-gdal from UbuntuGIS following their instructions. However, importing GDAL (from osgeo import gdal) only works with /usr/bin/python, not the python installation I'm trying to use it with (~/anaconda2/bin/python). How do I point to which python installation to install the GDAL python bindings for?


texts:
I would like to display a message before QGIS close. But I can't intercept the closeEvent of the main window from my plugin. I've tested this code which doesn't work.
# Main method
QgsApplication.instance().closeEvent = self.mainWindowCloseEvent

def mainWindowCloseEvent(self, event) :
    # displaying message...
    event.ignore()


texts: Extraction affine transformation while using rasterio.features.rasterize

texts:
I am currently using rasterio.features.rasterize to rasterize my shapefile.
But currently I am always using an Rasterfile to a) rasterize and b) save on disk. The get the information of the transformation of the old file and the shape. etc.
Is there a way to circumvent this problem. For I now the resolution I want to have, from the shape files I know the crs and I should be able to get a start position, and maybe even the best orientation?
I am currently trying to write some code I want to containerize and the raster file is some extra huge amount of data, I don't really need.


texts: Intermittent multi-threading in Grass 7?

texts:
I have a script with runs GRASS 7 r.li.* commands through R with spgrass6 on Ubuntu 14.04/64 bits. I ran the script and was amazed at the speed at which it was running. So, I looked at the system monitor and was pleasantly surprised to see that the load was nicely shared among the 4 cores. I later ran the same script again, on the same file, after rebooting the computer, and everything was running much slower. I examined the system monitor and now everything was now single-threaded. The same functions now run at 1/10 of the original speed.

What could have caused GRASS to go from multi-threading to single-threading. How do I revert it back?


texts: Setting up PostGIS: Postgres can't see the PostGIS extensions?

texts:
I've just installed Postgres 9.3.4 and PostGIS 2.1 on OSX Mavericks using the very latest versions of the KyngChaos libraries. This is a new machine, and I deliberately haven't installed Postgres using Homebrew or Macports.

However, when I try to create spatial extensions on a database, I can't, because Postgres claims not to be able to see the extension file:

:~ anna$ psql -d land -c "CREATE EXTENSION postgis;"
ERROR:  could not open extension control file
"/usr/local/Cellar/postgresql/9.3.4/share/postgresql/extension/postgis.control":
No such file or directory

It looks as though the file is located somewhere else:

:~ anna$ mdfind postgis.control
/usr/local/pgsql-9.3/share/extension/postgis.control

I'm definitely using the expected version of Postgres, although I don't know it's actually the Kyngchaos version:

:~ anna$ psql --version
psql (PostgreSQL) 9.3.4

:~ anna$ which psql
/usr/local/pgsql-9.3/bin/psql

It looks like perhaps there are multiple versions of Postgres floating around on my system, and I'm using the wrong one?

:~ anna$ mdfind -name "postgres" | grep -G "postgres$"
/usr/local/pgsql-9.3/bin/postgres
/usr/local/var/postgres
/usr/local/Cellar/postgresql/9.3.4/bin/postgres

Can anyone advise me on what to do next?

FURTHER UPDATE

Here's the output of pg_config:

BINDIR = /usr/local/pgsql-9.3/bin
DOCDIR = /usr/local/pgsql-9.3/share/doc
INCLUDEDIR = /usr/local/pgsql-9.3/include
PKGINCLUDEDIR = /usr/local/pgsql-9.3/include
INCLUDEDIR-SERVER = /usr/local/pgsql-9.3/include/server
LIBDIR = /usr/local/pgsql-9.3/lib
PKGLIBDIR = /usr/local/pgsql-9.3/lib
LOCALEDIR =
MANDIR = /usr/local/pgsql-9.3/man
SHAREDIR = /usr/local/pgsql-9.3/share
SYSCONFDIR = /usr/local/pgsql-9.3/etc
PGXS = /usr/local/pgsql-9.3/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-openssl' '--with-pam' '--with-krb5' '--with-gssapi' '--with-ldap' '--enable-thread-safety' '--with-bonjour' '--with-python' '--without-perl' '--enable-nls' '--with-libxml' 'CC=clang' 'CXX=clang++' 'CFLAGS=-Os -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -D_FILE_OFFSET_BITS=64' 'LD=clang' 'LDLFAGS=-arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk'
CC = gcc
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -Os -arch x86_64 -D_FILE_OFFSET_BITS=64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -arch x86_64 -Wl,-dead_strip_dylibs
LDFLAGS_SL =
LIBS = -lintl -liconv -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -ledit -lz
VERSION = PostgreSQL 9.3.4


texts: Why do ArcToolbox tools give ActiveX error?

texts:
I work with ArcGIS 9.3. When I try to run any ArcToolbox tool I receive the message:

  Window Internet Explorer [Title of the Window]

  One or more ActiveX controls could not be displayed because either:

  Your current security settings prohibit running ActiveX controls on this pages, or
  You have blocked a publisher of one of the controls

I tried to solve the problem but I could not. Is anybody who has an idea what is going on?


texts: Extract polygon-coordinates from citygml data using citygml4j

texts:
My question is closely related to Extract geometry from citygml data using citygml4j

I have a citygml file with buildings and I need to extract the coordinates of each roof surface. I use the open source library citygml4j. My code is almost the same as in the link, but I am stuck at the line:

AbstractRing exteriorAbstractRing = polygon.getExterior().getRing();

How do you extract the coordinates of the polygon-geometry from here?

Found the solution with help from @JulianRosse. There are some solution if is a LinearRing, e.g.:

((LinearRing)polygon.getExterior().getRing()).toList3d()


texts: Passing "self" when calling functions in modules from other modules using PyQGIS?

texts:
I'm building a QGIS 3.0 plugin and trying to organise my code into several files. I have three files - a main python script and two other scripts stored in a subfolder. Excerpts provided below:

\myplugin.py:

from .mod import pmp as pmp
from .mod import helpers as h

class MyPlugin:

    def __init__(self, iface):

        self.iface = iface
        [...]
        h.msgInfo(self,"Plugin initialised!")
        pmp.test(self)

\mod\helpers.py:

import qgis.core as qgisCore
from qgis.core import Qgis, QgsApplication, QgsMessageLog
from qgis.gui import QgsMessageBar

def msgInfo(self, message, **kwargs):
    title = kwargs.get('t','')
    dur = kwargs.get('d',10)
    self.iface.messageBar().pushMessage(title, message, level=qgisCore.Qgis.Info, duration=dur)

\mod\pmp.py:

from . import helpers as h

def test(self):
    h.msgInfo(self,"PMP module successfully imported!")

Importing "helpers" is working perfectly for myplugin.py, as the "Plugin initialised!" message is showing as expected. Similarly, importing "pmp" seems to be working for myplugin.py. But when myplugin.py gets to this line:

pmp.test(self)

I get this error:

TypeError: test() takes 0 positional arguments but 1 was given

I've tried "self.pmp.test()" instead, but then of course I get "AttributeError: 'myplugin' object has no attribute 'pmp'".

If I use just "pmp.test()", then pmp.py gives me "NameError: name 'self' is not defined".


texts: ArcMap replication tool does not synchronize changes made in versioned view from SQL Developer!

texts:
I am trying to replicate a feature class from Oracle to MSSQL Server using one-way replication(parent-child) replication. The replication works when edits are made from ArcMap,since I have to insert bulk data in that version and finally replicate it therefore making edits/inserts from ArcMap is not feasible.
Replication works on the default version and data in default version comes from a view that is created while registering the feature class as versioned. Therefore, I am inserting or editing data in that view. The data is also found in version's respective table i.e Add and Delete tables. But when I run synchronization, it does not migrate those changes to MSSQL Server made from SQL Developer.


texts:
I have a huge number of .DEMs and have been investigating how to process them into something useful.

Does anyone know how, or even if it is possible to read coordinates and elevation data from .DEMs using .NET?  Specifically C#.


texts: Generating Token By URL Request From ArcGIS Portal?

texts:
I am able to create token from Generate Token operation on ArcGIS Portal Directory using IP Address of this request's origin parameter like

but when I try to achive the token from URL like
https://map.geoca.com/portal/sharing/rest/generateToken?username=mapAdmin&password=psw&referer=https://map.geoca.com&f=json

I am getting this error message

  {"error":{"code":405,"messageCode":"GWM_0005","message":"Method not
  supported.","details":[]}}

How can I fix this to get the token?


texts: Sensitivity analysis for coarse scale GIS epidemiological model?

texts: I am working on an epidemiological model with disease incidence rate as dependent variable and environmental factors as independent variable. Disease data is available at county scale whereas environmental data is in raster format that can be re-sampled as needed. Scale plays a major role when we talk about modeling as a model may be good at one scale and not so good at the other. For this reason I think conducting sensitivity analysis may be the right option. My question here is how to approach based on the data available for study. Any ideas, links to articles or journals is much appreciated.


texts: Georeferenced black and white maps showing up as mostly transparent and very low resolution once exported from MXD to KMZ

texts:
I exported .pngs from a simple black and white pdf map, georeferenced them in ArcMap 10.3.1 and then wanted to export them KMZ. However, upon opening my kml, the maps have become mostly transparent, and any black lines have become very low resolution.

See attached images for the original B&W and the resulting layer in the KMZ (viewed in google earth).


texts:
I'm right now working with navteq data and building 'the XML-File' to generate the tiles!

I started with an all original osm.xml, and set all the status' to "off".
First I checked the dataset in my database with SRID(the_geom) and got a return "SRID:4326". So I set up the layer to SRID4326 instead of SRID900913.

<Layer name="myLayer" status="on" srs="+init=epsg:4326">

My pgSQL query was written according to the OSM query:

(select the_geom, 'true' as "water", polygon_nm as "name"
      from waterseg ) as myLayer

The next step was to setup the stylesheet. I did that - set the max and min zoom level to the maxima. So the zoomlevels should influence the rendering.

But it's not working. I can't see a single stroke on the image. I just get an empty picture. I tried to look through the file and see if there is any problem with a potential z-level - don't think so. Next was to check the bounds - no matter if I set bounds as 900913 or 4326 the image is still the same.

I assume strongly, that I have somewhere a problem with the projections. Can anyone help me? Has anyone ever tried to render a full map from scratch, without the predefined stylesheet!

Thanks


texts: Loop through list of raster and replace values with another raster if they meet a condition

texts:
I'm very new to python and arcpy.

The task:
I have a large series of rasters (r0, r1, r2, r3...) (tif; n=240) and corresponding quality rasters (qr0, qr1, qr2, qr3...) (tif) with values 0,1,2,3 (whereas 0 is good quality and all other values are bad quality). I would like to check the cell quality of a quality raster (e.g. qr1) in a if-statement. If condition is true (quality=good=0), I would like to replace that quality value by the corresponding raster (r1), if not, I would like to check if the quality is true in the previous quality raster (qr0) at the same pixel location and if true, I would like to replace the quality value with that raster value (r0). In the case that quality value is also bad, I would like to check a third case: if the following quality raster value (qr2) is true, than replace the value with the corresponding raster (r2). If the quality is bad in all three quality rasters (qr0, qr1, qr2), than assign a no data to the cell.

My initial idea:
As far as I'm informed I should use a nested for loop-statements with if or elif-statements but I'm a bit confused in how assigning the speficic rasters and looping through them.


texts: How can I insert degree symbol to attribute table in feature class?

texts:
I am trying to insert a bearing string into an attribute table,
I want the string to look like this -> S 58°15'31" W ,
but what I am getting in the table is this -> S 58Â°15'31" W

The code I am using is in a ArcMap toolbox.tbx

Here is the function I am using to create the bearing string

def returnBearingString(azimuth):
bearing=None
dmsbearing=None
if azimuth>270 and azimuth<=360:
    bearing = 360 - azimuth
    dmsbearing=ddToDms(bearing)
    dmsbearing = """N {0}°{1}'{2}" W""".format(int(dmsbearing[0]),int(dmsbearing[1]),int(round(dmsbearing[2],0)))
    return dmsbearing
if azimuth>=0 and azimuth<=90:
    dmsbearing=ddToDms(azimuth)
    dmsbearing = """N {0}°{1}'{2}" E""".format(int(dmsbearing[0]),int(dmsbearing[1]),int(round(dmsbearing[2],0)))
    return dmsbearing
if azimuth>90 and azimuth<=180:
    bearing= 180 - azimuth
    dmsbearing=ddToDms(bearing)
    dmsbearing = """S {0}°{1}'{2}" E""".format(int(dmsbearing[0]),int(dmsbearing[1]),int(round(dmsbearing[2],0)))
    return dmsbearing
if azimuth>180 and azimuth<=270:
    bearing = azimuth-180
    dmsbearing=ddToDms(bearing)
    dmsbearing = """S {0}°{1}'{2}" W""".format(int(dmsbearing[0]),int(dmsbearing[1]),int(round(dmsbearing[2],0)))
    return dmsbearing

Here is the function I am using to convert dd to dms

def ddToDms(dd):
negative = dd<0
dd=abs(dd)
minutes,seconds = divmod(dd*3600,60)
degrees,minutes = divmod(minutes,60)
if negative:
    if degrees>0:
        degrees = -degrees
    elif minutes>0:
        minutes = -minutes
    else:
        seconds = -seconds
return (int(degrees),int(minutes),round(seconds,3))

Here is how I am using it to write to feature class.

ic = arcpy.da.InsertCursor(leaseRoadSegment.name,["OBJECTID","SHAPE@","BEARING_STRING"])
bear  = returnBearingString(az)
newRow = 6000,polyShape,bear
ic.insertRow(newRow)

where the azimuth is just a number between 0 and 360.


texts: Hydrological model building for flooding analysis

texts:
I am recently studying the topic in investigating the features of river and to perform flooding analysis.

I got the elevation data, and I used the elevation data to generate streams in ArcGIS and I have studied the features of river such as the stream density, stream order, stream length in ArcHydro.

The first part of my study is finished, but I have no idea how to start with the flooding analysis.

Can I build a model in ArcGIS to perform the flooding analysis? I have read some papers related to my study and I found that the Curve number method may work in my study to get the discharge of the river. However, how can I compare the calculated discharge with the capacity of river(based on cross-section) to check whether flooding will occur?

Also, how can I work on Curve number method if only rainfall data and elevation data are given, as curve number method involves many calculation parameters, such as initial abstraction and infiltration rate.


texts:
I've been trying to install QGIS 3.4.4 Madeira on Windows 10 x64. I've tried the network installer and the standalone version, both of which say they installed successfully but no desktop or start menu items appear and I can't find any way to run the software.

There's no qgis.bat file in the bin folder, just a qgis.bat.tmpl. Renaming that as I saw someone suggest doesn't do anything.

Also saw a suggesting to remove qt5 files from the system32 folder but there aren't any of those files in there.

Any ideas what could be going wrong with the install?


texts: Calculating sun's azimuth angle for lat/long points in ArcMap or any other software

texts:
I am working on Solar project and I was just wondering if I could calculate sun azimuth angle for a location point shapefile in ArcGIS on any other software.
Are there any good detailed tutorials for Solar Radiation (toolset) in ArcGIS?


texts: Overlay 2 rasters using {rayshader} using add_overlay. Wrong dimensions after resampling

texts:
I have two raster objects elev and image, which have different resolution but same extent. elev contains elevation data, and image is an rgb raster. What I would like to do, is to plot the elevation map in 3d and add the layer from the image on top.
library(raster)
elev <- raster("swissALTI3D2019-3.tif")
image = brick("TK100_Dufour-5.tif")
res(image)
#[1] 4.998897 4.997546
res(elev)
#[1] 0.5 0.5
extent(image) == extent(elev)
#[1] TRUE

In order to make sure the two raster have the same resolution, I use resample() function, and create the elev_res object
elev_res <- resample(elev, image, method="bilinear")
res(elev_res) == res(image)
#[1] TRUE

In order to plot them on ray shader, I am then transform them to a matrix.
elev_res_mat = raster_to_matrix(elev_res)
image_mat <- raster_to_matrix(image)

But when I run the following code, I get the following error Error in *tmp*[, , 4] : incorrect number of dimensions
elev_res_mat %>%
  sphere_shade(texture = "imhof1") %>%
  add_overlay(image_mat, alphalayer = 0.5) %>%
  plot_map()


texts: PyQGIS handle ##output=html as input of geoprocessing script

texts:
In QGIS 2.14.5 I would like to create a model that determines a statistics for a raster layers' unique values (Tool Raster layer statistics) and does some further computations with the result.

I think, the output of this tool must be ##output=html, according to the documentation http://docs.qgis.org/2.14/de/docs/user_manual/processing/scripts.html?highlight=script.

The question is, when writing a geoprocessing script that computes this html output, what is the corresponding input?

Since there is no ##input=html, I tried ##input=file and ##input=longstring as well, but I'am not able to connect the output of the above mentioned tool to my script.


texts: Is there anything like OGC Property IN list Filter?

texts: I am converting some CQL filters to OGC, and I'm wondering whether there is something like a   propery in list filter in OGC, or the only solution is to combine the PropertyIsEqualTo with an OR filter. I suspect there isn't, but if you have a nicer solution please share.


texts: Getting the actual size of map canvas using PyQGIS

texts:
How to get pixel size of canvas in QGIS?
It is possibly by Python. I mean this red rectangle area in the image.


texts: How can I display a GeoTIFF with multiple bands on OpenLayers?

texts:
I have a NetCDF file including 1365 bands (when opening in QGIS for example). To display it on an online map like OpenLayers, I tried to export it as a GeoTIFF image. I read a solution here that suggests MapTiler to convert the file to Tile, but it does not work, since the file has more than one band!

Do you know any other way to display GeoTIFF on OpenLayers?


texts: Generate random points within a polygon with minimum distances in QGIS 2.14

texts: I have a polygon in QGIS 2.14 and want to generate a specified number of coordinate points within that polygon, with a minimum distance apart. The fTools Random Points tool doesn't give this option, and neither does the "Point sampling" analysis tool in the Point Sampling plugin (or maybe I don't know how to use it properly). Is there a way to do this in QGIS? I know it's quite straightforward in the Random Points tool in ArcGIS.


texts: Reload Geoserver with REST - password security

texts:
I've found the way to reload Geoserver by REST (Geoserver Configuration Reload), but my issue is about security of that solution. My reload request is fired from a bash script periodically, so it's written in file.
Is there a way to hide the password from other users with root access to the server?


texts: How to investigate ModelBuilder results in ArcGIS 10.2?

texts: When executing a model, is there a way to view the geoprocessing results?  When I visit the geoprocessing menu and results, nothing appears.


texts: How to create a map colored by distance to nearest point in R

texts:
I'm new to GIS and R-- hope this question makes sense.

I have a dataframe(geo07) containing two variables that record the long/lat values for about 6000 points (mat_long & mat_lat).  These points correspond to all health centers of a certain type in the US.  I can plot the points on a US by:

map("worldHires","usa", xlim=c(-125,-60),ylim=c(25,52), col="gray95", fill=TRUE)
points(x=geo07$mat_lon,y=geo07$mat_lat,pch=19, col="red", cex=0.5)

But what I really want is to color the entire US map based on distance to the closest health center.  Conceptually, I need to break the US into points/small areas and color them based on their distance to the nearest health center.  Is this a heatmap?  Are their R functions to do this?


texts: GXP: FeatureManager is not firing WFS GetFeature requests when setting EPSG:3857/900913

texts:
I've created a web map viewer using OpenLayers, ExtJS, GeoExt and GXP. I've added a LayerTree (gxp_layertree) that shows layers from various WMS servers (GeoServer). I've also configured a FeatureManager (gxp_featuremanager) with 'autoLoadFeatures = true' and a FeatureGrid (gxp_featuregrid).

The problem appears when I click on a layer tree node: the FeatureManager doesn't "autoLoadFeatures", it just fires a WFS DescribeLayer request to get the column names for the FeatureGrid.
Trying to isolate the problem for a couple of hours by commenting and changing code I've discovered it works perfectly with projection setted to EPSG:4326, but not with EPSG:3857 or EPSG:900913.

Do you have any idea about why this is happening or how to solve it??
I need the map projection to be EPSG:3857 because I have Google base layers.


texts: Setting center and resolution on initialization of view results in center going to [NaN, NaN] on zooming with mouse

texts:
I'm using the following to initialize my view for the map in openlayers 4.

var olview = new ol.View({
    center: ol.proj.fromLonLat(coords),
    resolution: resolution,
    minResolution: 0.025,
    maxResolution: 2500,
    projection: 'EPSG:3857'
});

The coords and resolution are passed as arguments to the function that creates the view. When zooming with the mouse the center of the map goes to [NaN, NaN]. Using the or the plus/minus buttons or animate function on the view works as expected, and after animating the view the zoom functionality works as expected.


texts:
I want to use clipper function over a raster layer with the help of mask layer (.shp file) which will produce a clipped raster layer.
How this can be done with Python script?

I used this script:

import processing
processing.alglist("clip")
processing.alghelp("qgis:clip")
inputlayer = qgis.utils.iface.activeLayer()
#define mask layer
overlaylayer = "E:\abc.shp"
processing.runalg("qgis:clip",inputlayer,overlaylayer,"E:/output_file.tif")

but it shows this error:

Unable to execute algorithm
Wrong parameter value


texts: How to count unique lines intersecting with polygons?

texts:
Like u can see on the attached picture i did an intersection with a Raster (purple squares) and the red lines. What i need to know is the count of joins each line has for each square. What makes this impossible is the fact that the lines are split where they intersect itself. They are not split where they intersect other lines.  Is there any option where i am able to get one line for each time a line crosses a square ?

I am not sure if its plausible what i want. Let me know if u need some more information.


texts: Can you set custom fields for a [Feature] Layer?

texts:
Is there some way I can "tag" a [Feature] Layer so that I can grab the layer from the service and see in some attribute LocationField =

I suppose I could put that information in the description and just parse it out, but I'm looking for a way to see what layers (if any) map to some "object" in my SQL database. I would much rather not have to put that kind of config info in my DB.


texts: JSON layer does not show when .setview changes

texts:
I've set a Mapbox map with a GeoJSON layer overlaying it. The problem is that with the default set values, the JSON layer shows up just fine. However, If I change the .setView too much, the JSON layer doesn't show up, just the map. Can anyone explain to me why this is occurring?

<!DOCTYPE html>

   <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
   <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />

   <link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.8/mapbox.css' rel='stylesheet' />


texts: About of low and high gain in Landsat for illuminate the scene

texts:
I don't know because after of make the calibration (only TOA) the false color  composition (543 in Landsat 7) yet is different between 2 scenes. A scene looks opaque and another is clear (both are of the same place and the time is similar). The difference is that in one scene, the bands 4 and 5 are High gain and in the another scene are Low gain.

Is normal the visual problem? I assumed that the TOA correction should remove the  angles's effects. How could make these scenes are seen with the same lighting?


texts: Populating row numbers with Field calculator using PyQGIS

texts:
I have the following code, which is creating a new column called "group" without issue, but not populating it with a row number 1-n, as I'm intending it to.
pv = layer.dataProvider()
pv.addAttributes([QgsField('group', QVariant.Double)])

layer.updateFields()
expression = QgsExpression('@row_number')

context = QgsExpressionContext()
context.appendScopes(QgsExpressionContextUtils.globalProjectLayerScopes(layer))

with edit(layer):
    for f in layer.getFeatures():
        context.setFeature(f)
        f['group'] = expression.evaluate(context)
        layer.updateFeature(f)

I do not get an error, it just prints a bunch of null values instead of 1-n.

Is anything popping out as wrong? I followed a tutorial verbatim, and just substituted @area for @row_number, which is the expression I need in this case.
I replaced @row_number with $id and it worked, but I'd still like to know why @row_number doesn't.


texts: I'm trying to export features with at least one attribute to dxf, is that possible? E.g. I need the name or layer name of the feature in the CAD application.


texts: Linking images to features in geojson layer popup using Leaflet?

texts:
I have a map of cycle fatalities, in which skull icons are clicked to produce custom popups:

I would like to include an image along with the rest of the information on the popup, so there's a picture of each person who was killed. In the example, there would be an image of "Noah Cardomon" on the popup, and so forth for the other icons.

. Thus far the coding for this layer looks like this:

    var skullIcon = L.icon({
    iconUrl: './png/skull4.png',
    iconSize: [30,30],
    popupAnchor: [-10, -30],
  });

    var fatalities = L.geoJson(fatalities, {

    pointToLayer: function(feature,latlng){

    function fatalitiesLayer (feature, layer) {}
    return L.marker(latlng,{icon: skullIcon});

        //popup coding
    }, onEachFeature: function (feature, layer){
        layer.bindPopup("

"
                        +feature.properties.name+"
"
                        +feature.properties.description+
                        "
Date: "+feature.properties.date+
                        "
Location: "+feature.properties.location+
                        "
Cause: "+feature.properties.cause+
                        "
"
                       );
    }
    }).addTo(map);

I am able to call +feature.properties.location, etc. into the popup, they're very clearly coded in the geojson file. But insofar as an image is concerned, I'm at a bit of a loss.


texts: Is it possible to have inheritance in rule based styling on QGIS?

texts:
Currently using QGIS to draw some waste water network.

Styling depends on the size of pipe (thickness of the line)

AND on the status of the pipe (continuous, doted, ...)

It's actually fine since I had three size classes, but when changing to 10 size classes, it becomes to heavy to maintain since each class must be defined by hand.

This would be useful on many projects.


texts:
I'm WMS cascading a layer from a QGIS server into GeoServer, so I can use symbols from QGIS. Is there some way to cascade the same layer both through WFS and WMS with the same name?
I want to use GeoServer's access right feature, so I need to cascade and not ask QGIS directly. When I publish the layer for WMS, the name of the layer is reserved and I need to change either the layer name or workspace for WFS.


texts: I have a very large feature class I would like to symbolize for a basemap, but having issues with performance

texts: Im using ArcMap 10.5 to make an ArcReader map viewer for my office. For the basemap, im using data sourced from an Open Street Map data extract. I would like to display buildings polygons as just uniform grey polygons on my basemap. My map region is very large and the buildings featureclass contains almost 10 million polygons.  I do not need these features to be labeled and there doesn't really need to be any data associated with them either since they are purely being used for reference on the basemap. The features are set to not turn on until 5k scale, meaning once turned on, there are maximum 50 or so features on the screen at once. Yet, it is still painfully slow. So far I have tried to merge all features into one multi-part feature, but this actually decreased performance, and I have also tried the Polygon to Raster tool, but my output was blank (I believe this was because the feature class' extent is roughly 8 states and was too large to produce the Raster file, however I am not very experienced with creating or using rasters at all.)


texts:
I am trying to reproject and retile BMNG data. So far I have processing my images into geotifs. I can view them together in QGIS and everything looks good:

I then created a vrt file. The vrt file lives in the same folder as the tifs. When I attempt to open the vrt in QGIS or run gdalwarp on it, I get the following error:
ERROR 4: \1_3.tif: No such file or directory

The lines in the vrt that reference the offending tif look like this:

<SimpleSource>
      <SourceFilename relativeToVRT="1">\1_3.tif</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="512" RasterYSize="512" DataType="Byte" BlockXSize="512" BlockYSize="5" />
      <SrcRect xOff="0" yOff="0" xSize="512" ySize="512" />
      <DstRect xOff="1536" yOff="1536" xSize="512" ySize="512" />
</SimpleSource>

What am I doing wrong?


texts: How to install QGIS-SERVER 3.6.X in Linux CenOS7

texts:
I do as QGIS official document with yum ,but got Qgis-Serve version 2.14 ，I need to install a higher release version.
What should i do?


texts: I am working with data that are unprojected (they are in lat/lon) and for every point I want to create a buffer of 800 meter. How can I construct a buffer of 800m. but give the distance in decimal degrees? I use ArcMap 10.2.


texts:
I am pretty new with QGIS and GIS in general.
The thing is I have 2 shapefiles, the first one with municipalities (2457 polygons) and the second one with hydrological regions (363 polygons). I need to know which municipalities are inside which hydrological region. The shp with the hydrological regions has a column with an ID (HR1, HR2, etc.).
How can I add that value to each municipality?


texts: Removing item text from a layer in a legend in the print composer

texts:
I am a new user of QGIS and I am having a problem configuring a legend on the Print Composer.  I am trying to remove the item text from a layer and then alter the text below hoping that this would compact the legend.  Here is a screenshot of the Print Composer showing the legend and elements I am trying to alter:

The process I used was to select the layer --> click the pencil edit button -->  delete all the text in the popup box. After I clicked OK I expected the text to disappear, but it doesn't.  I think I'm missing something obvious?!


texts: Arcpy script appearing in text format in arcgis 10.1 but in Idle (normal) format in arcgis 10

texts:
I added my arcpy scripts in Arctoolbox.
But, when opening in edit view in Arctoolbox in Arcgis 10.1, they are opening in text format instead with Idle edition mode. That is not appearing in Arcgis 10.
I would like to have them opening in Idle edit mode in Arcgis 10.1.


texts: QGIS 2 runtime error message on Windows 8:new install

texts:
I am getting the following error message:

  Run Time Error
  Program:C:\PROGRA~1\bin\qgis-bin.exe
  R6034
  An application made an attempt to load C runtime library incorrectly
  Contact application suppliers"

My operating system is Windows 8 2012. I have a 64 bit operating system QGIS version Desktop 2.0.1, Browser 2.0.1. This is following download when I try to open the Desktop

I am not hugely computer operating system literate so please can the answers avoid too much jargon!!


texts: Can tools or addins created in ArcMap be published and used in ArcGis Online?

texts:
I'm attempting to build an interactive map that would be hosted in AGOL. It would be a network query, whereupon selecting a point feature from an "inlet" layer, the map would display the corresponding (down-tree) "outlet" point feature. The point features on the network are connected by poly-lines with "upstream" and "downstream" fields that correspond to ID fields in the "inlet" and "outlet" tables.

I've created a .gdb in ArcMap, and have published the layers to AGOL succesfully, but am now unsure how to approach the scripting necessary for functionality. Can I create a tool/addin in ArcMap using Python, and then publish to AGOL? Or can I create a tool within AGOL itself? I'm having trouble finding a clear answer in any of ESRI's documentation.


texts: Using of esriFieldTypeDate field in Add Features REST service?

texts:
I need to use Add Features REST service to add a new record to a table in an ArcSDE geodatabase.

One of the field is type of esriFieldTypeDate, but I don't know how to populate this field in JSON script. An example is as follows:

[
    {
      "attributes" : {
        "LOCATION_ID" : 30,
        "LOCATION_NAME" : "SDAF",
        "LOCATION_STATUS" : "IN USE",
        "GEOMETRY_ID" : 30,
        "CREATE_DATE" : "2008/06/16 00:00:00 AM"
      }
    }
]

Column "CREATE_DATE" is of esriFieldTypeDate type. But the above JSON ended up with an error.


texts:
I try to process XYZ Files In Potree but it not works But when i try .las file it work prefectly fine
My commands line arguments
./PotreeConverter.exe C:/wamp64/www/PotreeConverter2/PotreeConverter_1.5_windows_x64/teknikrum_finger_a_fine.xyz -o C:/wamp64/www/PotreeConverter2/PotreeConverter_1.5_windows_x64 --generate-page pageName

NOtE : : I Don't know actual Projection i give projection of 3857 is this the problem why it is crash but i  think there is something else which even Crash Output result on XYZ formats ??


texts: Running into memory issues when loading a composer layout

texts:
I'm trying to load a specific composer layout model, but it not respond properly, slowing down my computer, consuming all it's memory, to the the point of giving me no option but a Windows hard reset.

I've used this layout model in previous versions whit no problems at all.
Also, creating a new blank layout work's just fine.

I've try to overcome this situation by making a copy of a project that had already the layout in the composer manager, and, then, just adapt the layers and features.

It was possible to open the layout and work on it, but when I'd saved the project, close the composer, and try to re-open, I've got the same memory usage issue.

My configuration is:
Windows 10 Pro v 1903
QGIS 3.10.0


texts: Install qgis-server-font-loader Plugin on QGIS 3.4.8 (Windows Server 2016)

texts:
I'm trying to install this plugin: https://github.com/avinet/qgis-server-font-loader.
First I copied the Zip-folder in C:\OSGeo4W64\apps\qgis-ltr\plugins
then I opened QGIS and installed the plugin from Zip.
This is the Error:
Konnte Erweiterung 'qgis-server-font-loader-master' nicht laden aufgrund eines Fehlers beim Aufruf der classFactory() Methode

AttributeError: module 'qgis-server-font-loader-master' has no attribute 'classFactory'
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
    plugins[packageName] = package.classFactory(iface)
AttributeError: module 'qgis-server-font-loader-master' has no attribute 'classFactory'

Python-Version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS-Version: 3.4.8-Madeira Madeira, 04ee8e0761

What am I doing wrong?


texts: Rotating Feature in Vector Layer using PyQGIS

texts:
I am using QGIS 3.4.  I am new in gis and I am trying to rotate a feature of a vector layer.

Code:

for ft in feat:
    vlayer.startEditing()
    the_geom = ft.geometry()

    pt = ft.geometry().centroid().asPoint()
    the_geom.rotate(-90, pt)
    ft.setGeometry(the_geom)
    iface.mapCanvas().refresh()
    vlayer.commitChanges()
    break

The geometry of the feature seems to change. However, I can not see any difference on the canvas.

Is there a better way to do this?


texts: Trouble with using Freemarker to formate Date for GeoServer GetFeatureInfo

texts:
I'm having some trouble while trying to use the Freemarker Template to display dates in the desired format.
I store points with a date information in a PostGIS database written through an FME-process in an ISO format (%Y-%m-%d) to use them in an time-enabled WMS with GeoServer.
When calling the GetFeatureInfo, the date is displayed in the following format 10/4/12 12:00 AM, where it should be 2012-10-04. We allready changened the server setting to -Dorg.geotools.localDateTimeHandling=true -Duser.country=DE -Duser.timezone=GMT -Duser.language=de.
Since this didn't give the desired outcome, we tried it with the Freemarker Template. The idea was to check the attributes for date format and format them accordingly. Somehow, I can't make it work. I tried this:
<#if attribute.is_unknown_date_like>
${attribute.value?string("YYYY-MM-DD")}
<#else>
${attribute.value}
</#if>

I get an error message for the line where the condition starts:
freemarker.core.ParseException

How can I make this condition statement work?
Edit 01.07.2020:
I realized that I should use attribute?is_data_like with a ? since it is a build-in. With this change, the error message gets more significant.
2020-07-01 08:19:02,521 ERROR [geoserver.ows] -  freemarker.core.ParseException: Error on line 29, column 46, in template content.ftl Found is_date_like, expecting one of:  is_directive,  parent,  js_string,  j_string,  uncap_first,  is_transform,  number,  is_hash,  trim,  children,  has_content,   iso_ms,  xml,  iso_utc,  byte,  double,  left_pad,  matches,  capitalize,  number_to_datetime,   contains,  size,  iso_local_h_nz,  iso_utc_ms,  iso_local_m_nz,  is_collection,  long,  default,  iso_utc_h_nz,  iso_local_ms,  is_boolean,  last_index_of,  c,  iso_utc_m_nz,   is_macro,  rtf,  iso_utc_nz,  upper_case,  node_name,  reverse,  cap_first,  url,  is_hash_ex,   iso_nz,  is_enumerable,  exists,  number_to_date,  first,  iso_local,  date,  iso,  replace,  float,   right_pad,  datetime,  node_type,  split,  iso_ms_nz,  number_to_time,  is_sequence,  iso_utc_m,  html,   ancestors,  iso_utc_h,  iso_local_ms_nz,  new,  last,  sort,  eval,  lower_case,  web_safe,  is_date,   is_string,  iso_local_nz,  word_list,  seq_last_index_of,  node_namespace,  string,  keys,  iso_m_nz,  values,   seq_index_of,  chunk,  sort_by,  iso_m,  starts_with,  substring,  index_of,  iso_h,  root,  floor,  iso_h_nz,   ceiling,  if_exists,  chop_linebreak,  iso_local_h,  length,  is_indexable,  groups,  is_node,  iso_local_m,  int,   iso_utc_ms_nz,  xhtml,  ends_with,  round,  interpret,  is_method,  namespace,  short,  seq_contains,  time,   is_number  in content.ftl

So, the problem seems to lie within the built-in. As statet in the error message, Freemarker expects is_date instead of is_date_like, eventhough in the Freemarker documentation it is stated that is_date_like should be uses instead of is_date https://freemarker.apache.org/docs/ref_builtins_expert.html.
So I tried the following:
<#if attribute.value?is_date>
${attribute.value?date?string.iso}
<#else>
${attribute.value}
</#if>

Now, no error message appears, but the date format is unchanged.


texts: When I should use Rtree/KdTree vs Morton z-index and s-curves?

texts:
I was always confused by those two families (?) of indexing.

I feel that the first one goes with the "normal" data, while z-index and s-curves work the best for tiling/grid/uniformly distributed datasets, is that correct?


texts: I have a Google Maps compatible tileset running on a local server and I can browse this in a browser with the Google Maps API and OpenLayers. Can I force Google Earth to use this tileset so I can navigate it in 3D or will it be incompatible? If so, where do I set the function or string that takes a zoom,row,column index and turns that into a URL? Is there some KML format somewhere?


texts: ArcGIS Add-In Project to Standard Library Project

texts:
I have been developing an ArcGIS 10 Add-In tool, but requirements changed halfway through development. Fortunately, this isn't changing any of the code, but I just need to be able to compile the project as a standard COM extension instead of an Add-In.

I removed the esriaddinx file, and when I go to compile, it states that it is an invalid Add-In project. I haven't seen any properties within the project that declare it as an add-in project.

Does anyone know how ESRI flags their projects to compile as add-ins, and is there a way to reverse it without creating a new project and importing files?


texts: Split a polygon layer with a line layer?

texts:
I am drawing administrative regions that have boundaries follow streets in another layer. As these streets are pretty long with many vertices, I don't want to re-trace them. I am looking for a way to "split" the polygon like "split features" tool (the one with the scissors icon).

Before: one whole polygon with a line running through it

After: the line works as a pair of scissors and split the polygon into 2 parts (in the picture below, the polygons were moved apart for illustrating purpose only)


texts: Using conditional statement for attribute data with ArcPy?

texts:
I'm working on a code, I want to be able to update(change) a value in the attributes table using a python code and I've used the update cursor function but the code isn't working, nothing changes.

I will show you my code and tell me if anything is wrong with it:

fc = "SmartMeter1"  field = ['OBJECTID','ON']  with arcpy.da.UpdateCursor(fc,field) as cursor:
 for row in cursor:
    if row[0]==2:
        row[1]=0
    else:
        print ('no fault')
    cursor.updateRow(row)

this is the code, as you can see i'm trying to use the update cursor to change the attribute value to 0 if the objectiid equals 2 and this is my attribute table:

so I want to change the second row to 0, this is just initially and if this works I will further expand my code.

Can you can tell me how I can fix my code and make it work, or if there is another function other than update cursor i can use?


texts: Geometry/Geography type issue for US Census TIGER ShapeFiles

texts:
I'm loading the ShapeFiles from TIGER into SQL Server (via Python Geopandas/Fiona). It seems the boundaries are all of the Geometry data type (flat-earth).

Do these file exist in the Geography format (round-earth, lat/long)?

Here's a link to the FTP site: ftp://ftp2.census.gov/geo/tiger/TIGER2017/

And the web interface:https://www.census.gov/cgi-bin/geo/shapefiles/index.php


texts: Where can I find data on Vegetarian Restaurants in the US?

texts: I'm doing a GIS project on Vegetarianism and I'd like to include all of the vegetarian restaurants in the United States.  I haven't been able to find anything like it, or even data on all restaurants, vegetarian or no.  Does anyone know where I could look for it?


texts:
0558253.7   13083091W

The data came in a csv file which was then converted to an xlsx file in Excel. No mention of original coordinate system, and the fields were just named - "LATITUDE" and "LONGITUDE, respectively.

It doesn't look like Decimal Degrees (DD), Degrees Decimal Minutes (DDM), or Degrees Minutes Seconds (DMS), and I don't think it's any of the single field notations like MGRS.

Data is originally from the Alaska Department of Natural Resources (DNR) provided as a csv.

The problem isn't finding the right coordinate system, but rather the notation used to represent the coordinates. For example, DMS, DD, or DDM.


texts: Rescale raster to custom resolution using sum as the function to aggregate

texts:
I have a 0.0083 resolution population raster dataset which I would like to upscale to a 0.5 resolution raster. In particular, I would like the aggregation process to sum all the 0.0083 pixels contained each into of the new 0.5 grid cells. This way, each 0.5 cell contains a value which is the sum of all the original 0.0083 cells which are underlying it.

I am familiar with QGIS, R, or Python.


texts: What methods are there to produce map tiles for google maps?

texts:
newbie to stack exchange here.

I'm currently using the automatic tile cutter found here to make the standard 256x256 tiles required to make a custom map type for my map. The map tile cutter script feels quite clumsy to use, and I quickly use up all of my machine's 4GB of ram to open photoshop and use it. That, and it's very bothersome to pad my images with empty space on the top and bottom so that it's positioned correctly.

Does anyone know of other tools which can be used to make tiles for google maps?


texts: Values not appearing after join in ArcGIS Desktop?

texts:
After joining a CSV file, the columns in the attribute table show up as if the shapefile and CSV are joined, but no data shows up. After playing around with it, I found that if I join a second CSV file that has identical names for the provinces, I can get the values of the original to show up (if you're interested, joining the second CSV file alone will display its values).

Since I can access my data in the end, it's not an urgent question, but I was interested in what's going on. Here are some screenshots of what is being displayed.

Shapefile attributes table showing no values after being joined to CSV 1:

Shapefile attributes table showing values of CSV 1 after being joined to CSV 1 and CSV 2:

Edit: Though I was originally able to see the data when I joined both CSV files, ArcMap would not show the values when choosing the symbology. I was able get things to display by creating a new CSV with the data from both and by changing the title of the Total Outputs from "TOut####" to "TO####". Still unsure of why there was ever a problem, though.


texts: Upload File Geodatabase without Server, Credit Usage?

texts:
Instead of going through a server to publish an arcgis web service hosted layer, I want to go right from my local machine to AGOL so that my server is NEVER exposed.
I want to eventually put this File GDB into Collector.
I have credits to use, but not many.

I zipped the .gdb and uploaded it to my content.  I then want to publish it, but before I do this how many credits will it use and will it reuse credits everytime I overwrite? What is the best way to manage a GDB (I need to coded value domains) in AGOL so I can access it on Collector, WITHOUT using a server?


texts: Calculating cells elevation (height) above nearest stream cell using ArcGIS Spatial Analyst

texts:
I have searched for some ideas on how to formulate this analysis, but have come up short.  I imagine there is a pretty straight forward answer; any help would be greatly appreciates.

Data:
DEM, 1/9th arc second (~10-meter), 239,891,470 cells, projected;
Streams, National Hydrology Data set, high resolutions, 9,470 features vector;
Streams, Same as above, but converted to a raster

Problem: Need to create a raster of the same resolution and extent as the DEM where each cells's value is its height (in meters) above the nearest stream (line or cell).

I am working with ArcGIS 10.1 with spatial analyst.  I would prefer to run this analysis in Python, but can do it in R if it is easier.

Edit to clarify: each cell in my stream raster has the value of the elevation at that point. All cells that are not within a stream have a value of zero.  For every cell in the extent of the DEM, I am looking to find the nearest stream cell and subtract the value of that cell (the elevation) from the elevation of the cell being analyzed. Calculate the difference in elevation between each cell and the nearest cell representing a stream.


texts:
I would like to make a heat map of "building density" based on the area of the building footprints (I have them in a geojson as polygons) in relation to their "non-building" surroundings based on fixed grid (or alternative). So in other words put a grid over the map 100x100m and in each grid sector look at the area relatioship between the building footprint and the surrounding footprint. The more building the denser.
How would I best go about this? Are there better ways to do area based heatmaps? I have calculated centroids for each building and made heat maps with that but I need something based on area not topology.


texts: QGIS/GDAL Georeference image by CRS and corner coordinates

texts:
I have several images in JP2 format, but for whatever reason the 'geo-information' is in a different file in a bit strange format.
It is the CRS (4326) and the Lat-Long coordinates of the pixels in the corners of the images (UL, UR, LL, LR).

Is there a way to automatically (or manually) convert them into GeoTiff with a correct Geotiff-header, using QGis or GDal?

I also have Matlab and IDL (without ENVI) available.


texts: Rotating the polygon about anchor point using Python script

texts:
I know there would be no tool in ArcPy module as such but might have in third party modules. I however tried taking the vertices of the polygon and moving using the below formula. But did not get the correct output coordinate values and polygon thus generated is weird.
I have tried this function
def RotateAxis(AnchorX,AnchorY,inputx,inputy, WindDirection):
    x = inputx - AnchorX
    y = inputy - AnchorY
    resultx = (x * math.cos(WindDirection)) - (y * math.sin(WindDirection)) + AnchorX
    resulty = (x * math.sin(WindDirection)) + (y * math.cos(WindDirection)) + AnchorY
    return (resultx,resulty)

where Anchor is the origin and WindDirection is the angle which I tried taking in radians as well as degrees but could not get correct results.
I tried with projected coordinates that didn't work either. Is there any suggestion?


texts: Pros and Cons of virtualisation technology for database-server and datastorage

texts:
Yesterday we had a chat about performance and restorability and I realized how many good things a virtualisation environment can bring to me - but as I'm a little sceptic concerning performance I'm asking here

Will a database server suffer from severe performance loss through virtualisation? I don't understand the technology to the last detail, but somehow it's a 'blackbox' more that needs to be processed through hardware. Also will disk access, with all the tricks postgis gives to us be granted (clustering, index etc.) - fragmented clustering is like no clustering!

The big advantage is maintenance and scalability. In case of a severe hardware malfunction I can migration within minutes or even realtime to another physical machine.

Who has experience and can point me to good websites or literature on this topic. I remember a few things from the last FOSSGIS and a few inhouse benchmarks on ESXi and native Servers and somehow I can't make up my mind whether it's good or not.


texts: Setting polygon borders to transparent in ArcPy?

texts:
I am creating automated maps in ArcGIS with a similar Python Code which can be found here:  Map automation to iterate through attribute table using ArcPy?

I cannot find out on how to set the borders of my polygons to transparent in the endmaps. As I read on other posts across the internet, this should be possible by just preparing the layout of your layers as you want them to have and save it as an .mxd file - I did so. The same goes for the legend, I save it with 0 decimal places but the map creates many of them.

Anyone know a solution for this or how to enforce it with python code?


texts: How to deal with multiple overlaps in PostGIS?

texts:
I've been fighting this for quite a long time and everytime I think I got it, I got it wrong actually.

What's the trouble

See picture below. As a result of line buffers I got overlaps that need to be removed on buffer ends. I'm looking for a way to tell PostGIS which overlaps should be differed from which buffer. I ended up with topological incorrect polygons several times.

If you wish, grab the table dump.

I get all the overlaps with this query:

SELECT
        DISTINCT (ST_Dump(ST_Intersection(a.geom, ST_Union(b.geom)))).geom geom
        FROM test a, test b
        WHERE a.geom && b.geom
            AND ST_Intersects(a.geom, b.geom)
            AND NOT ST_Equals(a.geom, b.geom)
        GROUP BY a.geom

No idea how to proceed.

UPDATE
I need to remove overlaps so buffers face each other just fine with no white space. E.g. if two buffers overlap, the overlapping portion of space should be removed just from the one of those two.


texts: Getting difference between two versions of Shapefile using QGIS?

texts:
I have two shapefiles that are the same in terms of the type of information they contain (same attribute fields).  One is essentially an updated version of the other, so the newer version contains all the data of the earlier version plus more.

Each data entry has a unique id field. I am looking for a way to essentially 'subtract' the older shapefile from the newer one.  This cannot be a spatial operation, it must be based on the attributes. I use primarily OGR and QGIS.

Any ideas on how to do something like this?


texts:
I try to calculate the frequency/count of pixel values of a raster in R using freq().

library(raster)
RastSmall <- raster(nrow=70, ncol=70)
RastBig   <- raster(nrow=7000, ncol=7000)
set.seed(0)
RastSmall[] <- round(runif(1:ncell(r_hr), 1, 5))
RastBig[] <- round(runif(1:ncell(r_hr), 1, 5))

freq(RastSmall)
value    count
[1,]     1  6540000
[2,]     2 12150000
[3,]     3 12140000
[4,]     4 11720000
[5,]     5  6450000

However, it is a fairly large file and takes extremely long, i.e. up to hours. Is there a faster way in R?

system.time(freq(RastSmall))
  user  system elapsed
  0.008   0.000   0.004
system.time(freq(RastBig))
  user  system elapsed
  40.484   0.964  41.445

Is there a way to speed this up? Alternatively can this be done in the command line using something like gdal tools?

However, it is a fairly large file and takes extremely long. Is there a faster way in R? Alternatively can this be done in the command line using something like gdal or AWK?


texts: Difference between qgis.utils and qgis.core?

texts:
Please, can you tell me what is the difference between qgis.utils and qgis.core ?

I'd like to understand step by step the QGIS API Document.


texts:
Firstly, congratulations to Gregor Aisch for creating such a wonderful library, thank you!
I am having a little trouble rendering an svg from some osm data. I downloaded the Sweden transportation data from here and this is my json config file:
{
    "layers": {
        "roads": {
            "src": "roads.shp",
            "simplify": false
        }
    },
    "export": {
        "width": 800,
        "round": 2
    },
    "bounds": {
        "padding": 0.02,
        "mode": "bbox",
        "data": [377.9582, 59.3031, 378.1233, 59.3731]
    }
}

The problem is that it's just creating a blank svg file. When using the polygons mode and if filtered to say a building it renders fine. Any help would be greatly appreciated.
Thanks,
Tom


texts: Changing Date Format via Field Calculator of ArcMap?

texts:
I'm trying to find a function in the Field Calculator (preferably in VB Script) that can add numbers into a field that already has data.

I have year data ranging from the 1960s to 2014 in string format, and the only data I currently have in my field is the last two digits for each year (i.e. 60, 71, 75, 00, etc. which represents 1960, 1971, 1975, 2000).

Is there a way I can add the 19 and 20 to the correct years using the Field Calculator for the entire field?

I apologize if this is a repeat question, but I'm new to the site and couldn't find any answers.


texts: Getting Not valid license manager message in ArcGIS for Desktop?

texts:
I try to check the availibility of my licenses in the ArcGIS Administrator, but it shows this message:

  does not have a valid license manger please enter a valid license
  manager server

Despite the fact that the licenses server is running!

I have ArcGIS 10.3 with advanced concurrent license and both the license server and the ArcGIS installed on the same machine and the fire wall is turned off.


texts:
If I connect to my campus network, the map is not showing any data dots. And from the screenshot you can see the error messages.

If I use any other network, for example using my phone's hot spot via att lte, or comcast from my home, it is fine.

Any one knows what is happening?


texts: What is an undirected graph with cost and reverse cost?

texts:
What is the purpose of a graph that is "undirected, with cost and reverse cost"?
Where is the difference to a graph that is "undirected, with cost" ?

For me it does not really make sense, because for my understanding the reverse cost should just come into play when the graph is directed ...
(Figure from http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#fig2)


texts: ST_Buffer() ST_SummaryStats conflict in PostGIS

texts:
I created a segmented line and buffered each segment with a 4m buffer in PostGIS. After running ST_SummaryStats() on the geom element of my segmented line I get a lot of NULL values in my attribute table. When I run zonal statistics on the same geometry in QGIS (Raster Analysis > Zonal statistics) I get no NULL values while running GRASS v.rast.stats gives me  exact the same output like in PostGIS, additional with the warning:

WARNING: Not all vector categories converted to raster. Converted 2128 of 3361.

Which correspondents also with the numbers of missing values in Postgis.

My code looks like this:

    WITH polygons AS( SELECT row_number() Over()::int AS id, ST_Buffer(ST_LineSubstring(geom, n/length,
      CASE
        WHEN (n+dist) < length THEN (n+dist)/length
        ELSE 1
      END),4, 'endcap=flat join=miter' ) AS the_geom
    FROM
      (
      -- Example line of length 10m
      SELECT 10.0 AS dist,
             ST_Length(geom) AS length,
             geom AS geom
      FROM <line.table>
      ) AS subQ
    -- We cross join with a series.
    CROSS JOIN generate_series(0,(floor(length/dist)*dist)::int,dist::int) AS n
    )

    SELECT id,the_geom,
    (ST_SummaryStats(ST_Union(ST_Clip(rast,the_geom)))).max
    FROM <raster.table> join polygons on st_intersects(rast,the_geom)
    GROUP BY id,the_geom;

I think the error is located at the ST_Buffer() function which somehow throws out "incompatible" geometries for ST_SummaryStats(), but I cannot detect why some geometries are valid for ST_SummaryStats() and some invalid. I'd appreciate every tip, about how I can solve this problem.

*I'm using PostGIS Version 2.3.2.


texts: Lost access to Desktop Help of ArcMap 10.5?

texts:
Today I found that I can't aceess help on system tools through "Tool Help" button. It opens help window which says:

  Can’t reach this page

  Make sure the web address //ieframe.dll/dnserrordiagoff.htm# is    correct
  Search for this site on Bing
  Refresh the page

I am afraid it is Windows October update in action.
Does anybody know how to fix this?

I tried profile reset and repair installation, no luck.

It is Windows 10 I worry about. The October update was delayed, because it was deleting files on PCs.


texts: Failing to use ArcGIS map as basemap in GeoNode

texts:
I'm trying to add the ArcGIS map service to my project in GeoNode but I'm failing to do so. I've read around and I saw information that says I need to make a XYZ tile service (something like this: http://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}. So, in the geonode (django) settings there is this by default:

MAP_BASELAYERS = [{
    "source": {"ptype": "gxp_olsource"},
    "type": "OpenLayers.Layer",
    "args": ["No background"],
    "visibility": False,
    "fixed": True,
    "group":"background"
}, {
    "source": {"ptype": "gxp_osmsource"},
    "type": "OpenLayers.Layer.OSM",
    "name": "mapnik",
    "visibility": True,
    "fixed": True,
    "group": "background"
}, {
    "source": {"ptype": "gxp_mapquestsource"},
    "name": "osm",
    "group": "background",
    "visibility": False
}, {
    "source": {"ptype": "gxp_mapquestsource"},
    "name": "naip",
    "group": "background",
    "visibility": False
}, {
    "source": {"ptype": "gxp_bingsource"},
    "name": "AerialWithLabels",
    "fixed": True,
    "visibility": False,
    "group": "background"
}, {
    "source": {"ptype": "gxp_mapboxsource"},
}

This piece of code represent each map that I can use as background. And I'm trying to add the ArcGIS like this>

, {
    "source": {"ptype": "gxp_arcgisworldtopo",
    "name": "ArcGIS.Layer.XYZ",
    "url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}"},
    "fixed": True,
    "visibility": False,
    "group": "background"
}

This fails and shows no error (nothing in console or browser), just doesn't show any of the options at all the map viewer is blank.

Anybody have any idea how to do this?

Just for guiding purposes, here is the link to the ArcGIS World Imagery info: http://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9 and this is the link to the ArGIS REST API: http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer


texts: Showing only selected features of vector layer in PyQGIS

texts: I am developing a Plugin in QGIS and I want to show only selected parts of a layer. How can I handle this with PyQGIS?


texts: Is ArcGIS 10.1 Desktop compatible with 10.0 Server?

texts:
Since upgrading my "ArcGIS for Desktop" (Windows 7) client to 10.1, I'm having the hardest time trying to figure out how to publish a Map Service on my (CentOS) 10.0 Server. Back on 10.0 Desktop, I would just load up my .mxd, use the Map Service Publishing toolbar to make a .msd, and then FTP the .msd with the data (it's contained in a file geodatabase) to the server and start a new map service in Server Manager. Easy!

Now the "Map Service Publishing" tool has changed into a completely different "Publishing" tool. If I skip the .msd and try to publish just the .mxd with the FGDB, the map is blank server says the format of the MXD is invalid.

I can't be the only one in this situation, but I don't see any Desktop<->Server compatibility information on 10.0 and 10.1. I don't know if I'm just doing something wrong or the two products really aren't compatible.


texts: table update w/ cursor geometry conflict

texts:
I'm creating a table using arcpy with a list of results (stored in 2d lists) following an update to some features. This can sometimes include geometry, so I've attempted to substitute those for a basic string to avoid any conflicts - all fields are TEXT. Still, I get this error -
File "I:\IPP Geomatics Standards\Toolbox\Staging\Scripts\update_attributes.py", line 93, in resultsTable
    cursor.insertRow([z if z is not u[index] else 'Geom' for z in u], "update")
RuntimeError: table has no geometry

The 'index' variable is the known index in the list containing a geometry. This is the offending part of the function -

cursor = arcpy.da.InsertCursor(tablews + "\\results", nfields)
    for u in updatel:
        cursor.insertRow([z if z is not u[index] else 'Geom' for z in u], "update")

This should be omitting geometry altogether, but still gets flagged.

I suspect my insert statement is incorrect. As per ESRI documentation, one can insert multiple entries (i.e. one for each field) like so -

cursor.insertRow((x, y, z))

In this case, "u" is a list, and I'm trying to split it into separate entries, to the same end. The cursor must be interpreting the array as one entry, in the first field.


texts: Symbol categories restrict attribute entry choices in ArcGIS Collector

texts: I have a vector layer on ArcGIS Collector with a Field for recording the feature number or stating that the feature was 'Unsurveyable'. I want to symbolise these in Collector so I have one symbol of 'Unsurveyable' and one symbol for all other features. In ArcGIS I would simply use categories and have 'Unsurveyable' and 'All other values' as in the typical ArcGIS symbology tabs shown below. But if I symbolise it as shown in that screenshot, Collector only recognises 'Unsurveyable' features. The next screenshot shows what happens when I digitise a new feature and try to give it a number. Collector refuses to allow me to add anything but 'Unsurveyable' in the 'FieldID' attribute. On ArcGIS desktop the FieldID column can be a alpha-numeric code (typically F0199, F0200, F0201 etc) or 'Unsurveyable'.   I would like to keep this symbology but still be able to add alpha-numeric FieldID numbers in Collector.