texts: Downloading ArcGIS Online Feature Service to local Geodatabase using ArcPy?

texts:
I want to grab some feature services from ArcGIS Hub and put them on a GDB on my local PC. Here's the code that I've got so far:

import arcpy

# Set project directory
proj_dir = 'C:\\Users\\rhard2\\Documents\\am_ml_mainlines_v_01'

# Grab online data (feature services):
from arcgis.gis import GIS
gis = GIS()

# Connect to AGOL
LA_geological_faults = gis.content.get(('4bb7809eac534689b36b2d347ac96220'))
LA_streets_cl = gis.content.get(('d3cd48afaacd4913b923fd98c6591276'))
LA_streets_width = gis.content.get(('13c2f36f37894faa8ecc918b29f9b156'))

# Return items (feature services) above:
display(LA_geological_faults, LA_streets_cl, LA_streets_width)

# Set out location for the containers
container_1_gdb = os.path.join(proj_dir,'container_1.gdb')

# Place them to container_1.gdb
arcpy.FeatureClassToFeatureClass_conversion(in_features=LA_geological_faults, out_path=container_1_gdb, out_name='LA_geological_faults', config_keyword="")
arcpy.FeatureClassToFeatureClass_conversion(in_features=LA_streets_cl, out_path=container_1_gdb, out_name='LA_streets_cl', config_keyword="")
arcpy.FeatureClassToFeatureClass_conversion(in_features=LA_streets_width, out_path=container_1_gdb, out_name='LA_streets_width', config_keyword="")

But this gave me an error:

  RuntimeError: Object: Error in executing tool

Questions:
I read somewhere (I couldn't find the link) that FeatureClasstToFeatureClass is supposed to support feature service. What have I done wrong? How do I download a feature service layer and put them into a GDB in my computer?

I use ArcGIS Pro 2.4


texts: Spatial Data Version Control or Versioning Software

texts:
I have a lot of shapefile or fgdb feature classes that I am working with now and it gets updated almost every month.

As of right now, I am just making the file name with extra name after '-'
(i.e., road_network_Jan2018_v1, road_network_Jan2018_v2, ... road_network_Feb2018_v1, and so forth)

I was wondering will there be an awesome spatial data versioning software that can improve efficiency of my works.

I am usually edit stuff uing ArcMap and QGIS and import them to PostGIS


texts: String parameter not passing correctly to GP service

texts:
I have a model where the user selects a string from a drop down list which is used to select a building point and run a series of trace operations. This works fine on desktop, but keeps returning the same data when ran from the server. It turns out that when the process is published after being run from 'any building', it only uses that building name when run from the server, no matter what is selected by the user. It seems that the request is sending the correct string, but the GP service is not accepting it or changing the input parameter string.

I do not understand why the input parameter does not change based on the selected input. I am using a field seletion tool I found online that seems to work perfectly when run on the desktop.

Does anyone have any idea as o why the input is not being changed??

EDIT: He is the validation code

import arcpy
class ToolValidator(object):
  """Class for validating a tool's parameter values and controlling
  the behavior of the tool's dialog."""

  def __init__(self):
    """Setup arcpy and the list of tool parameters."""
    self.params = arcpy.GetParameterInfo()
    self.fcfield = (None, None)

  def initializeParameters(self):
    """Refine the properties of a tool's parameters.  This method is
    called when the tool is opened."""
    return

  def updateParameters(self):
    """Modify the values and properties of parameters before internal
    validation is performed.  This method is called whenever a parmater
    has been changed."""
    if self.params[0].value and self.params[1].value:
      fc, col = str(self.params[0].value), str(self.params[1].value)
      if self.fcfield != (fc, col):
        self.fcfield = (fc, col)
        self.params[2].filter.list = [str(val) for val in
                                        sorted(
                                          set(
                                            row.getValue(col)
                                            for row in arcpy.SearchCursor(fc, None, None,
                                                                          col)
                                              )
                                           )
                                      ]
        if self.params[2].value not in self.params[2].filter.list:
          self.params[2].value = self.params[2].filter.list[0]

  def updateMessages(self):
    """Modify the messages created by internal validation for each tool
    parameter.  This method is called after internal validation."""
    return


texts: Manually updating the attribute table of a clipped shapefile

texts:
I need to do calculations of surfaces of polygons in vector layers. The clip tool does just what I want - I can clip the polygons of the input layer to the clipping layer. When I project the new layer I can see that the polygons are indeed clipped along the polygon border of the clipping layer. So that worked.
However, when I check the attribute table, the surface of the clipped new polygon is still equal to the original polygon surface. In the manual it says: "The attributes of the features are not modified, although properties such as area or length of the features will be modified by the clipping operation. If such properties are stored as attributes, those attributes will have to be manually updated."
Now, HOW do I manually update these attributes? All instructions I have found so far stop after the clipping and none goes into the updating of the attribute table...


texts: How to find ring of coverage of GPS Satellite on WGS-84 ellipsoid?

texts:
Given the following:

Time, t
The set of IS-200 Ephemeris data, E, of a GPS Satellite corresponding to time t
The ECEF position of the GPS satellite, P=(x,y,z), derived from the time and ephemeris, (t,E).
Assume the earth is just the WGS-84 ellipsoid.
All points on WGS-84 have the mask angle, m.

Find the following:

the ring of coverage, R, on WGS-84 of the GPS satellite. i.e., the boundary which distinguishes which WGS-84 points are in view the satellite at point P=(x,y,z) and which WGS-84 points are not in view

Acceptable solutions:

A spline over WGS-84 that approximates R.
A polygon over WGS-84 that approximates R.
Or a formula(s) that gives me R.

What I have tried so far:

Let e^2 = 0.0066943799901264; eccentricity squared

We have a ECEF WGS-84 position by geodetic latitude phi and longitude lambda:

r = 1/(sqrt(1-e^2 sin^2(phi))) * (cos(phi)*cos(lambda), cos(phi)*sin(lambda), (1-e^2) * sin(phi))

I then convert ECEF to east-north up (ENU) geographic frame with phi and lambda using the matrix:

     (-sin(lambda)                  cos(lambda)                  0       )
C=   (-cos(lambda)*sin(phi)        -sin(lambda)*sin(phi)         cos(phi))
     ( cos(lambda)*cos(phi)         sin(lambda)*cos(phi)         sin(phi))

Let G = C ( P - r )
Take the z component of G.  should the z component of G be greater than sin(m) then I know the point, r, is in view.  But that isn't sufficient get the solution that I am after.  I could just find a bunch of points that are in view and take the convex hull of those points, but that is not efficient at all.


texts: How to upgrade an PostgreSQL 8.3(32-bit)/ArcSDE 10.0 database to PostgreSQL 9.2(64-bit)/ArcGIS 10.2?

texts:
I need to upgrade a large production PG8.3(32-bit)/Arc10.0 database with a fair amount of programming (that has circular references) as-is.  This is a system that I inherited, so I don't have the usual knowledge/metadata about the system that I would normally have.

But the pg dump/restore are being impacted by the circular references (I understand that later pg_dump versions address this).  Apart from manually manipulating the plain text dump files, is there a better way to do this?  pg_upgrade perhaps (I'll be able to answer this one later today)?

And are there any gotchas on upgrading the sde repository? Helpful and/or clever tips?

Ideally, I need this to be mostly, if not totally automated (for the actual cutover).


texts: Defining coordinate system for finding distance in meters

texts:
What should I do to find the distance between two very far points?

p1 = "POINT(6.2 61.1)"
p2 = "POINT(6.1 61.0)"

select
ST_Distance(
  ST_Transform(ST_GeomFromWKT('$p1'), 'EPSG:4326', '$epsg'),
  ST_Transform(ST_GeomFromWKT('$p2'), 'EPSG:4326', '$epsg')
) as distance

with EPSG:3857 this is 25550.25
but with EPSG:32632 I'm got 12382.11 and leaning on Google that's right.

I'm using GeoSpark library in my calculations.

Update: My range of longitude approximately from 20 to 190

Update 2: I can't use PostGIS, I'm using Hadoop and GeoSpark


texts: Connect MATLAB to cartoDB using Database Explorer?

texts:
I set up a database on cartoDB.

I'm trying to use MATLAB to connect to the database using Database Explorer. I've downloaded the PostgreSQL driver.

MATLAB asks for connection Parameters:

Server Name
Port Number
Username
Password
Database

What specific information should be in these fields to connect MATLAB to my database. I'm pretty sure the username and password I have covered, but not the other 3.


texts: How to install QGIS on Linux NAS using IPKG

texts:
I have a Linux -Based NAS that I want to install QGIS onto.
Since I am administering through a web interface from a Windows based PC, how can I install QGIS?
Is there a way maybe through IPKG?
Or any other solutions?
I am almost ignorant of native Linux use.


texts: Can I create a circle label with a leader in ArcMap?

texts:
I want to create a circle label with a leader using the standard Maplex labelling engine and symbology.   Only 1 or 2 digit numbers will appear in the label.

I can easily make square or rectangular label with a leader but not a circle.  Is i possible.

Here as an example![enter image description here of what i need:


texts: problems about setting pgrouting with QGIS under windows

texts:
I followed this website：A Beginner’s Guide to pgRouting and now facing some problems.

I finished steps before "Creating a routable road network", and open QGIS 1.8, click the PostGIS Manager plugin, here's the figure：, the first question is that how to enable PostGIS support？

And if I click the Data button trying to load data from shapefile, here's the figure：

And when I try either way：back to QGIS menu->click the Database->shp to postgis->key in my password->click connect, then it shows：

How to solve these problem and correctly use pgrouting？

ps.I work under windows7 64-bit, and have QGIS1.8, postgres8.4, pgadmin3, postgis2.0 installed.


texts: Combine two rasters with different coverage in Arcgis

texts: In ArcGIS 10.2 I have 2 rasters A and B. A cover a certain study area while B represent a "cities mask" obtained by rasterising a shapefile. All the cells of B have a 0 value. The resolution of A and B is the same. I simply want A's cells to have a value of 0 when they match with B's cells. I have tried using the conditional function in the raster calculator [ Con(B=0,"B","A")] and setting A as "snap raster" in the environmental settings, but the output raster is always equal to B. I also tried to multiply AxB setting A as "snap raster" but again the result is B. What am I doing wrong?


texts: ArcGIS - Run a toolbox model in a Python script for scheduling

texts:
So I feel like this should be really simple to do but I can't manage to get it working and reading around this forum and some Esri documentation, there seems to be different ways to do and I am starting to confuse myself with it all! I will say I am familar with Esri and Models, but not Python.

Basically I have a model which takes in some table data from SQL and does some analysis and exports into a shapefile. All the relevant data is fully referenced in the model, the data isn't being pulled from the TOC or anything.
All I want to do is run this model on a schedule, via Windows Task Scheduler probably.

I firstly followed this documentation https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/scheduling-a-model-run.htm which has me creating a python script file and using the import toolbox function.

import arcpy
arcpy.ImportToolbox(r"C:\path\myToolbox.tbx", "tbxAlias")
arcpy.myModel_tbxAlias(r"c:\pathToInput\inputFolder", r"C:\pathToGdb\output.gdb")

I tried replacing the "C:\path\myToolbox.tbx" with my toolbox location, and enter the alias as found in toolbox properites in the "tbxalias" bit.

I wasn't sure about the bit underneath, is this where you say where the model is? I tried replacing 'mymodel_tbxalias' bit with my model name and then the same tbx alias as the section before. But this didn't work. Not sure if I then need the next bit for input and output location, as the model itself references where the input and output data is already? Also I have multiple inputs of data being brought in... I just got a bit lost in it. Here is the code I attempted:

import arcpy
arcpy.ImportToolbox(r"\\middata\Data\ESRI GIS\ArcGIS Pro Users\Daniel Hardwick\DH Template Map\DH Template Map.tbx", "DH Template Map")
arcpy.COVID_Mutual_Aid_Model_DH Template Map()

So 'DH Template Map' is the name of the toolbox, and when in properties the alias is 'DH Template Map' also.

The second bit I have used the name of the model which is 'COVID_Mutual_Aid_Model', then once again used the toolbox alias afterwards (DH Template Map), which I think is what the guidance instructed. But this didn't work.

So I then decided to look around this forum and seen people creating scripts which mention code such as 'arcpy.env.overwriteOutput = True' which I can't see mentioned in Esri documentation.

What should my script look like to simply run a model in a toolbox? Creating the task in scheduler I am fine with but just need this script to run!


texts:
I'm trying to install QGIS through conda $conda install -c conda-forge qgis but got the following error

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - anaconda==5.2.0=py36_3 -> mkl-service==1.1.2=py36h17a0993_4
  - anaconda==5.2.0=py36_3 -> numexpr==2.6.5=py36h7bf3b9c_0
  - anaconda==5.2.0=py36_3 -> scikit-learn==0.19.1=py36h7aa7ec6_0
  - qgis
Use "conda info <package>" to see the dependencies for each package.

I've tried update one of those by $conda install -c conda-forge numexpr however I am still getting the same error afterwards. Any hints?


texts: What ratio scales do Google Maps zoom levels correspond to?

texts:
Can anyone provide me with a link (or some details) on the actual ratio to "zoom level" figures for Google Maps?

e.g. Google Maps Level 13 = 1:20000


texts: How do you create buffers around points based on individual point values in CARTO?

texts:
I am very new to CARTO and have very limited coding skills. I have a data set of points representing the centroid of zip codes. Each point has an associated average commute time.

It is relatively straightforward in CARTO to create a 15 minute drive-time buffer for all data points. But is there a way to make individual drive time buffers based on each point's average commute time?


texts: Using Overpass API in QGIS with osm file

texts:
I am trying to implement Overpass API for one of my projects and not able to apply the API.

As there is some issue that queries are going to be implemented along the API and I am writing a python script.

I tried using the web version directly but there is no possibility that I can have any analysis there.


texts: How to create gist index on boolean type?

texts:
I'd like to create index for PostGIS db in Postgresql.

This is my table (simplified):

CREATE EXTENSION postgis;
CREATE EXTENSION btree_gist;
CREATE TABLE table1 (id int, data boolean);
SELECT AddGeometryColumn('table1', 'geom', 900913, 'linestring', 2);

When I create the index:

CREATE INDEX index1 ON table1 USING gist(data, geom);

it failed with error message:

ERROR:  data type boolean has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a default operator class for the data type.

The problem is btree_gist doesn't support boolean type. It did work with other types like int.

But I cannot change the type from boolean to int because above is simplified. In my original issue, what I want is index on expression and I cannot modify the (program generated) expression.


texts: What is the best way to prepare digital orthophotos for the web?

texts:
My system: Linux Ubuntu 10.04 server (100gb: 4gb RAM: 32bit) /tomcat6/geoserver/geowebcache/FWTools

My Objective: Create Aerial Photo coverage in ETRS89 N32

My Data: 1300 3 band Orthophotos in Tif Formal with a resolution of 12,5m @ 75MB

Question:
How should I do this and at the same time save space on the server?

I am thinking of reducing 3 bands to 1 , reduce resolution by half then image-mosaic in geoserver and serve with geowebcache.

Has anyone every done this? I would be pleased to hear from anyone who has done this successfully.

yours,

Rob


texts: Is it possible to export my FME workbench canvas as a JPEG?

texts:
I want to print my FME workbench to a JPG so that the entire canvas is in one image.  I have tried printing it to a PDF but it is trying to put it on multiple pages.  I have even tried setting the page size to A1, but the Workbench is so large, that it is still printing on multiple pages.

I'm looking for something similar to the ArcGIS ModelBuilder export as image functionality.

Am I missing something?  Or is this not a feature of FME?


texts: GeoServer + OpenLayers: How can I sum points in a selected polygon in my WMS layer

texts:
I have two layers: one representing admin boundaries (multipolygon), and the other representing population (multipoint). I've made it possible to select a polygon to display. For the displayed polygon, I'd like to display total population, which means summing all the points that belong inside the selected polygon.

Any pointers on how to proceed?


texts: PostGIS : group rows based on geometric functions

texts:
I have asked a question on dba.stackexchange about how to list rows in a table based on whatever criterion I have regarding their fields.
The answer we found was to use the PostgreSQL function array_agg combined with the GROUP BY clause.

This works when the criterion for grouping rows is a numeric or text value that can be handled by GROUP BY (so, it also may be the result of whatever numeric or string operation you want).

First level problem:

My problem is that I would like to be able to do the same based on geometric fields and PostGIS functions such as ST_Intersect or ST_DWithin (e.g.: grouping together rows that refer to geometries that touch each other or are within a certain distance).

Using a code like

GROUP BY ST_Intersect(table1.geometry, table2.geometry)

Will most certainly not work as it will return two groups: all the geometries that do not intersect with any other one and all the geometries that intersect with any other one.

Second-level problem:

Since I actually want to detect the group of geometries that intersect with other ones, there is another issue. If geometry A intersects with geometry B and geometry B intersects with geometry C, I want to be able to detect the group [A, B, C] even though A and C do not intersect!


texts: Converting a raster to shapefile for only one value?

texts: I have a global land cover raster that I would like to convert into a shapefile. Rather than converting the entire raster I would like to "extract" just the forest value (40 in this case) and then convert that to a polygon. I haven't worked with Rasters much before so haven't been able to work out a solution. I'm using QGIS.


texts: Supervised Neural Network for site selection in GIS

texts:
I have a set (A) of geospatial raster data layers and a set (B) of point data.
(B) includes numerical values that indicate the "suitability" of the specific site with a rising value. I know that (B) depends at least partly on geospatial information covered in (A).

Now my idea is to train an algorithm with my point data of (B) to find the patterns in (A) that contribute to the known suitability and then calculate for me in the areas which are not covered by point data a probability/possibility of suitability.

I thought either of a supervised neural network toolbox or fuzzy logic script to be applied in a GIS environment to do the operation.

Has anybody got an idea with which GIS-tool (either QGIS or ArcGIS) one could execute the analysis successfully and derive meaningful results?


texts: Difference between empty and NULL geometry in file geodatabase?

texts:
Within my application that connects to a ArcGIS-FileGDB I encounter problems on empty-geometries within my featureclass.

There are three features within my FeatureClass (polygon):

one ordinary polygon,
one without any geometry information (geometry = NULL) and
one with an empty geometry (at least when I access it via Feature.Shape.IsEmpty).

Confusingly the SHP.Area and SHP-Length columns for this last features are zero whereas the data for the actual NULL-geometry is NULL.

So what exactly is the difference on those two geometries?


texts: Convert polygons to a number of randomly located points based on polygon size

texts:
ArcMap 10.1 on a PC. Working with a large shapefile with ~50,000 poygons with a wide range of size from 1,000+m. to <1m. I would like to convert these polygons into points so I can do some analysis in Maxent.

Rather than have just one point for every polygon, I would like a large polygon to have more points than a small one. For example maybe a 100m polygon has 10 points in it, a 50m polygon has 5, and everything smaller has just 1.
Ideally these points would just be randomly placed within the boundaries of the polygon it came from.

Any ideas?

Thanks,


texts: Populating a Dictionary with an Update Cursor "Typeerror: 'Dict' Object Is Not Callable"

texts:
I'm getting the following error "Type Error: 'dict' object is not callable", with the code below:

import arcpy

def printDict(dictionary, printCount=False):
    for key in dictionary:
        arcpy.AddMessage(key + ": " + dictionary[key])
    if printCount is True:
        arcpy.AddMessage(str(len(dictionary)))

pld3GDB = 'C:\\Users\\bro81520\\Documents\\ArcGIS\\PLDV3_SPC_ODN_315_25Sep\\PLDV3_SPC_ODN_315_25Sep.gdb\\WO_HIERARCHY'
fdaAREA = 'C:\\Users\\bro81520\\Documents\\ArcGIS\\Default.gdb\\FDA_AREA'

d = dict()  # VENDOR_WO_ID : NFID

fields1 = ['VENDOR_WO_ID', 'NFID', 'ISFDA']
with arcpy.da.SearchCursor(pld3GDB, fields1) as cursor:
    for row in cursor:
        if row[2] == "Y":
            d[row[0]] = row[1]

# print dictionary
printDict(d, printCount=True)

fields2 = ['bv_workorderid', 'bv_nfid']
with arcpy.da.UpdateCursor(fdaAREA, fields2) as cursor:
    for row in cursor:
        if row[0] in d:
            row[1] = d[row[0]]
            cursor.updateRow(row)

I've looked at the following resources, but haven't deciphered exactly what is wrong:
https://stackoverflow.com/questions/41605525/typeerror-dict-object-is-not-callable-while-using-dict

https://gis.stackexchange.com/questions/198770/creating-a-dict-with-search-cursor


texts:
Is it possible to export labels based on Shapefile attributes into a DXF file?

I use QGIS 1.7.4.

I've been reading a CSV file and view it as a Shape Layer.
With the help of attributes from the File I will label the points.
Now I want a DXF export with the labels.
However, only the Points in the DXF file Export.

I do not have ArcGIS.

I am using AutoCAD LT 2011 for viewing DXF files. In AutoCAD I have to go through the "Insert / Link & extraction" under only the possibility to find data from Excel.


texts: Keep RGL window open after R QGIS script finishes

texts:
I'm using the 'Processing R Provider' plugin to run some R code that uses the lidR package.
It's working fine except, when the script finishes, the RGL window that displays the 3D plots closes.
I was hoping to be able to review the RGL 3D plots to look for errors in the LIDAR data after the script finishes.
Has anyone found a way to keep the RGL windows open after the QGIS script finishes so they can review 3D plots?
LIDAR data is from here: https://webtransfer.vancouver.ca/opendata/2018LiDAR/4890E_54610N.zip
Code I'm running is below:
##LIDAR Processing=group
##showplots
##LAS_file=file

# Load required libraries
require(rgl)
require(lidR)
require(rlas)
require(rgdal)
require(tictoc)

# Load the las file into the system
data <- LAS_file

# Read the data as LiDaR
las <- readLAS(data)

# Plot LAS data for data check
plot(las)

I've tried preventing the script from finishing by using the sleep function in R and asking for user input before closing but QGIS seems to override this.
I'm using QGIS 3.18 | Manjaro Linux | and R 4.0.4


texts:
I have a layer containing a vector 'Line 1', that originates at point 'A' on a second layer. I also have point 'B' on a third layer. I want to create 'Line 2' that has the same angle and length of 'Line 1', but originates from point 'B'. And I want to repeat this for all vectors on the layer containing 'Line 1'.

i'm working with ArcGIS Engine 10 for .NET. I'm open to solutions working with just ArcGIS 10, so I can create the same geoprocessing tool in ArcGIS Engine.


texts:
I am familiar with ArcMap but I have not used ArcScene before. I need to show the impact of a road and the bridges over it that will be constructed in the future on the visibility aspect of the nearby environment (Basically a 3D rendering project).
What is needed is to see how will the road look like when it will be constructed from specific points. Since it needs to be shown in 3D, I thought I should use ArcScene, but I do not know if I can design a 3D road in ArcScene or it should be drawn in ArcMap before and then bring to ArcScene or if I got it totally wrong and these are not the right software for the job.
Surely there are many professional graphic designing software for 3D modelling but I am not a graphic designer and my boss insists that it is not a difficult job and it should be done with ArcGIS software or maximum Google Earth! I am using ArcMap 10.4 and I have access to 3D analyst tools.


texts:
I'm following an OpenLayers tutorial and in my current lesson we wanted to add an overlay to the webmap and when I click on the map it gives me the coordinates of that map. However, for me it doesn't work and I believ I copied the tutorial code properly.

That's the js code:

window.onload = init;

function init(){
    const map = new ol.Map({
        view: new ol.View({
            center: [0, 0],
            zoom: 2
        }),
        layers: [
            new ol.layer.Tile({
                source: new ol.source.OSM()
            })
        ],
        target: 'js-map'
    });

    var popupContainerElement = document.getElementById('popup-coordinates');
    var popup = new ol.Overlay({
        element: popupContainerElement,
        positioning: 'top-right'
    })

    map.addOverlay(popup);

    map.on('click', function(e){
        var clickedCoordinate = e.coordinate;
        popup.setPosition(undefined);
        popup.setPosition(clickedCoordinate);
        popupContainerElement.innerHTML = clickedCoordinate;
    })

The map works. I can see the map, but the click event with the overlay doesn't work. I can't see the problem...

Here is also the html code:

    <meta charset="UTF-8">
    <meta name = "viewport" content = "width=device-width, initial-scale=1.0">
    <title>Title</title>
    <link rel="stylesheet" href="./lib/OpenLayers/ol.css">
    <link rel="stylesheet" href="./style.css">

I am using OpenLayers 6.1.1

Sorry, I'm pretty sure the issue is stupid but I don't see it.


texts:
Anyone knows if there is a "lightway" solution to mount a local tile server?

Feature I'd to provide is local storage of small sections of maps, not more than small city for example, in order to provide some degree of offline maps navigation by pointing javascript functions to the local server when network is not accessible.


texts: ST_3DIntersection PostGIS incorrect result

texts:
I have tried multiple times to obtain the 3D Intersection between a 3D linestring and a solid cube in both PostGIS 2.5.2 and 2.5.3 with the SFCGAL backend.

Below is a query that works as expected and returns the correct result in 3DIntersection:

SELECT ST_AsText(ST_3DIntersection(ST_GeomFromText('LINESTRING Z (0.5 0.5 0.0, 0.5 0.5 1.0)'), "cube")) as "3DIntersection",
ST_AsText("cube") as "cube_WKT",
ST_IsClosed("cube") as "cube_isclosed",
ST_IsSolid("cube") as "cube is solid"
FROM (
    SELECT
    ST_Extrude(ST_GeomFromText('POLYGON Z ((1 0 0, 1 1 0, 0 1 0, 0 0 0, 1 0 0))'), 0, 0, 1) as "cube"
    ) as subquery;

However, a slight change to the Z coordinates of the linestring now gives a very strange result for "3DIntersection" (point instead of linestring!):

SELECT ST_AsText(ST_3DIntersection(ST_GeomFromText('LINESTRING Z (0.5 0.5 0.0, 0.5 0.5 2.0)'), "cube")) as "3DIntersection",
ST_AsText("cube") as "cube_WKT",
ST_IsClosed("cube") as "cube_isclosed",
ST_IsSolid("cube") as "cube is solid"
FROM (
    SELECT
    ST_Extrude(ST_GeomFromText('POLYGON Z ((1 0 0, 1 1 0, 0 1 0, 0 0 0, 1 0 0))'), 0, 0, 1) as "cube"
    ) as subquery;

Ideally, the intersecting portion of the linestring should not change.
However, when one of the points of the linestring is above the cube, only the botton intersecting point is returned.

Could somebody please explain what's going on? And perhaps how to obtain the intersecting portion of the linestring?

Here is my PostGIS version:

"POSTGIS="2.5.3 r17699" [EXTENSION] PGSQL="110" GEOS="3.7.2-CAPI-1.11.0 3.7.2" SFCGAL="1.3.2" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.4, released 2018/03/19" LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" RASTER"


texts: How to set up geoprocessing tool and geoprocessing service to produce downloadable output in Web AppBuilder

texts:
I want to create a simple application in ArcGIS Web AppBuilder which uses geoprocessing service to generate output file.

I have a simple Python script which generate a TIFF image from a complex map document. I created a script tool which successfuly generates an image.

My question is how to set up script tool parameters and geoprocessing service parameters to be able to configure geoprocessing widget in Web AppBuilder.   My intention is to have a download link as an output.


texts: Import data from text file in Google Earth Engine

texts:
I have 100 comma separated longitude and latitude values in a text file. I want to mark all these 100 points on GEE maps and see where they lie. This is the script I am using for marking the point:

var point1 = ee.Geometry.Point([x, y]);
Map.addLayer(point1, {color: 'cyan'}, 'geodesic polygon');

where x and y are longitude and latitude values respectively. I followed this link with a similar query but here the answer suggests to get the json text using print(geometry) but my problem is that I have generated these 100 points through a Matlab code (instead of generating them directly on GEE) according to some analysis so I don't possibly have a JSON data for them. Thus I need wanted to know how can I import these points from a local text file and work with them on GEE?


texts: How to open a QGIS Project with Optionspath and Configpath settings?

texts:
Is there a way of forcing QGIS to use the network settings for the Optionspath and Configpath switches (which i have added to the target for the QGIS desktop icon on my pc) when opening a Project that is also on the desktop?

At the moment, if I open the QGIS desktop icon, everything opens as i have configured it, looking at the network location (with all the plugins we are using there as well as the customisation); Opening the project icon results in QGIS not adhering to these settings.

I have tweaked the QGIS bat file in the Program Files location as this;

@echo off

call "%~dp0\o4w_env.bat"

@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH%

set QGIS_CONFIGPATH="\\gis\GIS\Qgis\Customisations\Hsg"

set QGIS_OPTIONSPATH="\\gis\GIS\Qgis\Customisations\Hsg"

set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis

set GDAL_FILENAME_IS_UTF8=YES

rem Set VSI cache to be used as buffer, see #6448

set VSI_CACHE=TRUE

set VSI_CACHE_SIZE=1000000

set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt4\plugins

start "QGIS" /B "%OSGEO4W_ROOT%"\bin\qgis-bin.exe %*

but it still doesn't appear to work properly

Has anyone got any ideas?


texts:
I am trying to learn geoserver's rest-api following http://docs.geoserver.org/2.0.x/en/user/extensions/rest/index.html.

I have placed rest-2.0.3 jar file in geoserver/webmaps/geoserver/WEB-INF/lib folder and restarted the server. I don't know whether this completes the installation of rest.

All the examples in curl rest shows the path as *http://localhost/geoserver/rest/workspaces..... but I am not able to find any rest folder and the link *http://localhost:8080/geoserver/rest giving me the page with "Geoserver Configuration API" .

I have followed Using REST service with GeoServer but even this doesn't solve my problem.

Can you please tell me how to find whether rest is installed or not.... *http://localhost:8080/geoserver/rest/layers/giant_polygon.html also giving me "Geoserver Configuration API".


texts: Understanding Openlayers API documentation?

texts:
I'm newbie to OL (3&4). I found that very difficult to understand its API docs, I believe the source to master the OL lies there. Until now I rely on the examples, that sometimes it serve different method to solve an identical problem.

Can anyone give me advice how to learn this steep docs ( I understand a bit about PHP and JS -but not on its OOP part-), such as a stepping stone to get this interlinked OL API docs become clear?


texts: how to close the option of flowing display in one map in SuperMap

texts: how to close all the options in one map that means to close text flow display.Closing the option of one layer by the other one is so tired if there are hundreds of layers.


texts: ogr2ogr problem mapping shapefile to geojson ETRS89 / Poland CS92

texts:
I'm trying to convert official boundaries of administrative regions of Poland from official governmental site (codgik.gov.pl). I want to use those data because they are official ones, and set contains additional levels of borders of that I cannot find in other data sets (such as Natural Earth).

I use approach similar to How to create a GeoJSON that works with D3?.
However when I'm trying to use conversion ogr2ogr and plot the results using d3.js I fail. Data seems to be incorrectly translated giving essentially gibberish.

The same approach worked just fine w Natural Earth shapefiles.

By playing around with SVG (deleting paths) I can see that path overlaps and hugely and result in just black square.

Java GeoTools [quickstart tutorial] shows this shapefile without any problem, so I'm guessing mine conversions are off.

Shapefile set is available here (5.5MB)

JavaScript code:

d3.json("wojeowdztwa.json", function(error, map) {
  if (error) return console.error(error);

var projection = d3.geo.mercator()
//    .center([171677, 133223])
//    .scale(69)
    .translate([width / 2, height / 2]);

  var path = d3.geo.path()
    .projection(projection);

svg.append("g").attr("id", "polska")
    .selectAll("path")
      .data(map.features)
      .enter()
        .append("path")
        .attr("id", function(d) { return d.id; })
          .attr("d", path)
          .attr("class", "wojewodztwo");

Content of .PRJ file:

PROJCS["ETRS89 / Poland CS92",
  GEOGCS["ETRS89",
    DATUM["European Terrestrial Reference System 1989",
      SPHEROID["GRS 1980", 6378137.0, 298.257222101],
      TOWGS84[0,0,0]
    ],
    PRIMEM["Greenwich", 0.0],
    UNIT["Decimal Degree", 0.017453292519943295]
  ],
  PROJECTION["Transverse_Mercator"],
  PARAMETER["latitude_of_origin", 0.0],
  PARAMETER["central_meridian", 18.999999999999982],
  PARAMETER["scale_factor", 0.9993],
  PARAMETER["false_easting", 500000.0],
  PARAMETER["false_northing", -5300000.0],
  UNIT["Meter", 1.0],
  AUTHORITY["EPSG", 2180]
]

I'm very new to cartography.


texts: I'm new user of QGIS and I would like to import a surface plot - made with python - in qgis2threejs but I don't know how can be done, can someone help me?


texts:
I want to create a highlight control which will highlight a line, it should highlight the line when the cursor is near this line (e.g. ~10px) and when cursor is pointing to line. I have following code, but it only works if I put cursor directly on drawn line.

highlightCtrl = new OpenLayers.Control.SelectFeature([routesLayer], {
            hover: true,
            highlightOnly: true,
            eventListeners: {
                featurehighlighted: HighLightRoute,
                featureunhighlighted: unHighLightRoute
            }
        });


texts: NHD layers won't redraw in ArcGIS 10.1 at small scale?

texts: If I am already zoomed in to a smaller scale and then add the NHD Hydrography dataset (already clipped to just Texas), I can see all the NHDFlowlines, NHDAreas, and other layers that come in the dataset.  If I try to do anything then (identify a feature, zoom in or out, pan, etc.), these layers do not redraw (though my shapefile layers do without any problem).  The only way I can get the NHD layers to draw again to zoom out to the full extent of Texas at which time they will start redrawing.  If I attempt to zoom in (with the mouse, the magnifying glass icon, or the zoom in arrows icon), the layers will not draw.  The machine that is having this problem runs ArcGIS 10.1.  On a different machine that has ArcGIS 10.2.2, I do not have this problem (starting from the same .mxd file).


texts:
I am looking for any source code that does tree crown segmentation/delaunitaitoun with LiDAR point clouds or their respective greo-TIFFs. So far I can load and view both LiDAR file and its TIFF in matlab but I need the code to convert it to extract tree crowns.

Any open source library in any programming language is ok.


texts: Setting proper transparency for MultiLine?

texts:
How can you avoid faulty transparency with overlapping line segments points in styling?

I have one layer consisting of multilines. I use QGIS 3.0+.


texts: how to specify -t critical dowloading raster with raster2pgsql

texts:
I'm trying to download a raster into postgres/postgis.

So far I wrote:

raster2pgsql -s 3006 -I -C -M -R filename.tif -F -t 463.313x463.313 schema.rastername | psql -h localhost -U postgres -d db

The raster is dowload that way successfully but my problem comes with the fact that the output raster file (once download read in postgres) is smaller than the original one.

My raster has 2960rowsx2558columns, each pixel has 463.313x463.313 for dimension, and I have a scale factor of 1.

I don't understand how to specify the dimensions. I have read these posts "Difference in raster size using raster2pgsq" and "Loading a raster into a PostGIS 2.0 database on Windows" but I did not get how the conversion is done.


texts: Implementing GeoServer WFS Row Level Security

texts:
I am trying to implement row level security with GeoServer. I know out of the box it supports service, layer and REST security and not row level. However, I am sure there must be a workaround.
Has anyone successfully implemented it?


texts: Fetching subdivision categories from GeoNames using location coordinates?

texts:
I'm looking for an API where I can get second level subdivision(ISO 3166-2) if I pass longitude and latitude.

Second level subdivision code reference:

http://en.wikipedia.org/wiki/ISO_3166-2:GB

Eg.

Lat/Lon: 51.5033630,-0.1276250

The value I want is GB-LND as a return.

I've tried following but I want more specific codes:

api.geonames.org/countryCode?lat=51.5033630&lng=-0.1276250&username=demo
api.geonames.org/countrySubdivision?lat=51.5033630&lng=-0.1276250&username=demo


texts: I have a shapefile with two fields, lets call them shape and color. I want to symbolize each point based on both of those fields. Each field is stored as a string. Example: "Square, Blue". I want to symbolize each point with the shape listed in shape, and the color listed in color. So my example would show up as a blue square. I have tried symbolizing by categories: unique values, many fields, but I have too many possible combinations to do this. I can manually choose a shape for each "shape" field, but I would like it to dynamically change the color based on the "color" field


texts: How to get a Leaflet app with a big GeoJSON file to work on mobile devices?

texts:
I have a leaflet app which displays a GeoJSON file as a layer. It works fine in the web browser. On the mobile browser it starts up, but quits after panning around on the map. I think the reason for that is that the GeoJSON file is too big (806kb). What kind of options do I have to get this to work on mobile?

<!DOCTYPE html>

        <link href='http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' />

        <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />

        <link rel="stylesheet" href="dist/MarkerCluster.css" />
        <link rel="stylesheet" href="dist/MarkerCluster.Default.css" />

        <link rel="stylesheet" href="dist/L.Control.Locate.css" />

        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

        <title>Bike Garage</title>


texts: Source for US urban-suburban-rural classifications by census tract

texts:
I would like to assign every U.S. census tract its own unique classification on the urban-rural spectrum. USDA's Rural-Urban Area Commuting Codes (RUCA) is a good start, but it's focus is rural - it is not very useful when it comes to distinguishing areas that are CBD, urban core, inner suburban, or exurban within a metropolitan area.

I like the idea of the City Sector model, as summarized in the table below - sourced from a recent Wendell Cox article in NewGeography.com. However, this model is urban-focused, and overlooks areas that could be designated as micropolitan, small town, or rural.

It would be ideal to have a model that could thoroughly capture the full urban-rural spectrum without having to combine the RUCA model with the City Sector model. Does such a model exist? And if so, is it available at a defined geographic level (preferably census tract)?

Separately, is there a publicly available source for the City Sector model classifications at the census tract level, or is this something researchers typically build from scratch?


texts: Point symbology drawing incorrectly in ArcGIS Online web map?

texts:
I have created a map service (via ArcGIS Server) to serve SDE content up to a web map/application in ArcGIS Online.  The service contains a group of 10 shapefiles (points, lines, and polygons).  All the data is present and the map service works correctly when opened in ArcMap.  However, whenever I add the service to an ArcGIS Online web map, the point symbols draw offset approximately 60 feet to the southwest (see picture).  Blue selection box is true point position; note the symbology to the SW.

Polygons and lines draw as they should.  If I add the individual shapefiles in the group to the map (rather than bringing in the whole service), the points draw fine.  Doing this, though, I lose the ability to group layers.  All data is in the same projection.

Any idea what's going on?


texts: Multiple labels from same variable using QGIS

texts:
How can I have a set of labels for a location, where the variables are within a single column?
What I am hoping for is to have placement of 'concentration' followed by depth at each location shown on label.
Example of my data:
Loc_ID (1, 1, 1, 2, 2, 2...)   Depth_m (0.2, 0.5, 1.0, 0.2, 0.5, 1.0)   Conc. (1, 0.2, <LOR, 1 ,no data, 0.2) etc...
I have tried CASE and coalesce. However, in an instance where there is no data, the label shows an empty line, which is not required.
I am using QGIS.


texts: I have tried gdal builidng from source and rpm and still get the following error trying to create the postgis extension

texts:
create extension postgis;
ERROR:  could not load library "/usr/pgsql-9.5/lib/rtpostgis-2.2.so": /lib64/libgdal.so.1: undefined symbol: atom_obj_cache


texts: GeoServer call WPS process and get ID back

texts:
I want to call a WPS process from inside my app. I want to get the ID back to be able send a dismiss command and abort the calculation. I achieve this by adding

<wps:ResponseDocument storeExecuteResponse="false" status="true">
</wps:ResponseDocument>

into the xml I am posting. The problem here is that I only get the ID together with the result back. Wich is of course at the end of the WPS execution. In order to terminate it I need the ID prior to the start of the execution and than wait fot the result to be transmitted in a second call?

How can I get the ID and later on the result in the same connection?

Edit: even though I don't think it will help here is the code I use to call the WPS. It is written in AutoIt v3 (kind of basic).

Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", $geoserverURL, False)
$oHTTP.setRequestHeader("Content-Type", "text/xml;charset=UTF-8")
$oHTTP.setRequestHeader("Content-Length",StringLen($xml))
$oHTTP.send($xml)
$oReceived = $oHTTP.ResponseText

The xml I post is this one:

<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
  <ows:Identifier>gs:BufferFeatureCollectionM</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>features</ows:Identifier>
      <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST">
        <wps:Body>
          <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:testRaster="testRaster">
            <wfs:Query typeName="testRaster:myTest"/>
          </wfs:GetFeature>
        </wps:Body>
      </wps:Reference>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>distance</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>200</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
<wps:ResponseDocument storeExecuteResponse="false" status="true">
    <wps:RawDataOutput mimeType="application/json">
      <ows:Identifier>result</ows:Identifier>
    </wps:RawDataOutput>
</wps:ResponseDocument>
  </wps:ResponseForm>
</wps:Execute>

I get the result together with the ID when the process has finished. If I would get some kind of response earlier I would Split this string out of the surroundings.


texts: How to create dynamic sub-menu in ArcMap?

texts:
I created a static menu contains 3 static items like in this link create menus,
I want to add a sub-menu and get the menu's items from database like in this image:

I already did the left part with static items, but i couldn't add the sub-menu like in the right side. I tried to do what in this link create dynamic menu, but it's not working.

EDIT:
Menu code:

public sealed class TestMenu : BaseMenu, IRootLevelMenu {
 public ReportingMenu() {
            AddItem("Reporting.Desktop.UI.Commands.ReportSuitesCommand");// commands
            AddItem("Reporting.Desktop.UI.Commands.ReportsCommand");
            BeginGroup(); //Separator
            AddItem("Reporting.Desktop.UI.Commands.AboutReportingCommand");
        }

        public override string Caption {
            get {
                //TODO: Replace bar caption
                return "Reporting";
            }
        }
        public override string Name {
            get {
                //TODO: Replace bar ID
                return "ReportingMenu";
            }
        }
    }

multi item code:

public class HowToMultiItem : IMultiItem, IMultiItemEx
    {
        private ESRI.ArcGIS.Controls.IHookHelper _mHookHelper;

        //Step 2.
        public string Caption {
            get {
                return "Layer Zoom";
            }
        }
        public string Name {
            get {
                return "CSNETSamples_HowToMultiItem";
            }
        }
        public int HelpContextID {
            get {
                return 0;
            }
        }
        public string HelpFile {
            get {
                return "";
            }
        }
        public string Message {
            get {
                return "MultiItem single message";
            }
        }

        //Step 3.
        public int OnPopup(object hook) {
            _mHookHelper = new ESRI.ArcGIS.Controls.HookHelperClass {Hook = hook};
            return _mHookHelper.FocusMap.LayerCount;
        }

        //Step 4.
        public string get_ItemCaption(int index) {
            var layer = _mHookHelper.FocusMap.Layer[index];
            return "Zoom to " + layer.Name;
        }
        public bool get_ItemEnabled(int index) {
            //Enable zoom in only when the layer is visible.
            var layer = _mHookHelper.FocusMap.Layer[index];
            return layer.Visible;
        }
        public int get_ItemBitmap(int index) {
            return 0; //Not implemented.
        }
        public bool get_ItemChecked(int index) {
            return false;
        }

        //Step 5.
        public void OnItemClick(int index) {
            //Get the layer and its spatial referenced extent.
            var layer = _mHookHelper.FocusMap.Layer[index];
            var env = layer.AreaOfInterest;
            //Zoom to the extent and refresh the view.
            var activeView = _mHookHelper.FocusMap as
                ESRI.ArcGIS.Carto.IActiveView;
            if (activeView == null) return;
            activeView.Extent = env;
            activeView.Refresh();
        }

        //Step 6–Optional interface implementation.

        public string get_ItemMessage(int index) {
            var layer = _mHookHelper.FocusMap.Layer[index];
            return "Zoom to " + layer.Name + "layer.";
        }
        public int get_ItemHelpContextID(int index) {
            return 0;
        }
        public string get_ItemHelpFile(int index) {
            return "";
        }
    }


texts: I loaded a shapefile and I know it has different classes and subclasses. One can also see in the attribute-table. But on the screen it is only one layer and I cannot make out any option to make the different classes visible and to work with the single classes. I once had this problem already but I sadly can´t remember how I solved it.


texts: Creating a raster based on a where clause

texts:
I am writing a script that deals with a raster that will need a subset of the raster outputted and the rest of the original raster needs to be "no data".

To clarify,  say, there is a raster and with random values 1-10.  I want to input this raster and return a new  raster that is all no data except for where the original raster = 5.  I thought that the spatial analyst tool "con" would handle this but I can't seem to get it to work.  Here is a code sample.

fillRaster = str(Playa_Name) + "_fillRaster"
arcpy.gp.Fill_sa(oneFoot, fillRaster)

extractPoint = str(Playa_Name) + "_extractPoint"
arcpy.gp.ExtractValuesToPoints_sa(waterBodyPoints, fillRaster, extractPoint, "NONE", "VALUE_ONLY")

extractPoint_2 = str(Playa_Name) + "_extractPoint_2"
arcpy.TableSelect_analysis(extractPoint, extractPoint_2, ' "PLAYA_NUM" = ' + "'%s'" %Playa_Name)

field = ["RASTERVALU"]

arcpy.AddMessage("Working...")

with arcpy.da.SearchCursor(extractPoint_2, field) as cursor:
    for row in cursor:
        elevation = row[0]

ofElev = elevation

conRaster = str(Playa_Name) + "_conRaster"
whereClause = ' "VALUE" <> ' + "'%s'" %elevation
outCon = Con(fillRaster, elevation, "", whereClause)
outCon.save(conRaster)

The part that's not working is the very end where I use the Con() function.

Am I using it incorrectly?

I've looked at several examples but can't seem to figure it out.  The only other thing I can think of is maybe the "VALUE" field is incorrect, is this not the default name given to a raster's "attributes".  Using "VALUE" with the con works perfectly in ModelBuilder which is where this script is being adapted from.


texts: ESRI File Geodatabase - Trying to use CURRENT TIME in Definition Query

texts:
Is it me, or are the date functions in the file geodatabase a total nightmare.

Anyway, I am trying to set up a fairly simple definition query that contains a subquery with a date comparison.  My definition query looks like this:

"OBJECTID" IN (SELECT "assetid" from dummydata WHERE "restoretime" < CURRENT_TIME)

According the ESRI SQL Reference, the current time function is defined as CURRENT TIME (no underscore) but that breaks the definition query altogether.  With the underscore, I dont get any errors, but the selection set is always null.  Every row in dummydata has a restoretime value set which is definitely older than the current time.
What am I doing wrong here?

FYI - ArcMap 10 SP4

UPDATE: Some sample rows from the dummydata table

OID     assetid     outagetime               restoretime
1            1      5/10/2012 3:06:59 PM     5/10/2012 3:07:04 PM
2            2      5/10/2012 3:06:59 PM     5/10/2012 3:09:14 PM


texts:
Is there a way to auto pan the map in the direction of mouse location if it hits the extents of the window when drawing line or polygon? It seems inefficient to have to pan by clicking the pan arrow if the polygon goes outside the map window.
Hope this makes sense?


texts: Select area in Maps and get List of all Addresses

texts:
I am looking for a way to select a residential subdivision online maps and get a list of all addresses in that selection.  What do you think?

I think this thread might lead in the direction of what I need How do I get the building housenumber from OSM data?


texts: How to extend raster data for larger boundary?

texts:
I am working on serveral raster data, but some of them are not fill data exactly with intended boundary (as shown in the picture below). What i want to do is firstly extend the raster data to intended boundary (pink line).

Can you help me with this problem?


texts: Any idea what software abc.net.au is using on the scrolling before/after earthquake aerials?

texts:
Japan Earthquake: before and after the copyright says: © Google, Digital Globe, GeoEye
Guessing it's something of Google's since Digital Globe and GeoEye are probably only the aerial image's photographers?

Specifically would like to know what software is used for the scrolling over the photos giving before and after perspective which is incredible.

Some of the code from Firefox's View Selection Source:

Sendai Airport

© Google, Digital Globe, GeoEye

Hover over the image to toggle before/after

Arahama in Sendai


texts: How to add text labels to a Mapbox GL JS map that has no vector layers?

texts:
Using http://bl.ocks.org/danswick/a4de5c170c04fdd38bb4 and https://www.mapbox.com/mapbox-gl-js/example/cluster/ I made a Mapbox GL JS map.

It has no vector tiles basemap but raster tiles.
It has vector data from GeoJSON points that get clustered.

Now the text labels for the clusters are broken:

  evented.js:109 Error: layers.cluster-count.layout.text-field: use of
  "text-field" requires a style "glyphs" property

I assume that this is because I have no vector style and thus no vector style for "glyphs".

https://github.com/mapbox/mapbox-gl-js/issues/4808 says I should add:

"glyphs": "http://fonts.openmaptiles.org/{fontstack}/{range}.pbf"

which I did. My map definition ends up like this:

var map = new mapboxgl.Map({
    container: 'map',
    style: {
        "version": 8,
        "sources": {
            "simple-tiles": {
                "type": "raster",
                "tiles": [
                    "http://a.tile.openstreetmap.org/{z}/{x}/{y}.png",
                    "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png"
                ],
                "tileSize": 256,
            }
        },
        "glyphs": "http://fonts.openmaptiles.org/{fontstack}/{range}.pbf"
        "layers": [{
            "id": "simple-tiles",
            "type": "raster",
            "source": "simple-tiles",
            "minzoom": 0,
            "maxzoom": 22
        }]
    },
    center: [10.447683, 51.163375],
    zoom: 6
});

But all I get are lots of errors

  evented.js:109 Error: Error: Error
      at Actor.receive (actor.js:81)

How can I get text to work?


texts: How can I load a single WFS vector feature where the user clicks the map on OpenLayers?

texts:
I am creating a web app that allows users to easily edit feature attributes as well as geometry. I have editing working by loading a WFS layer, but it slows the app to a crawl when there's more than a couple dozen features on the screen.

Instead of loading all of the features as vectors, I want to display them as a raster layer, then when a feature is clicked, grab the associated vector for that feature, in order to allow for editing. Has anyone done this before, or know of the best way to go about this?


texts:
My sanitary sewer data (shapefiles) is being merged with data from another GIS firm for a large project and they are asking me to flip all my line segments because they believe they are backwards but I believe they are backwards.  Shouldn't the upstream point be the start point and the downstream point be the end point?

How do you create pipes, upstream to downstream or downstream to upstream?


texts: Find Duplicate Feature Classes in ArcSDE Geodatabase?

texts:
I have inherited an ArcSDE instance that has 1000+ feature classes within which are around 100 Feature Datasets.

I have found through manual exploration that there are at least some Feature Classes that have been duplicated across the different Feature Datasets.  Though the names are different everything else is the same.

Is there a way to find and possibly catalogue these duplicate Feature Classes without searching manually?

Metadata is very poor so this neither a solution nor a way to even to narrow down my search.

ArcSDE and Desktop are version 10.0


texts: Create a georeferenced PDF using a shapefile and add informations in R

texts:
I created a georeferenced PDF using a shapefile and OK no problem, but I'd like to know if is possible to insert a title inside a pdf (in top position "My geo PDF"), points of interest (pts.sampling) and values too.

In my example:

Packages

require(rgdal)
require(maptools)

Create 2 polygons

sr <- SpatialPolygons(list(
Polygons(list(Polygon(cbind(c(180114, 180553, 181127, 181477, 181294, 181007, 180409,
  180162, 180114), c(332349, 332057, 332342, 333250, 333558, 333676,
  332618, 332413, 332349)))),'1'),
Polygons(list(Polygon(cbind(c(180042, 180545, 180553, 180314, 179955, 179142, 179437,
  179524, 179979, 180042), c(332373, 332026, 331426, 330889, 330683,
  331133, 331623, 332152, 332357, 332373)))),'2')))

Convert in spatial polygon

srdf=SpatialPolygonsDataFrame(sr, data.frame(row.names=c('1','2'), PIDS=1:2))
srdf@data
proj4string(srdf) <- CRS("+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs")

Create shapefile

writeOGR(srdf, getwd(), 'ARS', 'ESRI Shapefile')

Read shapefile

contorno_line<- readShapeLines ("ARS.shp")

Plot

plot(contorno_line, main="My geo PDF")

Points of interest and values

x<-c(180684.2,  179786.2,   180766.4,   180335.5,   181392.6,   180881.9,   181167.9,   180544.5,   180680.9,   180259.6)
y<-c(332264.8,  331057.3,   332190.5,   331643.7,   333384.4,   333444.8,   333381.6,   332607.9,   332625.9,   331867.7)
Class<-c(5,5,3,1,2,3,5,5,2,2)
pts<-cbind(x,y,Class)
pts.sampling = SpatialPoints(pts, proj4string=CRS("+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs"))
points(pts.sampling, col="red")
text(pts.sampling,labels=paste(pts.sampling$Class), cex= 0.7,pos=3)

Create a geoPDF

writeOGR(contorno_line, dsn = "mygeoPDF", layer = "contorno_geo", driver = "PDF")

But my problem is, how I can put main="My geo PDF", points(pts.sampling, col="red") and text(pts.sampling,labels=paste(pts.sampling$Class), cex= 0.7,pos=3) inside mygeoPDF.pdf created?


texts: Split selected features with selected line from another layer not creating all new features

texts:
Trying to use the split selected features with selected line from another layer to split a polyline in 2.

I run the tool and get the following output:

In the attribute table there are now 2 features, but the one split on the right is the only one that can be seen in the map. If I select the other original poly it is not there, but as you can see the nodes are.

It seems like the tool squashed my original poly, thought it is still represented in the attribute table and gave me a new poly seen in the second image. What am I missing here?

I was hoping to get 2 new polys in addition to the original one in the first photo. I've checked projections and topology and should be good there.


texts: Is there an automatic way to reduce the legend according to layer content?

texts:
I have style-file with max. amount of types. Some shp-Files doesn't have alle these values. When I load the sld-File there always drawn the max. count of the values. Is there any automatically way to reduce it to current values??

For instance: the value B111-GT6210 is not in the current shp-File


texts: PROJ4 C++ API: Amersfoort RD New to WGS84

texts:
I try to convert between dutch RD New (EPSG:28992) and WGS84 (EPSG:4326) via PROJ4 C++ API.
On the console this works with:

cs2cs +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs +to +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
138494.92605 467792.640021
5d8'46.283"E    52d11'56.38"N 0.000

However, doing the same thing in C++ with:

#include <iostream>
#include <proj_api.h>

using namespace std;

int main()
{
  double x = 138494.92605;
  double y = 467792.640021;

  char *srid28992 = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.04,49.91,465.84,-1.9848,1.7439,-9.0587,4.0772 +units=m +no_defs";
  char *srid4326 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";

  projPJ source = pj_init_plus(srid28992);
  projPJ target = pj_init_plus(srid4326);

  if(source==NULL || target==NULL)
    return false;

  x *= DEG_TO_RAD;
  y *= DEG_TO_RAD;

  int success = pj_transform(source, target, 1, 1, &x, &y, NULL );

  x *= RAD_TO_DEG;
  y *= RAD_TO_DEG;

  cout << success << endl << x << endl << y << endl;
}

results in wrong numbers:

./main
0
3.34135
48.0483

I wasn't able to find a working example for this. What am I missing here?

PROJ4 Version is 4.6.1


texts: Double Iteration Intersect in Model Builder

texts:
I need to intersect two highly-overlapping shapefiles, the first with 60 polygons (ponds), the second with 3000 (lilly pads). A straight-up intersection does not work (60 x 3000 -- it runs for hours and fails. Even 1x3000 does not work). Hence, I have believe the solution to be a model with double iteration: for every pond, iterate and intersect with every lilly pad. These will be merged together at the end. Because there cannot be two iterators in a single model, I have made a main model with a nested sub-model:

Main Model- Iterate through every Lilly pad and Intersect it with EVERY pond (output from the sub-model IterateSupply2)

Sub Model (IterateSupply2) - Iterate through every pond, copy features so they can be the model parameter (and output)

This double iteration isn't working for me: instead of 60x3000, it only gives me 1x3000. I have tried various preconditions, but don't understand how they would influence a process like this.

To explain in a different way: I would like for the main model to loop through using one submodel output, before moving onto the next submodel output and looping again


texts: Unexpected Conversion Result using Pyproj

texts:
I am trying to use Pyproj to convert a location in Boston from State Plane to Latitude and Longitude. However, the result did not turn out as I expected. Here is my snippet:
from pyproj import Proj, transform

inProj = Proj(init='epsg:2229', preserve_units=True)
outProj = Proj(init='epsg:4326')
x1,y1 = 783330.132997244, 2963345.94232371
LONGITUDE,LATITUDE = transform(inProj,outProj,x1,y1)
print(LATITUDE,LONGITUDE)

The result is "35.5856776921177 -137.5552510169851" which is way too far away from the correct one calculated via https://www.earthpoint.us/StatePlane.aspx?fbclid=IwAR284hbFbNerEsCcvKtJPCG20eOAk5ft8oEdAi3KGRUQLqEXsLtmRHQb40s.
Note: my data is given in US Survey Feet and Zone Number should be 2001-Massachusetts Mainland.


texts:
I am overlaying borehole geoJson file on google maps using Leaflet.
I can display the markers but the popup does not display when I click on the feature.
Here is my code:

/*  SELECT PROPERTY TO DISPLAY*/
function onEachBholeFeature(feature, layer) {
      if (feature.properties && feature.properties.BH_NO) {
        layer.bindPopup(feature.properties.BH_NO);
    }
}

/********   STYLE THE CIRCLE MARKER **************/

var geojsonMarkerOptions = {
    radius: 4,
    fillColor: "#ff7800",
    color: "#000",
    weight: 1,
    opacity: 1,
    fillOpacity: 0.8
};

/*  ******** CIRCLE MARKER DISPLAYS AS  BHOLE FEATURE ************/
var zone1BholesLayer=L.geoJson(bhzone1, {
    pointToLayer: function (feature, latlng) {
        return L.circleMarker(latlng, geojsonMarkerOptions);
    }
})

/************ ON FEATURE CLICK DISPLAY PROPERTY **************/
L.geoJson(bhzone1, {
    onEachFeature: onEachBholeFeature
});

Here is my geojson file

var bhzone1={
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "OBJECTID": 12, "BH_NO": "1005", "LATITUDE": -21.0861, "LONGITUDE": 26.975, "DEPTH": 61, "SWL": 0, "Elevation": 1128, "PROJECTNUM": null }, "geometry": { "type": "Point", "coordinates": [ 26.975, -21.086111 ] } },
{ "type": "Feature", "properties": { "OBJECTID": 64, "BH_NO": "10233", "LATITUDE": -20.0161, "LONGITUDE": 27.0494, "DEPTH": 78, "SWL": 0, "Elevation": 1017, "PROJECTNUM": null }, "geometry": { "type": "Point", "coordinates": [ 27.049444, -20.016111 ] } },
{ "type": "Feature", "properties": { "OBJECTID": 83, "BH_NO": "10311", "LATITUDE": -20.0144, "LONGITUDE": 27.0358, "DEPTH": 18, "SWL": 0, "Elevation": 1017, "PROJECTNUM": null }, "geometry": { "type": "Point", "coordinates": [ 27.035833, -20.014444 ] } },
{ "type": "Feature", "properties": { "OBJECTID": 84, "BH_NO": "10312", "LATITUDE": -20.0194, "LONGITUDE": 27.0469, "DEPTH": 12, "SWL": 0, "Elevation": 1017, "PROJECTNUM": null }, "geometry": { "type": "Point", "coordinates": [ 27.046944, -20.019444 ] }


texts: How to subtract one polyline from another

texts:
I have two shapefiles (blue_polyline.shp and red_polyline.shp). How to subtract blue line from red line and keep the different line(keep the red line in the third figure).

blue_polyline.shp

red_polyline.shp

Overlay figure


texts: How to project a geoJSON file in OpenLayers?

texts:
I have a json file well formed. I want to read a json file as a base layer from OpenLayers.

    <script type="text/javascript">
        var styles = new OpenLayers.StyleMap({
                "default": {
                    strokeWidth: 2
                },
                "select": {
                    strokeColor: "blue",
                    strokeWidth: 4
                }
            });

            // add rules from the above lookup table
            styles.addUniqueValueRules("default", "RP_TYPE", {
                10: {strokeColor: "#000000", strokeWidth: 2},
                12: {strokeColor: "#222222", strokeWidth: 2},
                14: {strokeColor: "#444444", strokeWidth: 2},
                16: {strokeColor: "#666666", strokeWidth: 2},
                18: {strokeColor: "#888888", strokeWidth: 2},
                19: {strokeColor: "#666666", strokeWidth: 1}
            });

            // add rules from the above lookup table
            styles.addUniqueValueRules("default", "RP_TYPE", {
                10: {strokeColor: "#000000", strokeWidth: 2},
                12: {strokeColor: "#222222", strokeWidth: 2},
                14: {strokeColor: "#444444", strokeWidth: 2},
                16: {strokeColor: "#666666", strokeWidth: 2},
                18: {strokeColor: "#888888", strokeWidth: 2},
                19: {strokeColor: "#666666", strokeWidth: 1}
            });

            var vectors = new OpenLayers.Layer.Vector("Lines", {
                strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                    url: "data/locality_region.json",
                    format: new OpenLayers.Format.GeoJSON()
                }),
                styleMap: styles
            });

            map.addLayer(vectors);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.zoomToMaxExtent();

        }

I have another json files which are downloaded from api and those files works fine. How about my own json file that got converted from db. Do I need to work more on it. If so
please guide me how to project a json on OpenLayers that created from a PostgreSQL db.
How can I fix the bounds for my own map or layer;

Thank you


texts: Can you go after ArcGIS Desktop Associate certification and immediately take ArcGIS Desktop Professional certification

texts:
I'm looking to build my GISP Portfolio and I need some points on the degree/cert section. Instead of just going after the ESRI ArcGIS Desktop Professional, will ESRI let me take the Associate Certification and then go after the professional immediately after? Or is there a wait time until you can take the Professional Cert?
The reason for this question is, If i can get both certification that would be more points I can add to my GISP Portfolio.


texts:
I'm preparing weather forcing input data (dimensions of time/lat/long/variable) for a machine learning model to predict streamflow. I need area-weighted weather inputs (the weather data are on a grid) for each watershed (the polygons). I've done this in two steps:

Compute a weight matrix: I computed the portion that each grid cell has in each polygon. That gives me a matrix with the flattened grid cell ids on one dimension and the polygon ids on the other dimension. I did this using the geopandas overlay function.
Take a dot product: I do a dot product with the weight matrix and the weather drivers to get me the area-weighted average values of weather data for each polygon. I do this with Xarray and Dask.

This method has been working fine, but both steps are quite inefficient and it doesn't scale the best.
The vast majority of the grid cells for a given polygon have a weight of zero. I really need just the few grid cells that have a non-zero weight for the operation. Currently the dot product is performed on many many cells that are zeros. I think for this, I might be able to use Dask Delayed to loop through all my polygons, find the cells where the weights are non-zero, and then do the weighted average operation.
Less clear to me is how to do step 1 more efficiently. So many of the grid cells don’t intersect at all with the polygons, it seems like it could be more efficient just to do the overlay with only the parts of the grid that touch a given polygon, but I don’t know if that is possible. My polygon file is very large and will not fit into 32 GB when I read the layer from the GDB file.
This seems like a pretty common operation, am I making this more complicated than I should be?
Is there a best practice for doing something like this?
I know this is a bit vague, but I don’t think I know enough yet to make it more concrete.


texts:
I have been struggling with adding a search box for GeoJSON stuff, similar to COntrol.geocoder in Leaflet.

I used the advice under this post:
Adding one search box for multiple GeoJSON polygon layers?

which led me to the examples:

https://labs.easyblog.it/maps/leaflet-search/

Unfortunately, my major problem is an implementation into my own map.
It looks like the codes don't match each other.

My example is:


texts: Data Driven Pages and exporting PDF using Python

texts:
I am able to zoom into map_index shapefile rows for a group of mxd documents in layoutview and export zoomed record as a PDF document at the same time.
I tried to combine below codes to make the procedure possible but no luck.

Below code is for zooming into map_index shapefile row values in layout view.

import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
for row in arcpy.SearchCursor("C:\Users\Desktop\Maps\map_index.shp"):
  df.extent = row.SHAPE.extent
  df.scale = df.scale

for df in arcpy.mapping.ListDataFrames(mxd):
mxd.activeView = df.name
mxd.title = df.name
mxd.saveACopy(r"C:\Users\Desktop\Deneme\\" + df.name + ".mxd")
arcpy.RefreshActiveView()

Below codes is the export to PDF document

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\ParcelAtlas.mxd")
ddp = mxd.dataDrivenPages
indexLayer = ddp.indexLayer
arcpy.SelectLayerByAttribute_management(indexLayer, "NEW_SELECTION",
                                    '"PageNumber" >= 1 AND "PageNumber" <= 10')
for indexPage in ddp.selectedPages:
ddp.currentPageID = indexPage
ddp.exportToPDF(r"C:\Project\Output\Page" + str(indexPage) + ".pdf", "CURRENT")
del mxd

Can any one help me please?
I dont know if its possible but any help would be appreciated.


texts: How to calculate a weighted center of a set of zip codes

texts:
I have the zip codes for the US and their population. I need to calculate the weighted center. I have tried finding the zip code with the minimum

sum(distance_to_zip * zip_population)

This works but is slow. With 30,000 zip codes there are two loops, so 900 million calculations. I've tried to optimize by sorting based on distance from the middle, and stopping the inner loop once the value hits the current lowest value. This helps, but it's still too slow.

Is there a faster algorithm for calculating the weighted center?

Note: I am writing my own code, I'm not looking to do this in a GIS package.


texts: Using FnodeTnode Tracing Extension in MapInfo?

texts:
I have downloaded FnodeTnode Tracer plugin from Pitney Bowes plugins repository website. It was just the MBX file that I have to regester it into my MIPRO and did it.

I have water distribution network with different levels of data. Now, I wanted to Trace the Water network End to end. I have selected one link out of networking and I have selected one link from the network and Clicket Strat Tracing. But, I was not lucky to get the tracing done. I have Fnode and Tnode in the Network layer table

Here is the Network layer which has Fnode and Tnode Columns. I have used LineTopo.MBX file which is suggested by @sys49152

Here is the Node file which is populated fter using LineTopo.MBX

Then I have selelectd one of the link in Network Layer and clicked on Start tracing

I have Got this error, But Tracing dint happen.

Process Summary : I have just used Linetopo.MBX for creating Nodes and Node ID's then i moved Node layer to cosmetic layer along with Network layer and clicked on FNode Tnode Trace.

How do I achieve Tracing Upstream and Downstream?

I have few other Point features and Line features in my Water network.


texts: Clipping a raster without pixel displacement / shifting

texts:
I'm not sure I'm writing in the right place. I looked for for answer for this question and didn't find any topic related to.
PROBLEM: when I clipped a raster either by extent or mask layer it results in a raster where the first pixel starts align to the first corner I gave. As a consequence my whole raster is shifted keeping the pixel values (probably nearst neighborhood). I also tried saving as and defining map canvas extent.


texts: How to realign (PostGIS) layers in QGIS?

texts:
I'm trying to realign layers in QGIS. As you can see here, the "background" light-blue layer is not aligned with the top layers. I'm working with pgAdmin III and importing PostGIS Layers in QGIS. My SRID is 32632. I tried almost everything but had no luck. Do you have any ideas?

Here are my layers.


texts: Atlas layout - blank 2nd page in QGIS 3.2 / 2.18

texts:
I've got an atlas in QGIS 3.2 and also 2.18. There is a main frame showing a map with points. Underneath there is a table with further information about the points.

If there are many points, the table extends to a 2nd page. From this point on, there is always a 2nd blank page. I tried to set Don't export page if frame is empty with no result. Maybe this option is being overridden at some point (it is automatically unselected after turning the atlas off/on or exporting).

Tried many more things. Now I'm stuck.


texts: Comparing Population Pyramid - Fixed or dynamic X-axis?

texts:
I have prepared an interactive visualization for Population Pyramid of G-20 countries from 1990 to 2100 using United Nations 2015 Revision of World Population Prospects data.

However, in order to compare I started with fixed X-axis. But some countries with less population, like Germany, Italy, Japan, etc. are almost not visible if the axis is fixed based on World population.

On the other hand with dynamic axis, based on individual country's highest population, although each pyramid is visible, the size is not comparable.

I would like get some advice/suggestion about the right choice.


texts: ArcMap 10.6. Input Features of any tool causes software to crash

texts:
Any tool I use in ArcMap crashes the entire program when I click the folder next to the "input features". Literally any geoprocessing tool. I'm not sure why this is happening, or what relevant information I can provide on how to diagnose and fix this problem. Any tips on settings I can manage to fix this issue?

I don't know if it's relevant or not, but before this started happening, tools would successfully run, but the outputs wouldnt appear in the output folder.

I should also note that it works fine if I use the drop-down menu for input features, which only shows features that are already in the table of contents. But pushing the folder icon to navigate directories and select new features is what's causing the software to crash.


texts: Converting Route to OSM edge ID list in QGIS?

texts:
This may be a very generic question but I cannot find a starting point.

I want to convert a line (MultilineString or any other implementation) to It's OSM Edge Id(Segment Id) list.

Can anyone tell me how to do that in QGIS?


texts: Extract a raster using shapefile to another raster

texts:
I have a raster (say r) and a polygon shapefile (say s, containing many polygons). I want to convert the pixelated r to mean of s boundaries. And I need these boundary means as another raster file.

What I have now is the extract function:

rmean <- extract(r,s,fun=mean,df=TRUE)

but, I am not able to convert this into a raster.

Thanks in advance for help.


texts: How can i change color style in web builder ArcGIS online?

texts: I want to customize default style in web builder ArcGIS online, such as the color style. I'd like to develop the color which is provided default. I can change in ccs file. But, my question where can i find the source code CSS in web builder ArcGIS online ( i mean where's repository source code in online ). Is it possible if i change the seource code in online "not source code in local repository of my computer" ?


texts: Link in the attribute table to the attribute table of an object of another layer

texts:
I have a question concerning the attribute table of QGIS (2.18 or 3.0):

Short: I would like to have a field which is a link, but not to external data (like a picture) but to a the attribute table of an object on an other layer.

Longer: I need to connect the attribute forms of several objects on several layers. For example object-1 of layer-1 has a connection to object-2 on layer-1 and object-3 on layer-2. Now I created a layer for all these connections. There I would like to have field with a link, which opens automaticaly the attribute table in "form view" of this connected/linked object (which is on an other layer). In the settings I can connect or join different layers, and I can set the "widget type" to "attachement" to create a link. But is there a way to set up such a link, which leads to the attribute table of an object which is on a seperate layer, and if yes, how could I set this up?

P.S. Because the objects have spatial datas too, QGIS would be preferred, but if there is no way to do this in QGIS, maybe with an other software (preferable OpenSource)?

Edit: I "draw" in the qt-designer quickly the form I would like to have:

and now I would like to define, that when I click on "Link to Attribute Form Dataset 1" the attribute table of this dataset opens:


texts: A point due east of me is closer to the equator?

texts:
This footnote:

  East-west directions can be misleading. Point B, which appears due East from A, will be closer to the equator than A. Thus the curvature found this way is smaller than the curvature of a circle of constant latitude, except at the equator. West can exchanged for east in this discussion.

appears on the Wiki page regarding Earth radius.  This does not correspond to my understanding of the geometry for an ellipsoidal Earth: if I move due east, I'll stay at the same latitude, and thus I'll still be the same distance way from the equator.

I what sense is a point B that is due east from A "closer to the equator"?

In fact, how can this make sense? nothing in the problem setup differentiates point A from point B, so neither can be closer to the equator than the other since the problem is symmetric.

In response to duplicate question comments: whether I move from A to B via a great circle or via a rhumb line, it shouldn't affect whether one of the two points is closer to the equator than the other.


texts: Randomly selecting points within polygons in ArcGIS Desktop?

texts: I have 131 polygons (point buffers) and need to randomly select a point within each buffer. Seems like it should be easy but can't find any solutions online. Running 10.5


texts: Reclassifying raster values in Google Earth Engine?

texts:
I need to reclassify slope raster (val: 0-90) to 9 classes (1-9). I used this code but the output raster cannot be displayed. What did I do wrong?

// Add features
var sumatera = ee.FeatureCollection("users/putraditama/sumatera");

// Add raster
var elev = ee.Image("USGS/SRTMGL1_003")

// Clip elev to Sumatera boundary
var elevsmrt = elev.clip(sumatera);

// Get slope
var slopesmrt = ee.Terrain.slope(elevsmrt);

// Remap values
var slopereclass = slopesmrt
.remap([0-10,11-20,21-30,31-40,41-50,51-60,61-70,71-80,81-90],
       [1,2,3,4,5,6,7,8,9]);

// Display the result.
Map.addLayer(slopesmrt, {min: 0, max :90, palette: ['black', 'white']},'slope');
Map.addLayer(slopereclass, {min: 1, max :9}, 'slopereclass');


texts: Is EPSG:3857 correct projection for PDF in Lambert Conformal Conic projection?

texts:
Given the following NEATLINE from the results of gdalinfo on my Geospatial PDF:

  NEATLINE=POLYGON ((-1340591.5297333347 -260482.28440259479,-1340591.0579001249 1878014.4171204455,3081498.0723039531 1878014.3548907496,3081497.6538160094 -260482.78408519758,-1340591.5297333347 -260482.28440259479))

I used the following code to convert the result to EPSG:4326 coordinates

from osgeo import ogr
from osgeo import osr

x = [-1340591.5297333347,-1340591.0579001249,3081498.0723039531,3081497.6538160094,-1340591.5297333347]
y = [-260482.28440259479,1878014.4171204455,1878014.3548907496,-260482.78408519758,-260482.28440259479]

i = 0

while i < 5:

    pointX = x[i]
    pointY = y[i]

    # Spatial Reference System
    inputEPSG = 3857
    outputEPSG = 4326

    # create a geometry from coordinates
    point = ogr.Geometry(ogr.wkbPoint)
    point.AddPoint(pointX, pointY)

    # create coordinate transformation
    inSpatialRef = osr.SpatialReference()
    inSpatialRef.ImportFromEPSG(inputEPSG)

    outSpatialRef = osr.SpatialReference()
    outSpatialRef.ImportFromEPSG(outputEPSG)

    coordTransform = osr.CoordinateTransformation(inSpatialRef, outSpatialRef)

    # transform point
    point.Transform(coordTransform)

    # print point in EPSG 4326
    print point.GetY(), point.GetX()

    i += 1

This results in:

-2.33930197857 -12.0427386092
16.6318711337 -12.0427343707
16.6318705981 27.6815681634
-2.33930646355 27.681564404
-2.33930197857 -12.0427386092

It looks close to being right, but the 27 degrees longitude on lines 3 and 4 should be more around 54 degrees East.

The additional information from the gdalinfo is as follows:

PROJCS["Lambert_Conformal_Conic",
    GEOGCS["GCS_WGS_1984",
        DATUM["WGS_1984",
            SPHEROID["WGS_84",6378137.0,298.257223563],
            TOWGS84[0,0,0,0,0,0,0]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",25.0],
    PARAMETER["Standard_Parallel_1",7.66666666],
    PARAMETER["Standard_Parallel_2",38.3333333],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]]
GeoTransform =
  -2133343.372843582, 754.0130468353923, 3.981217275795919
  2035401.595692971, 3.953040951345574, -753.9627451388365

I assume I'm using the correct inputEPSG in my code, if not, does anyone know what I should use in its place?

I guess it is also entirely possible that the NEATLINE is incorrect.


texts:
This should be simple, but I cannot find any documentation on how to do it. I have a legend that is bound to my map that contains several layers. I do not want all of the layers to appear on my Legend so I am using LayerIDs. The problem is that I do not know how to use multiple ones in the LayerIDs. Below is my code:

XAML(Legend):

<esri:Legend Map="{Binding ElementName=MyMap}"
                         LayerIDs="CalvertCity, WaterValves"
                         LayerItemsMode="Tree"
                         ShowOnlyVisibleLayers="False">
                    <esri:Legend.MapLayerTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox Content="{Binding Label}"
                                    IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                                    IsEnabled="{Binding IsInScaleRange}" >
                                </CheckBox>
                                <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />
                            </StackPanel>
                        </DataTemplate>
                    </esri:Legend.MapLayerTemplate>
                    <esri:Legend.LayerTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Label}"
                            IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                            IsEnabled="{Binding IsInScaleRange}" >
                            </CheckBox>
                        </DataTemplate>
                    </esri:Legend.LayerTemplate>
                </esri:Legend>

XAML(ESRI Maps):

<esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True"  MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352">
                <esri:Map.Layers>
                    <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
                    <esri:GraphicsLayer ID="CandidateGraphicsLayer">
                        <esri:GraphicsLayer.MapTip>
                            <Grid>
                                <Rectangle Stroke="Gray"  RadiusX="10" RadiusY="10" Fill="#77FF0000" Margin="0,0,0,5" >
                                    <Rectangle.Effect>
                                        <DropShadowEffect/>
                                    </Rectangle.Effect>
                                </Rectangle>
                                <Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" />
                                <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="30,20,30,30">
                                    <TextBlock Text="{Binding [Address]}" HorizontalAlignment="Left" Foreground="Black" />
                                </StackPanel>
                            </Grid>
                        </esri:GraphicsLayer.MapTip>
                    </esri:GraphicsLayer>
                    <esri:ArcGISDynamicMapServiceLayer ID="CalvertCity" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer"/>
                    <esri:FeatureLayer ID="WaterValves" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer/0" Renderer="{StaticResource MySimpleRenderer}"
                                                  OutFields="WVAL_ID,SIZE,WVAL_USE,WVAL_TYPE,OPENS,TURNS" MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"/>
                </esri:Map.Layers>
            </esri:Map>

If you need any more information, just let me know. I will appreciate any help. Thank you in advance.


texts:
From gdal.org, the description of the "-a_ullr" flag is:

  Assign/override the georeferenced bounds of the output file.

Are the georeferenced bounds the coordinates of the center of pixels located at the corners of the grid, or are the georeferenced bounds the coordinates of the corners of the corner pixels?


texts: I have a layer that has several overlapping areas (coming from CAD). So usually I do a "SORT" (tool), so I can view all the features. However, I wonder clip a shape according to their areas, it's means, to clip the lower area, to the largest area. Anyone know how?


texts:
I am trying to transform a JSON object to XML, but i have somehow get stuck in jscript (not an expert). Here is the code:

...
var GEOJSON_PARSER = new OpenLayers.Format.GeoJSON();
var vectorLayerAsJson = GEOJSON_PARSER.write(vlayer.features);
    ...
var x2js = new X2JS();
    ...
var xmlDocStr2 = x2js.json2xml_str(vectorLayerAsJson);
alert(xmlDocStr2);
    ...
// JSON arrays to string
var xmlDoc1 = x2js.json2xml_str({
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "properties": {},
        "geometry": {
            "type": "Polygon",
            "coordinates": [
                [
                    [22580, -24812],
                    [24772, -28076],
                    [27732, -24204],
                    [22580, -24812]
                ]
            ]
        }
    }]
});
alert(xmlDoc1);

In the first case the json2xml_str(vectorLayerAsJson) function returns something like a JSON object however in the second it returns the correct XML.

Both objects are identical "vectorLayerAsJson" is the one declared as "type":"FeatureCollection ..." in the second case.

I have also tried alternate ways of calling x2js.json2xml_str such as x2js.json2xml_str($.parseJSON($("vectorLayerAsJson").val())); with no success!

Any ideas?


texts: Get feature data from lat long input QGIS

texts:
In QGIS, I have a polygon dataset with feature data. I would like to extract data from this dataset using a latitude and longitude.

To be more clear, I have a list of 1000 coordinates. I would like QGIS to give me the feature data of the polygon based on my coordinate input. Is this possible?


texts:
What I am trying to accomplish in ModelBuilder is netting road buffers and stream buffers from forest polygons.  I do not know python and I am relatively new to ModelBuilder. I attached the start of the model.  I had no problem running this model earlier, then I tried to create "Add Personal GDB" as a precondition, so that I could share this model with other people and they could use it with their data.

I have spent numerous hours searching and got close

Create Personal GDB and Designate its file location.

Then run a series of geoprocessing steps and I want to save the outputs to the same location to the original Personal GDB I created.

This one got me close. I am lost with the %output% stuff.
Setting single output location for multiple files in ModelBuilder?

This one also got me close.

Output location in ModelBuilder?


texts: QGIS 3: Changing the datasource of a layer?

texts:
Everything seems to go right, but nothing happens:

layers = QgsProject.instance().mapLayers().values()
for layer in layers:
    if isinstance(layer, QgsVectorLayer):
        dp = layer.dataProvider()
        uri = QgsDataSourceUri(dp.dataSourceUri())
        print ("Origin: ", uri.connectionInfo())

      uri.setDatabase('P:/PG/GEM/BAV20/GEMEINDE365/31717/qgs/wh_2/31717.sqlite')
        #uri.setDatabase('./wh_2/31717.sqlite')
        print ("New:", uri.connectionInfo())
        dp.setDataSourceUri(uri.connectionInfo())
        dp.reloadData()
        layer.dataProvider().forceReload()
        layer.triggerRepaint()

What I am missing?


texts: Wrong coordinates in data when projecting in world map (QGIS)

texts:
Possible Duplicate:
  How to find the proper coordinate reference system with two sets of data using different measurements or too convert one system into another

I'm fairly new to the GIS world, but I'm doing a project with noise calculations. My dataset is in shapefile and I would like to add a map to my project, so people can see where in the world the project is situated.

But, when I'm adding a map through the OpenLayers plugin my project is situated just south of Nigeria and my project is in Denmark! CRS is WGS 84, EPSG:4326.

How can I change the coordinates of my project so I can add a map to the project?

And, if anyone has a suggestion as to which OpenLayers I should prefer, please say so...

I'm using QGIS 1.8, Lisboa on a Mac.


texts: I am using QGIS 2.8.2 and everytime I try to load in a coverage type Shapefile, like forest density or population density it all comes up as the same color, but has the sections marked for the density/coverage. I have attached a picture of my project when the Shapefile is loaded.


texts: Make layer from selected features in python add-in

texts:
There is a problem in my arcgis add-in when I try to create layer from selected features of 'fc' layer, add-in button creates layer from all features of 'fc' layer not only selected features. When i try to do this process in arcmap python window, it works for both Make Feature layer management and copy features management. But in add-in it doesn't work for both analyses.

Here is my code:

class ButtonClass17(object):
"""Implementation for PPPpoint_addin.button_2 (Button)"""
fc = r"C:\New_Geodatabase.gdb\test"
def __init__(self):
    self.enabled = True
    self.checked = False
def onClick(self):
    arcpy.MakeFeatureLayer_management(fc,'kapi3')


texts: Result names in modeler processing tools

texts: the results of the modeler (processing tools) do not have the defined names. Is that an issue? For instance: When I'm using "clip grid with polygon" and I define the result name "clip". I expect the result "clip.tif". The result name is "OUTPUTALGSAGACLIPGRIDWITHPOLYGON1.tif". In Qgis Dufour it worked fine. Do I have to change any settings to make it work?


texts: Why is GDAL isn't supporting .raw images?

texts:
I tried to open a .raw image (Raw image format) using GDALOpen() with GDAL C API. So, I wrote the following code to test it :

in_data = GDALOpen("/home/YOYo/workspace/NY/Data/fig.raw",GA_ReadOnly);

and the compilation is good but when I try to execute I get the following error

  ERROR 4: "/home/YOYo/workspace/NY/Data/fig.raw" not recognized as a
  supported file format

How can I fix this error?