texts: GRASS algorithm r.los not producing raster

texts:
After running the r.los algorithm through QGIS 2.0, I'm getting a 'Problem loading output layers' box which gives the following message:

Oooops! The following output layers could not be open
Output raster layer: C:/Users/ffinnm/Documents/CGE/LVIA/Southdown/gis files/viewsheds/hhh.grd
The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm
Checking the log information might help you see why those layers were not created as expected
This algorithm requires GRASS to be run. A test to check if GRASS is correctly installed and configured in your system has been performed, with the following result:
GRASS seems to be correctly installed and configured

I have checked the log information and there is no error logged here.  Interestingly, in the log information, the algorithms section states that the 'r.voronoi' algorithm ran 2 seconds after the 'r.los' algorithm.  I didn't instruct the r.voronoi algorithm to run (or know what it is!).

I have also tried changing both input and output raster formats.


texts: Web Maps for Collecting Information in Questionnaire?

texts:
I am working with a Non Profit group who are looking for collect information around urban cycling routes.

They would like to know the routes people take to get from point A to point B.

I thought, "well web maps are great for that!"

Are there any out of the box solutions (ie: Google Maps Engine, CartoDB, MapBox, etc.) that would allow for the creation of a web map where people could enter data (draw their cycling route)?

I know that a web map could be made using things like Leaflet, but the group does not have web mapping or web development capabilities.

Ideally, the web map could be embedded into an online survey, and at the end of the survey, the group could access the drawn routes and download them for analysis in a GIS.

Any thoughts?


texts: Creating Extent of Data within Raster (not just boundary of raster) in ArcGIS Desktop?

texts: I have a tif (raster) that I need to generate a polygon around the data within the tif, not just the extent of the entire raster. The image below shows the type of data I am working with. I have ArcGIS 10.5 with 3D Analyst and Spatial Analyst extensions.


texts: Leaflet custom info control update with extra parameters

texts:
I used custom info control to show information.The below code is working:

var info = L.control();

info.onAdd = function (map) {
    this._div = L.DomUtil.create('div', 'info');
    this.update();
    return this._div;
};

info.update = function (props) {
    this._div.innerHTML = '
US Population Density
' +  (props ?
        '' + props.name + '
' + props.density + ' people / mi2'
        : 'Hover over a state');
};

info.addTo(map);

and using info.update in highlightFeature and resetHighlight methods

function highlightFeature(e) {
    ...
    info.update(layer.feature.properties);
}

function resetHighlight(e) {
    ...
    info.update();
}

But I refactor the code and I separated the logic to different classes.So in info.update method,I should use some extra parameters.In this case,I easily can call with other parameters info.update in highlightFeature and resetHighlight methods.But in

info.onAdd = function (map) {
        this._div = L.DomUtil.create('div', 'info');
      //  this.update();
        return this._div;
    };

I did not use   this.update(); in info.onAdd ,so 'Hover over a state' text does not display.
When I use this.update() like that

info.onAdd = function (map) {
            this._div = L.DomUtil.create('div', 'info');
            this.update();
            return this._div;
        };

info.update = function (props,param1) {
.......
}

I got the error param1 is undefined.How to achieve this?Is there any way to call
info.update with extra parameters in info.onAdd?


texts: How does the US Census Bureau simplify its Cartographic Boundary Shapefiles?

texts:
The US Census Cartographic Boundary Shapefiles are available in 1:500,000 and 1:5,000,000 and 1:20,000,000 resolutions.

The boundaries are well-aligned and the data otherwise seemingly clean.

How are these made? Is there an algorithm that's used followed by manual clean-up, or some other process?


texts: Failed to load secured web map in leaflet map

texts:
I set up and use proxy to load map from my ArcGIS Online organizational account. When I tried to load web map, error popped up ''esri/request: the first parameter should be a url string''.

Here is a script I used:

<script>
require([
    "esri/views/MapView",
    "esri/core/urlUtils",
    "esri/WebMap",
    "dojo/domReady!"
    ], function(
        MapView, urlUtils, WebMap
        ) {
        urlUtils.addProxyRule({
            urlPrefix: "http://my url/",
            proxyUrl: "/proxy.ashx/"
        });
        var webmap = new WebMap({
            portalItem: {
                id: "web map id"
            }
        });
        var view = new MapView({
            map: webmap,
            container: "viewDiv"
        });
    });
</script>


texts: Polygon (vector) is getting shifted w.r.t scale level of Raster

texts: We have some 100+ georeferenced raster's in ecw format. All the rasters are in EPSG:20935 (Arc 1950/UTM 35S) reference system. We have captured the data_footprint of those rasters in the same CRS. But, if the scale level is say 60,000 or 40,000 QGIS is showing a shift between the data_footprint polygon and the respective raster. Once i change the scale to 20,000 or 10,000 the polygon and the raster boundary matches perfectly. Could anyone explain why this happens ?


texts: Getting data source of Feature Layer object in Python script tool?

texts:
I am writing a script tool to update some records.  I am wanting to use a feature layer as input, to maintain definition queries, selections, etc.  I would like to get the data source of the input feature layers, but I am unable to find a way.  For example,

in_fl = arcpy.GetParameter(0)
desc = arcpy.Describe(in_fl)
arcpy.AddMessage(desc.catalogPath)

prints out the following:

u'\\MyData.DBO.MyDataset\MyData.DBO.MyFeatureclass'

I would like to get the full path of the SDE feature class.  Is this possible?


texts: How do I select a point imported from a GPX file?

texts:
I imported several GPX files and added a raster basemap for reference. The GPX files contains tracks so the points are sequentially numbered. I'd like to identify one of the points so I edit the GPX file and remove unwanted data (there is a bunch of unwanted data, miles and miles). The easiest way, I think, is to identify the last desired point, grab it's ID, and delete all points after / before it from the source file.

How do I select a point and get it's attributes like ID, lat / lon, elev, etc.?

I'm using QGIS 2.6.0 (Brighton).

Update #1 - I will edit the GPX file myself using an external app. I just need to ID the point.

Update #2 - I already have the files imported. Now that I can see where the points fall, I want to select one of the points to get an identifying attribute to use for modifying the track data. For example, my study area stops at an intersection of two roads. I want to grab the point nearest that intersection (ID, timestamp, some identifying attribute) and delete from the source file all points outside my study. Does QGIS have a tool that alows me to pick a point on screen and display the point's attributes? If not, how about a series of steps I can perform to get the information? I have an extensive CAD / engineering background and this is a feature in every CAD package I've used. I just need to know if it exists in QGIS and if so, where it is.

Update #3 - I found the Attribute Table for the layer but could not find a tool to graphically select a point and display its attributes. Getting closer...


texts: Merge shapefiles with unequal field lengths

texts:
I have several shapefiles in ArcMap that I want to merge together into one shapefile so I don't have to keep juggling them all.

However, I can't use the Merge geoprocessing tool because it gives me a "001156: Failed on input OID; could not write value to output field TXPYRS_NAME" error. This seems to be because each shapefile has a different length for TXPYRS_NAME.

But when I go into ArcCatalog and try to change the field length in the Shapefile Properties window from 15 to 35 to match the other shapefiles, it says "Unable to alter field's length".

This person says it's impossible to change the field length for a feature class that already contains data. So how am I supposed to merge these files if the field lengths are different and unchangeable...?


texts: Publishing web map on website using PostGIS, GeoServer and OpenLayers

texts:
I have been trying to create a web map using PostgreSQL/PostGIS - GeoServer - OpenLayers. However, the resulting map is on my localhost and the data published in GeoServer can be accessed solely through my own PC. Also, the link to my shapefiles/rasters possess the prefix of localhost:8081 (in the javascript code of the .html I have built).
How can I publish the web map I have created, on my own website so that everyone can visit the website and scroll around the map?


texts: Get xy coordinates from latitude and longitude in OpenLayers 2

texts:
I'm trying to get the XY on layer but the values are wrong; the lat lon values are correct.

I need to convert lat/lon to xy values with OpenLayers 2.


texts: Possible to loop through and turn off ALL layers?

texts:
The below finds my layer and shows visible property in the console, when I toggle it there from 'true' or 'false' it changes.

myApp.mapview.map.findLayerById('cool_layer');

But when I run the below line, I can toggle my layers on or off individually, but how could I loop through all of them, and turn them all off? I am trying tocreate a 'reset' button.

myApp.mapview.map.findLayerById('cool_layer').visible = true;


texts:
I have a shapefile layer set on MultiPolygon consisting of polygons which originally didn't have any duplicates. The polygons were spatially separate but a lot of them had the same ID. I manually merged most of the different polygons with the same ID with the Merge Selected Features button.

I did it manually because some of the polygons with the same ID should not be merged, instead I had to give them different ID's. Sadly now all my merges have been deleted: all the duplicates popped up again.

Can anyone tells me how this happened and how to prevent this?

I did link the polygon layer to a database with the ID's but I'm not sure if that's the problem and if so why its a problem and what to do about it.


texts:
I am trying to load a WMS-T in QGIS that entails modelled air temperature for the world. I am able to load the WMS connection in my sidepane. But the raster itself won't display and stays blank. In the metadata I could find the following problem: "Cannot identify raster data type".
Does somebody have any idea how to fix this problem?
I did some research and assume that this has something got to do with the large size of my WMS. But how do I decrease the spatial extend of my WMS?
Is there a way to only load a certain region of the WMS in QGIS? I am relatively new to GIS, so any help would be appreciated
WMS: https://ds.nccs.nasa.gov/thredds/wms/bypass/NEX-GDDP/bcsd/rcp85/r1i1p1/tasmin/MIROC5.ncml?service=WMS&version=1.3.0&request=GetCapabilities


texts: Trying to select some features that are at a map service not featurelayer. (arcgis api)

texts:
I am trying to select(highlight) some features that are found at a map service.
The selection is based on mouse clicking on map by the user.
I am using Arcgis Javascript Api 3.15

Here are my steps.

1-First, I load my map service in to my map.

mapService = new ArcGISDynamicMapServiceLayer(mapServiceUrl);
map.addLayer(mapService);

2-Second, I prepared my query that i want to use in order to select a feature

circle = new Circle({center: evt.mapPoint, geodesic: true, radius: 1, radiusUnit: "esriMiles"});
var query = new Query();
query.geometry = circle;

Please note that the "evt" came when the on map click event is triggered by the user when he clicks on the map.

Now,The user have the option to select features based on a specific layer, lets say that he choosed the featurelayer that has id "1".

i want to retrieve the feature layer from the mapservice so i can call the "selectFeatures" method from it. i am thinking something like this.

var selectedFeatureLayerByUser = mapService.getFeatureLayerById("1");//This is was i am looking for
selectedFeatureLayerByUser .setSelectionSymbol(new SimpleFillSymbol().setOutline(null).setColor("#F0F"));
selectedFeatureLayerByUser.selectFeatures(query ,FeatureLayer.SELECTION_NEW);

I am hoping to find some ideas like the previous example because all the examples i saw, loads a new feature layer then add this feature layer at the map like the following.

featureLayer = new FeatureLayer(mapService + "/1");
map.addLayer(featureLayer);
featureLayer.setSelectionSymbol(new SimpleFillSymbol().setOutline(null).setColor("#F0F"));
featureLayer.selectFeatures(query ,FeatureLayer.SELECTION_NEW);

which is very confusing to me because i already have a mapservice that contains the featurelayer ,which i think the last example is not the best practice to add a feature layer that was already added by the map service.

Can someone help me with that?


texts: How to control the rendering priority/order of feature layers?

texts:
I am displaying polygon, line and point feature layers on a button click event and adding layers in order based on their geometry type, e.g.: polygon -> line -> point.

In certain cases layers are rendered fine as we add them, but in some cases as the amount of data (and response time) increases in one of the layers, the polygon layer is rendered on top of the point and line layers and these layers get hidden.

We have already used reordering code but its not much of use. Are there any methods to control the rendering of layers or move layers one above the other?

I am using ArcGIS Server 10.1, feature service and the ArcGIS JavaScript API 3.1.


texts: Automatically batch flipping and saving raster dataset under different name using ModelBuilder?

texts:
I have 168 datasets, and I clearly cannot flip each one. I've tried batch processing but it is still time-consuming because I have to manually assign dataset and I/O path. I need something to do this automatically. I've tried ModelBuilder and so far I have this result:

The only problem with this one is that it overwrites the outputs and the result is only one dataset with the designated name. What I want is for each dataset, the result to be named accordingly (e.g Aprilie_2000 -> Aprilie_2000_flip and Aprilie 2001 -> Aprilie_2001_flip)

I am using ArcMap, how can I automate this process using ModelBuilder?


texts: How to select segment of linestring using PostGIS?


texts: Finding measurements of unknown points relative to reference points with known lat, long and measurements?

texts:
I am trying to measurements of the distance of multiple points relative to reference points of known latitude, longitude and measurements along a river.

Is there tool that can do this?

Would dynamic segmentation or linear reference work to able to see the measurements in the attribute table?


texts:
I want to create a button in ArcCatalog that takes the metadata from the selected file in ArcCatalog and prints it to a text file. The metadata extraction part is done, and I have succssfully tested it on a number of GIS datasets. However, I cannot figure out how to get information about the currently selected item in ArcCatalog.

Is this possible in ArcCatalog? I expected for there to be something simple, and similar to the Arcpy.mapping.MapDocument("CURRENT"), but I can't find anything.

I would prefer to keep this in python, but an ArcObjects solution is also possible (just not preferable)


texts:
I am using a Arcgis 10.3 server

I have been looking for a way to find the source mxd from feature services that have been published. I have a server that has many services on it. I know the source for those services are mxds. So what i am looking for is a way in python to be able to get the source of the mxd, from there I will be able to list the layers and everything, I already have script that can do that. For now i just need to be able to find the source mxd for each service, I will probably make an csv out of or something as the output.

http://server.arcgis.com/en/server/latest/administer/windows/example-write-properties-of-all-services-to-a-csv-file.htm

Currently I have used the above script to find all the services, but this does not list the source mxd or the layers in each service.


texts:
I have a Geo-Django project in which i am using postgres as database. I have a table with geometry column. I am filtering data and getting results which is working fine.
Problem is I want the geometry results in text form so i am trying to use ST_AsText in it. The Issue is I tried passing this function multiple ways and using annotations as well but I am not able to do that due to multiple errors.
As suggestion or successful implementation of applying ST_ functions would help me.
pointsArr = ScrapedArea.objects.filter(geom__intersects=poly).values('geom', 'url')


texts: View attribute (/field) names of a geopackage table without opening the whole file

texts:
I have a large geopackage file (15gb) for which I'd like to see the attribute (/field/column) names. Is this possible without loading the whole file?

Edit:
It would be ideal if there was a command line tool that allowed you to do this. Something like just seeing the 'head' of the file


texts: How can i use arcgis server services in arcgis viewer for silverlight?

texts:
I want to create  a webgis using arcgis viewer for silverlight. i install arcgi viewer . when i want to connect to arcgis server service , the application show the error" unable to connect to "http://server name/ArcGIS/services/test". I copied clientaccesspolicy.xml into C:\inetpub\wwwroot but the application show same error .
i tried "http://server name:8399/arcgis/services/test" but it doesn't solve my problem.
 i couldn't find any good help for this reason . what's my problem ?


texts: How to extract single band from multi-band radiometry raster using R?

texts:
I am having trouble extracting single band from multiple multi-band raster. I have no problem doing it on single raster file.

Is there a way to loop through all the raster images to extract a single band in R?


texts: Separating 50 duplicate points by limit in buffer zone using QGIS

texts:
I am building a customer database in QGIS. I get GPS coordinates for customers from my staff. Then I convert those GPS coordinates into shapefile points in QGIS. I get a lot of duplicate points. I am sure that those are customers that are close together, e.g. house No.54, house No.55, House No.56.

How do I separate these duplicate points using QGIS?


texts:
Using MapServer 6.0.1-2

"<GetFeature
service="WFS"
version="1.1.0"
srsName="EPSG:900913"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<Query typeName="clc_he_site_e" srsName="EPSG:900913">
<Filter>
<Intersects>
<PropertyName>the_geom</PropertyName>
<Point srsName="EPSG:900913">
<coordinates>-13898086.230923885,6532736.454751344</coordinates>
</Point>
</Intersects>
</Filter>
</Query>
</GetFeature>"

The following WFS Request works flawlessly, but does not in
MapServer 6.4.1-2

<TITLE>MapServer Message</TITLE>

mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided.

Anyone know why?


texts: Aerial LiDAR Classified Point Clouds| Defining Flightline File Source ID + Point Source ID

texts:
Definition:
Each swath should have an unique identifier represented by the Flightline File Source ID, supplied to us in a Flightline shapefile.
Each point ties back to a specific complete swath, from beginning to end via Point Source ID.
Question:
Do you know any end use cases that would be impacted if the swath was split up into 'blocks' not preserving the entire swath for a region?


texts: Why no need for "fill-sinks" when using r.watershed in GRASS QGIS?

texts:
I've seen a few places that when using the r.watershed function in GRASS QGIS, you do not need to use the "fill-sinks" procedure on the DEM before running the function.
According to the documentation:
"Option elevation specifies the elevation data on which entire analysis is based. NULL (nodata) cells are ignored, zero and negative values are valid elevation data. Gaps in the elevation map that are located within the area of interest must be filled beforehand, e.g. with r.fillnulls, to avoid distortions. The elevation map need not be sink-filled because the module uses a least-cost algorithm."
How does the least-cost algorithm work, and why is it not necessary to perform a "fill-sinks" procedure when using it?


texts:
Using Microstation V8i (2012 version i believe) and can't seem to find an equivalent tool to Autocad's "background" for text. Is there a mask or background setting I can apply to certain texts?

Edit: I found another solution. Using the "field" tool to select an area to mask, usually using the box method, and then clipping the reference.


texts:
I wrote the following code using QGIS'API.

import os

from qgis.core import *
import qgis.utils

prefix_path = os.environ['QGIS_PREFIX_PATH']
QgsApplication.setPrefixPath(prefix_path, True)
QgsApplication.initQgis()
app = QgsApplication([], True)

import processing
from processing import *

class DummyInterface(object):
    def __init__(self):
        self.destCrs = None
    def __getattr__(self, *args, **kwargs):
        def dummy(*args, **kwargs):
            return DummyInterface()
        return dummy
    def __iter__(self):
        return self
    def next(self):
        raise StopIteration
    def layers(self):
        # simulate iface.legendInterface().layers()
        return qgis.core.QgsMapLayerRegistry.instance().mapLayers().values()
iface = DummyInterface()
plugin = processing.classFactory(iface)

uri = "file:///C:\Users\Tabrez\Desktop\importPoint.csv?crs=epsg:4326&delimiter=%s&xField=%s&yField=%s" % (",", "lon", "lat")
layer = QgsVectorLayer(uri, "importPoints", "delimitedtext")
layer1 = iface.addVectorLayer(uri, "importPoints", "delimitedtext")
extent = layer.extent()
xmin = extent.xMinimum()
xmax = extent.xMaximum()
ymin = extent.yMinimum()
ymax = extent.yMaximum()
outputExtent = str(xmin) + "," + str(xmax) + "," + str(ymin) + "," + str(ymax)
radius = 0.05
cellSize = 0.005
print cellSize
processing.runandload("saga:kerneldensityestimation", layer, "weightage", radius, 0, outputExtent, cellSize, "D:/test/raster.tif")

iter = layer.getFeatures()
pointCount = len(list(iter))
probabilityFailure = [[0.846], [0.846, 0.846], [0.28, 0.50, 0.72], [0.21, 0.39, 0.61, 0.79], [0.17, 0.32, 0.50, 0.68, 0.83], [0.14, 0.27, 0.42, 0.58, 0.73, 0.86], [0.12, 0.23, 0.36, 0.50, 0.64, 0.77, 0.88], [0.10, 0.20, 0.32, 0.44, 0.56, 0.68, 0.80, 0.90], [0.09, 0.18, 0.28, 0.39, 0.50, 0.61, 0.72, 0.82, 0.91], [0.08, 0.16, 0.26, 0.35, 0.45, 0.55, 0.65, 0.74, 0.84, 0.92], [0.07, 0.15, 0.23, 0.32, 0.41, 0.50, 0.59, 0.68, 0.77, 0.85, 0.93]]
for i in probabilityFailure:
    print i
os.system("gdal_contour -a 0.21 -fl 0.01 " + " D:/test/raster.tif " + " " +  "D:/test/contour")
QgsApplication.exitQgis()

This line is giving me error:

processing.runandload("saga:kerneldensityestimation", layer, "weightage", radius, 0, outputExtent, cellSize, "D:/test/raster.tif")

I am very new to python and QGIS.


texts: How to create equidistant points along lines (network)?

texts:
I am trying to create points at every X meters along a set of lines that represent a network. As suggested in QChainage doesn't place points evenly along dissolved lines I managed to this successfully with the help of Join Multiple Lines and QChainage plugins.

The problem is that the lines are not thought to be a continuous segment and therefore when running Join Multiple Lines I end up having extra lines to join truncated segments into a continuous one, and then QChainage counts the length of that when adding points. With this method I have points being too close or outside of the original lines, so it is not valid.

So a solution would involve considering all the line features as one, so then the chainage would place the points correctly. But I don't think this is fundamentally possible in GIS without adding extra lines to connect them all?

What's the right approach to this? Should I convert this into a network and perhaps run another tool? Is there any tool that can do that in a network based approach? I am happy to try python solutions too.


texts: small GetFeature request on a WFS of large dataset very slow (hangs on 'GetServiceInfo')

texts:
I have a GeoServer Ubuntu installation reading from a very large PostGIS table (a view with 200000 records). The GeoServer installation is inside a docker container using a NGINX proxy.
The issue is that any getFeature request (even if I request only one feature), will take at least 30 seconds. A SQL directly on that table in PostgreSQL goes fast (it is well indexed). Looking at the GeoServer log shows that most of this time it is hanging on the 'getServiceInfo' request. Getcapabilities requests and Getfeature requests on a smaller PostGIS table work fine.
geoserver_gdal_ecw_support | 25 Jun 08:05:10 INFO [geoserver.wfs] -
geoserver_gdal_ecw_support | Request: getServiceInfo
geoserver_gdal_ecw_support | 25 Jun 08:05:39 INFO [geoserver.wfs] -
geoserver_gdal_ecw_support | Request: getFeature
geoserver_gdal_ecw_support |     service = WFS
geoserver_gdal_ecw_support |     version = 2.0.0
geoserver_gdal_ecw_support |     baseUrl = http://verharding.signaleyes.nl/geoserver/
geoserver_gdal_ecw_support |     count = 1
geoserver_gdal_ecw_support |     outputFormat = application/gml+xml; version=3.2
geoserver_gdal_ecw_support |     resolve = none
geoserver_gdal_ecw_support |     resolveDepth = *
geoserver_gdal_ecw_support |     resolveTimeout = 300
geoserver_gdal_ecw_support |     resultType = results
geoserver_gdal_ecw_support |     abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wfs20.impl.QueryTypeIm       pl@69cd2de4 (handle: null) (abstractProjectionClause: null, abstractSelectionClause: null, abstractSortingClause: null, aliases:        null, typeNames: [{verharding}verhardingsobjecten_current_selection]) (featureVersion: null, srsName: null, filter: null, propert       yNames: null, sortBy: null)

Any idea why it is hanging so long at the 'getserviceinfo' request and is there anything I can do to solve this?
Update
according to the log it queries the count of the whole table, it makes sense that this takes a long time, how can I stop that?
geoserver_gdal_ecw_support | 25 Jun 08:32:21 INFO [org.geoserver.wfs] -
geoserver_gdal_ecw_support | Request: getServiceInfo
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - SELECT count(*) AS gt_result_ FROM (SELECT * FROM "public"."ver                                                                       hardingsobjecten_current_selection" LIMIT 1) gt_limited_
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - CREATE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:21 DEBUG [org.geotools.jdbc] - SELECT count(*) FROM "public"."verhardingsobjecten_current_sele                                                                       ction"
geoserver_gdal_ecw_support | 25 Jun 08:32:47 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION
geoserver_gdal_ecw_support | 25 Jun 08:32:47 INFO [org.geoserver.wfs] -


texts: Earth Engine: nearly identical Sentinel 2 images for same date, same place?

texts:
I am using Earth Engine to retrieve Sentinel 2 data. I thought that for a given date and place, I would find only one Sentinel image (revisit time is multiple days). I notice however that for some dates, Earth Engine records two images that seem very similar (at least visually: same values, same bounding box).

Why are there two images? If I were to take only one, which one should I take?

Code: https://code.earthengine.google.com/0dd7199e04a6ca5b22684fb3a09a8c40

var senti_same = ["20150803T170236_20160825T061733_T15SXD",
                  "20150803T170231_20160520T064257_T15SXD"]
var senti2 = ee.ImageCollection("COPERNICUS/S2").
    filter(ee.Filter.inList("system:index", senti_same))

print(senti2)

var senti2_list = senti2.toList(2);

print(ee.Date(ee.Image(senti2_list.get(0)).get("system:time_start")))
print(ee.Date(ee.Image(senti2_list.get(1)).get("system:time_start")))

// map
Map.setCenter(-91.1625, 39.2862, 9)
Map.addLayer(ee.Image(senti2_list.get(0)),
             {bands: ["B4", "B3", "B2"], max: 255*10}, "image 2")
Map.addLayer(ee.Image(senti2_list.get(1)),
             {bands: ["B4", "B3", "B2"], max: 255*10}, "image 2")


texts: Assigning from node to node in ArcGIS geometric network?

texts:
I'm really new to geometric network and geodatabase, I basically finished all the arcgis tutorial.
Anyway I cannot figure out how to fill a from_node and to_node fields in a polyline shape with ids of the junctions feature (added during the geometric network creation).
Topology of the network is fine...


texts: How to export specific DDPs from a set of DDPs?

texts:
I have a set of data driven pages and I would like to have a string parameter in the tool that allows me to export specific pages from the set of data driven pages. An example would be if I had a set of 50 pages, I could just enter "1-10, 20, 35-40" and it would export only those pages.

import arcpy

inputList = arcpy.GetParameterAsText(0)
bckGrndLyrs = arcpy.GetParameterAsText(1)
pageRng = arcpy.GetParameterAsText(2)
outputLocation = arcpy.GetParameterAsText(3)
exportDPI = arcpy.GetParameterAsText(4)

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]

for lyrs in arcpy.mapping.ListLayers(mxd, "", df):
    if lyrs.name in inputList:
        lyrs.visible = False
    elif lyrs.name in bckGrndLyrs:
        lyrs.visible = True
    else:
        lyrs.visible = False

for inFC in arcpy.mapping.ListLayers(inputList, "", df):
    if inFC.name in inputList:
        arcpy.AddMessage("Activating " + inFC.name + " Layer")
        inFC.visible = True

        for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
          if str(pageNum) in pageRng:
              mxd.dataDrivenPages.currentPageID = pageNum
              blockName = mxd.dataDrivenPages.pageRow.Block
              for titleItem in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
                  if titleItem.name == 'EditedTitle':
                    arcpy.AddMessage("...Changing title to " + inFC.name)
                    titleItem.text = inFC.name + str(pageNum)
              arcpy.AddMessage("......Refreshing Dataframe")
              arcpy.RefreshTOC()
              arcpy.RefreshActiveView()
              arcpy.AddMessage(".........Exporting " + inFC.name + " " + blockName + " as PDF")
              arcpy.mapping.ExportToPDF(mxd, outputLocation + "/" + inFC.name + " " + blockName + ".pdf", resolution=exportDPI)
        inFC.visible = False

del mxd


texts: Moving map extent by x millimeters to left or right in QGIS Print Composer

texts:
I have a layout with a map item and want to move the map itself (the extent, not the item) 5mm to the right. I am using a coverage layer with atlas. The atlas margin does not help since it's % and adds a margin to all 4 sides.
The map has to match another map exactly when I export; moving the map item doesn't help.

I have played around with variables for the 4 extents but with no success.
Can anyone help? Any formula that would move the extent by 5 mm along the x-axis in the layout?


texts: How geoserver calculates Native Bounding Box from Oracle Layer?

texts:
I need to know, how geoserver calculates Native Bounding Box & Lat/Lon Bounding Box. I am publishing a polygon layer from oracle spatial.

In my case:

Table Records: 7679477

Native Bounding Box:

-201,637,684,178.654, -467,517,603,494.693,
13,539,194.2440532, 17,742,292.9649778

Above calculated BBOX covers a wide area, and table consists data only for a state.

I am not sure whats going wrong.


texts:
In the implementation of gdal_merge:

https://svn.osgeo.org/gdal/trunk/gdal/swig/python/scripts/gdal_merge.py

a value of 0.1 is added to the conversion from geo-referenced coordinates to pixel indexes:

tw_xoff = int((tgw_ulx - t_geotransform[0]) / t_geotransform[1] + 0.1)
tw_yoff = int((tgw_uly - t_geotransform[3]) / t_geotransform[5] + 0.1)

What is the reason for adding 0.1?


texts: Script with searchCursor crashing arcmap

texts:
I was trying to make a script that counts the max lenght found in each field of a table with data in it, but it immediately crashes arcmap upon executing

I know there might be a tool available on the internet, but I need to learn how to do it myself

Parameter(0) is a table input

Parameter(1) is a multi select fields input from the table

Code :

#Created By: Gabriel Canto
#Date: Julho 2016

#Import modules
import arcpy

#Variables
table = arcpy.GetParameter(0)
fields = arcpy.GetParameterAsText(1).split(";")
fieldnames = {}
stringfield = ""

#Creating the fields parameter string
for field in fields:
    fieldlenghts[field] = 0
    stringfield = stringfield + "'" + field + "',"

#Removing the last comma
stringfield = stringfield[:-1]

with arcpy.da.SearchCursor(table,[stringfield]) as rows:
    for row in rows:
    for field in fields:
        try:
            s = str(row.getValue(field))
            if fieldlenghts[field] < len(row.getValue(field)):
                fieldlenghts[field] = len(row.getValue(field))
        except:
            arcpy.AddMessage("Field " + field + " can't be a string")

output = ""
for field in fields:
    output = field + " : " + fieldlenghts[field] + " caracters\n"

arcpy.AddMessage(output)


texts:
When opening GPX routes I found on the Net, sometimes, they look like this in eg. RideWithGPS, but are displayed OK in Google My Maps or GPSVisualizer:

Incidently, GpsTrackEditor triggers a warning: "Adjust Time: Some points of a track do not have valid timestamps."

What is the source of the problem, and why are GMM/GPSV happy with it?


texts: Selecting all connecting lines until dead-ends using ArcMap

texts:
I currently have a layer with line segments and points, and I'd like to select all connected line segments from a point to dead ends.
I've tried looking into create routes, traces and dangles, however these all seem overly complex for what I am trying to achieve (essentially some sort of logic which keep selecting connected lines then terminates when no connection are found. Unfortunately I don't have access to any network analysis packages, I only have ye old' ArcMap 10.6.
I've attached what I would envision the output to look like. Note the red dotted outline isn't required. Any pointers would be helpful, it seems so simple but yet I can't find anything!


texts:
I have population data matched with polygons and a set of points that I have drawn buffers around. Assuming that the population within each geographical area, i.e. the polygons, is evenly distributed, how do I calculate the population within each buffer? I need to do this in QGIS.

(1KM is the buffer and befolkning_i grkrets is the polygon.)


texts:
I've got a raster layer separated into 3 zones, representative of marine park zones. What i'm trying to do is make it so that where zone 1 is adjacent to zone 3, there is a "buffer" between them, of zone 2. How would I go about this?

i want a small buffer zone of the blue zone, where ever the red and green zones are adjacent to one another. short of cracking open photoshop and drawing it in myself, is there a way of doing this:  in arcmap?


texts: Developing GIS viewer on ArcGIS platform (ArcReader, Java Runtime)?

texts:
I was wondering if you could give your input/opinion on what to use.

I am looking into developing a small scale GIS viewer that could possibly edit the information locally (Edit would entail drawing on the map, but not data) and searching for assets on that map.

Is ArcReader something that can be customized with add-ins? thats something I was looking into.

What id really like is for a program to be able to view the maps with simple user tasks (drawing, searching...) that is portable.  any ideas or direction on where to start? I was thinking the arc run-time (java).


texts:
I have GeoServer with Postgres and PostGIS bundle installed.
I have also sucessfully imported my osm map using osm2pgsql.

I'm following this tutorial from this site, Link and reached this step in which the author said about SLD filtering/styling.

Upon researching, I found out there are 2 github that provides the SLD already in which, they are: GithubLink1 GithubLink2, in which one of them says to

  Add .sld files into "styles" directory.
  Add "symbols" directory into "styles" directory.
  Create new styles from GeoServer administration website.

How do I do that, and am I on the right track?


texts:
I just started using PyQGIS and I am not familiar with many of the commands.

In ArcPy, you can use the command arcpy.ListFields to print out the fields present in a shapefile. I'm wondering if there is an equivalent command in PyQGIS?

I am working in Python 3.6 and QGIS 3.0 Girona.


texts: Pyqgis import non-spatial CSV to Qgs project

texts:
I'm trying to upload a .csv file to my QGIS project via Pyqgis. According to the following thread Using non-spatial CSV with PyQGIS it should work that way:

uri = 'file///C:/Users/denni/Desktop/test.csv?delimiter=;'
table = QgsVectorLayer(uri, "table", "delimitedtext")
QgsProject.instance().addMapLayer(table)

But I only get an empty layer in QGIS. I can't find the mistake in my code. What is wrong? The delimiter in the test.csv file is a ";", so that's not the problem. The path is correct. The script uploads a layer to QGIS so I guess the line 3 is correct as well...


texts:
I am displaying a CSV file in ArcGIS 10.  After adding the data table, I right-click it, and select "Display XY Data".

I am able to complete the required information and display the data, however, I receive the following error message.

  The table you specified does not have an Object-ID field so you will not be able to select, query, or edit the features in the resulting layer, or define relates for them.

Because of this, I'm limited in what I can do with the newly visualized data.

Is there a specific column that should be added to the CSV file that ArcGIS will interpret as an Object ID?  I've tried a few namings, but keep getting the same message.


texts: Distortion when using SpatialPolygons and SpatiaPolygonsDataFrame

texts:
Using library rgeos I tried to plot a map using a shapefile I have (it is loaded as a SpatialPolygonsDataFrame) with some geometric objects (squares and circles defined as SpatialPolygons).

I do it like this:

plot(map)
plot(geometricObjects, add=True)

but as a result The geometric objects are disfigured and the circles look like ellipses. What is a reasonable way to fix this issue (plotting the objects first and adding the map results in the map being disfigured).


texts: QGIS Topological editing error - the new polygon overwrite the existing one after saving layer edits

texts:
I'd like to digitalizing a map and when I draw a new polygon which overlaps an existing one, at first it merges the boundaries correctly, but after i'm saving the layer edits, the new boundaries overwrite the old ones. I enabled topological editing. Anybody knows why does the QGIS do that?

I attached screenshots:


texts: Get List of manualy selected features on MXD and run script on selected features :

texts:
Using arcgis 10.3, I trying to write code that when i do selection on layer manualy on MXD (not in the script) and run the script, the script need to run just on the selected features.
I have tried -

layer = "Source Layer Path"
desc = arcpy.Describe(layer)
selected = desc.name
print (selected)

but it returns an empty list, is there a way to this in python?

I have tried this :

dataFrame = arcpy.mapping.ListDataFrames(Mxd)[0]
Layers=arcpy.mapping.ListLayers(Mxd, "", dataFrame)[0]
desc = arcpy.Describe(Layers)
selected = desc.Fidset
print ("selected = "+ str(selected))

Still same result


texts: Fill a comboBox with the result of a query to sqlServer

texts:
I need to fill a comboBox with the result of a query to sqlServer, this result is filtered according to the data that was entered in
the batch field

Try doing it with pyodbc, but when the form is opened, the list is empty, when I give OK the data appears, but in each execution they are duplicated.
I'm starting with pyqt5 and maybe it's not the right way to do it.

def run(self):

        sqlcmd = ("SELECT sec.Nombre  FROM [Lote] lot \
                                           inner join [Seccion] sec on sec.idInforme = lot.idInforme \
                                           Where idLote = '%s'") % \
                 (self.dlg.lote.text())

        cursorLista.execute(sqlcmd)

        for i in cursorLista:
            self.dlg.comboBox.addItem(str(i[0]))

        # show the dialog

        self.dlg.show()
        # Run the dialog event loop
        result = self.dlg.exec_()
        # See if OK was pressed
        if result:

            # Do something useful here - delete the line containing pass and
            # substitute with your code.

            pass


texts: OpenLayers 2: WFS layer not being portrayed in map canvas

texts:
I have a "rich" application (OL 2.13 + GeoExt 1) where some layers
must be styled dynamically according to user input. I am able to add a
vector layer using WFS and then apply a style rule. Recently, some
users started complaining the feature is not working. Eventually I
found out some WFS layers are not being portrayed in the map canvas by
OL.

Below is a minimum example with a simple map and one of the
problematic layers. After loading all objects the debugger shows a
vector layer within the map object; this vector layer is reported as
visible and with the drawn property set to true. In the features array
there are 8 objects as expected, but there is nothing visible in the
map. There are no errors reported in the console.

I am able to display this same layer through WFS in QGIS and access
all its attributes without trouble.

What is going wrong here?

 <link rel="stylesheet" type="text/css" href="http://localhost/spatiallib/OpenLayers-2.13.1/theme/default/style.css">

     <input type=button value="Click for debugger" onclick="debugger;"></input>


texts: I just installed QGIS 3.6. How can I update OpenLayers plugin? I tried to georeferenced Google Earth but I was not able to source Google OpenLayers plugins. I wish I can get a link to download.


texts: Extract raster data based on a polygon's attributes

texts:
I have a land use layer with a map of the United States overlaid on top. I'd like to determine the percentage of different land uses in each state. Would the best way be to extract by mask by using each state and then calculating within each state?

I am very much a novice GIS user so any assistance/guidance would be incredibly useful! I am using ArcGIS 10.


texts: Create a shapefile from geometry with OGR

texts:
As I see from the GDAL/OGR available solutions, most of the new OGR data sources (shapefile etc.) are being created from an already existing similar file. This way many steps of directly creating Layers, Fields and Attributes are avoided and thus makes life much easier to manipulate the existing structure of a vector layer.
I wonder however how to :

Create a simple geometry (a line)
Create a shapefile from scratch
Put the geometry inside the shapefile and save it to the disc

Here is the code that I have so-far prepared.
import sys
from osgeo import ogr
from osgeo import osr

# Creating a line geometry
linegeo = ogr.Geometry(ogr.wkbLineString)
linegeo.AddPoint(54,37)
linegeo.AddPoint(62,35)
linegeo.AddPoint(70,38)
linegeo.AddPoint(74,41.5)

# Set up the shapefile driver
driver = ogr.GetDriverByName("ESRI Shapefile")

# create the data source
ds = driver.CreateDataSource("line.shp")

# create the spatial reference system, WGS84
srs =  osr.SpatialReference()
srs.ImportFromEPSG(4326)

# create one layer
layer = ds.CreateLayer("line", srs, ogr.wkbLineString)

At this point I think I need to somehow use the "ogr.FieldDefn()" in order to place the above created line geometry inside the newly created layer.
How do I do that?


texts: How can I set Style text from attribute in Openlayers

texts:
I have a feature layer in my application.

    let layer = new OlLayerVector({
        source: vectorSource
    });

So I need to set a style for this layer. But style should write attribute value as text.

    let layer = new OlLayerVector({
        source: vectorSource
    });

    styles = new Style({
        image:  new Circle({
              radius: 5,
              fill: null,
               stroke: new Stroke({color: 'red', width: 1})
            }),
        text:  new Text({
            text: // this comes from attribute.
        })
    });

This text will come from attribute value. Can I use formatted style text like "${name}" ?

(If I use style function, this function called for every feature. For example if I have 1000 features, createStyleFunction called 1000 times.)


texts:
It is a very simple script, but I cannot figure it out.

The script is to create a list containing the constant images from 0 to 32, and then display them.

var test = ee.List.sequence(0,32).map(function(i){return ee.Image.constant(i); });
print(test);
Map.addLayer(ee.ImageCollection(test),{},'test');

The error is:

test: Tile error: Expected a homogeneous image collection, but an image with an incompatible band was encountered. Mismatched type for band 'constant':
Expected: Type<Float<0.0, 0.0>>.
  Actual: Type<Float<1.0, 1.0>>.
          Image ID: 1
This band might require an explicit cast.


texts: QGIS point sample tool faster than in PostGIS - how to improve query?

texts:
My points table has 246,338 features and the polygon table has 43,957 features. I am relating the values of one attribute from the polygons to update a column in the points table.

This question is similar to Speed up point sampling with ST_Value function in PostGIS, raster/vector overlay but that question specifically addresses point sampling of raster, not polygons, using ST_Value, and the optimum raster tile storage size.

Both tables have had maintenance performed and have spatial indexes that are updated. The polygons are records of fertilizer application rates applied to a field and are fairly messy with plenty of overlaps:

The polygons table has been checked for invalid geometries and those have been fixed. Running ST_NPoints tells me there are an average of only 5 vertices per polygon so ST_Simplify is not necessary. The average polygon size is 112 m2 and range from 0 (only 60 of them) to 826 m2. I cannot dissolve (ST_Union) polygons on anything because I need the unique numeric fertilizer values from those individual polygons.

I've tried two queries in PostGIS, but have abandoned them after running them for a few hours:

Query 1:

update points
set fert_rate = rate
from points a, polys b
where st_intersects(a.geom, b.geom);

Query 2:

with pnt_sample as (
  select rate
  from points a, polys b
  where st_intersects(a.geom, b.geom)
)

update points
set fert_rate = pnt_sample.rate
from pnt_sample;

Having QGIS read the tables from the DB and run the 'point sampling' tool takes only a couple of minutes. However this is not the optimal solution for many reasons, particularly because the output must be saved as a shapefile, headers are truncated to 10 characters, and then must be imported back into the DB, header names fixed, etc.

My questions are:

What is QGIS doing in its algorithm that I don't have in my query?
How can I incorporate that advantage into my approach so I don't have to go
outside of my database?

I would like to keep any suggestions/solutions within PostGIS/QGIS.

I'm using PostGIS 2.4.1 and QGIS 2.18.14 on a Windows 10 machine.

EDIT: In response to John Powell and Thingamubob's comments, I ran EXPLAIN ANALYZE on the two queries above. Both tables had vacuum/analyze performed just prior to running EXPLAIN ANALYZE. Here is the output for the result of the first query:

And here is the output from the second query, the one using the CTE:

Each of these EXPLAIN ANALYZE queries took about an hour to run.


texts: Field does not exist ERROR 000728 from ArcPy

texts:
The X Coordinates and Y Coordinates exist in the csv. However, I still get this error. Can anyone help?

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000728: Field X Coordinates does not exist within table
ERROR 000728: Field Y Coordinates does not exist within table
Failed to execute (MakeXYEventLayer)

# Description: Creates an XY layer and exports it to a layer file

# import system modules
import arcpy
import csv

arcpy.env.workspace = "C:/GEO345/Lab4/Lab4/"

# Set the local variables
in_Table = "C:\\GEO345\\Lab4\\Lab4\\Crimes_-_2010.csv"
out_Layer = "crime_2010_layer"
saved_Layer = r"c:\GEO345\Lab4\Lab4\crime_2010.lyr"

# Set the spatial reference
sr = arcpy.SpatialReference(4326)

# Make the XY event layer...
arcpy.MakeXYEventLayer_management(in_Table, 'X Coordinates', 'Y Coordinates', out_Layer,
                                  sr)

# Save to a layer file
arcpy.SaveToLayerFile_management(out_Layer, saved_Layer)


texts: Process 100 of feature classes through script and fc name to end of each output

texts:
I have about 100 tiled 'area of interest' polygons in a geodatabase that need to be processed through my script. My script has been tested on individual tiles & works great. I need advice how to iterate this process so I don't have to run one at a time. (I don't want to iterate ALL 100 at once in case something fails - I just want to make a list or something to run about 10-15 at a time). I also need to add the tile name that I am processing to each feature class that I output.
So far I have tried using fnmatch.fnmatch which errors because it does not like a list. I changed syntax to parenthesis which did NOT error but did NOT print anything.
I figure once that naming piece is done, running the process in the for loop should work. What I am doing wrong or is there is a better way?
This is just a snippet of the full process:
tilename = 'T0104'

HIFLD_fc = os.path.join(work_dir, 'fc_clipped_lo' + tilename)
HIFLD_fc1 = os.path.join(work_dir, 'fc1_hifldstr_lo' + tilename)
HIFLD_fc2 = os.path.join(work_dir, 'fc2_non_ex_lo' + tilename)
HIFLD_fc3 = os.path.join(work_dir, 'fc3_no_wilder_lo' + tilename)

arcpy.env.workspace = (env_dir)
fcs = arcpy.ListFeatureClasses()

tile_list = ('AK1004', 'AK1005')

for tile in fcs:
    filename, ext = os.path.splitext(tile)
    if fnmatch.fnmatch(tile, tile_list):
        print(tile)

        arcpy.Clip_analysis(HIFLD_fc, bufferOut2, HIFLD_fc1, "")
        print('HIFLD clipped for analysis')

        arcpy.Clip_analysis(HIFLD_fc, env_mask, HIFLD_masked_rds, "")
        print('HIFLD clipped by envelopes and excluded from analysis')

        arcpy.Clip_analysis(HIFLD_masked_rds, wild_mask, HIFLD_excluded, "")
        print('HIFLD clipped by wilderness mask and excluded from analysis')

        arcpy.MakeFeatureLayer_management(HIFLD_fc1, 'hifld_lyr')
        arcpy.SelectLayerByLocation_management('hifld_lyr', "COMPLETELY_WITHIN", bufferOut1, "", "NEW_SELECTION", "INVERT")
        if arcpy.GetCount_management('hifld_lyr') > 0:
            arcpy.CopyFeatures_management('hifld_lyr', HIFLD_fc2)
            print('HIFLD split features deleted fc2')
        else:
            pass


texts: Main research areas currently under development for Geographic Information Science?

texts:
What are the main areas under active research and development for Geographic Information Science (GISc) i.e. what areas need further R&D?

Some "hot-topics" for GISc may be modelling, simulation, temporal representation.


texts: Geo-referenced UAV image does not align with Sentinel-2

texts:
I have high resolution images, georeferenced using google satellite images on QGIS. I overlay the image on top of sentinel-2, I see some areas do not match or shifted (e.g. river).  Does anyone have this problem and know how to solve this?

When I just see the google satellite images, they do not match exactly with Sentinel-2 images when I zoom in. I'm using information from high resolution images to train and use them to classify land types, so it is important that they match exactly.


texts: How to access the timestamp value from Overpass meta requests with Openlayers.Format.OSM?

texts:
I am using Overpass-api to request data, then display it in an interactive webpage using Openlayers. When user clicks on some feature, the information is shown in popup.

As of now, the page is working nicely and displays all the tags.

I want to add the "last updated time" of the feature in the popup, which will correspond to the "timestamp" value in the "Overpass-api meta request" but i cannot access that value.


texts: I am looking to create a least cost path for a pipe line based on a landslide risk map. I was wondering if a least cost analysis has the possibility to put additional constraints on the pathing i.e 90° turns cost more. with the goal that the path it takes is mostly straight where possible?


texts:
I have loaded rasters from PostGIS and Oracle Spatial 11g with below script. Both layers are visible in QGIS Dekstop. My OWS settings are correct but the Oracle raster layers are not visible in QGIS-Web-Client.

Why are these not visible?

uri = QgsDataSourceURI()
uri.setConnection("localhost", "5432", "MYRASTER", "postgres", "password")
connString = "PG: dbname=MYRASTER host=localhost user=postgres password=pass port=5432 mode=2 schema=public column=rast table=demelevation"
layer = QgsRasterLayer( connString, "My Postgres Raster" )
QgsMapLayerRegistry.instance().addMapLayer( layer )

#Connect to Oracle and Fetch Table Names
con = cx_Oracle.connect('ins/ins@189.88.22.122:1521/mydb')
print con.version
cur = con.cursor()
cur.execute(u"select DISTINCT RASTERID from MASTER_RDT ")
tables = cur.fetchall()
print tables

print "Layer loop"
for t in tables :
   print str(t[0])
   conn1="geor:ins/ins@189.88.22.122:1521/mydb,"
   conn2="MASTER_RDT,"
   conn3= str(t[0])
   vlayer=QgsRasterLayer(conn1+conn2+conn3,conn2+conn3)
   QgsMapLayerRegistry.instance().addMapLayer(vlayer)


texts: MapInfo Pro 16, getting polylines in my polygon, after enclosing

texts:
I'm a novice user of MapInfo (using for a couple of months). Recently I have been encountering a problem when converting polylines to polygons. After digitizing an area using polylines, I use the enclose (polylines to regions) option to create my polygons, (one table with individual polygons).

For some reason (not all the time) when I have then open this table I have my polygons but also the table still contains polylines. What am I doing wrong? I only what a table that contains polygons.

I've added a screenshot below. I'm sure I'm missing something very obvious


texts: Adding time dimension image layers using Leaflet

texts:
JavaScript beginner here. I'm working on getting a weather animation done in leaflet. A suitable plugin appears to be leaflet.timedimension but I would be open for other options too.
I have 60 PNG files which represent times from t+0 to t+180. The files are named name-100.png to name-160.png. The start time index is known.
The goal is to add one overlay to my map which allows the user to scroll through the time indices and view the corresponding overlay.
I have checked through the documentation and also the examples for leaflet.timedimension, especially, example no. 10, which should basically do what I want, but I can't yet make heads or tails of it.
I'd be very grateful for either some pointers, examples or alternative solutions.


texts:
I have soil data rasters from SoilGrids.org that have some small holes with NA cells (White spaces in the image) that I want to fill using some interpolation method to get a more spatially continuous raster for further analysis. I have found some options in SAGA (e.g. Close gaps) and GRASS (e.g. r.fillnulls) that seems to do the job but I am having problems to implement them in my workflow in R. I have found  meteo::rfillspgaps , but it takes too much time and seems to never ends.
Is there any other function or solution in R?


texts:
I'm formatting a Personal Geodatabase on ArcGIS 10.1 and I came across a important issue. I have this particular field that I want to limit to 5 particular entries.

So, the result being that I don't want any user to insert different entries from those I established. Is it possible? If it is, can you point me towards it?


texts: Error on 'Extract raster values (CSV)' - Error executing algorithm 1 'Dataset' object has no attribute 'mapToPixel' See log for more details

texts:
I would like to extract raster values at some locations (point shapefile) in 'csv' format. I use 'Point Sampling Tool' and it works well for a raster file. However, I have hundred of raster files (rainfalls) which need batch process to work on extracting the raster values.

I have tried 'Extract raster values (CSV)' in the processing tool but the error message pops up (Error executing algorithm 1 'Dataset' object has no attribute 'mapToPixel' See log for more details). Both vector and raster files have the same projection (WGS84). I already add 'mapToPixel' attribute in the point shapefile but the error still exists.


texts: ArcGIS Pro geoprocessing tool parameters - default settings

texts:
I would like to set my ArcGIS Pro geoprocessing tool parameters to a default value for repeated routine update cycles. The primary tools I'm using are "Create Vector Tile Package" and "Create Mobile Map Package". For example, in the "Create Vector Tile Package" settings, I'd like to have the "Package for ArcGIS Online, Bing Maps, Google Maps" option automatically set to be unchecked.

How could this be accomplished?


texts: Calculate polygon area percentage of another polygon in QGIS

texts:
I have two polygon layers, first is Taiwan County, came with SHP file.
Second is pre-processed WGS84 points, I've converted it to WKF format.

I've successfully imported the two layers in QGIS:

https://goo.gl/photos/ypxLMqRgmgF9PoiM9

Yellow means the grid(polygon) is 100% in one county, and the brown is in more than one county.

Data Format :
Taiwan SHP layer , Name : Taiwan , Column : Town_id,County_id
Grid Layer , Column : GID , Polygon (in wkf format)

I want to calculate the percentage of each county that contains the grid(polygon) and result in the format.

GID County_ID  Town_ID Percentage
300 1          1       0.6
300 1          2       0.4
301 1          1       1
302 1          1       1
303 1          1       0.8
303 1          2       0.15
300 1          3       0.05


texts: How to average values in a point layer with respect to polygon layer in QGIS?

texts:
I am new to GIS and have the following problem:

I have 2 layers: a point layer with a column that contains numbers (pollution index from specific measurement point) and a polygon layer with different regions.

And I want to answer the following question: what is the average pollution for each region. So I need compute the mean for all points in each region. How can I do that in QGIS?

Thank you very much!!


texts: Adding Maximum and Minimum Latitude and Longitude as features in ArcGIS for Desktop?

texts:
I have an Excel file with the coordinates (Latitude/Longitude) for an area. The file contains the coordinate of two corners in the latitude/longitude format.

How can we do to use Python to iterate the process for all coordinates and to export into XY coordinates?

Example of my file:

N°1:  Min_Long   Max_Long  Min_Lat   Max_Lat
     1.5        2.833      6.25         7.33

N°2  -13        5          10          25

...
...

Or else is there a tool in ArcGIS similar to "Add X,Y Data" in ArcMap, that can be used to automatically add this lat/long format?


texts: Embedding a Leaflet user click Lat, Long into PostGIS SQL?

texts: I have ran the SQL through a web browser and can connect to the server which returns the result. I just can't get it to work in Leaflet. Any suggestions?


texts:
I got an app to do there is a map and lots of points which represent a pictures, for example i got 3 pictures in 1 coordinate, and other pictures has other identical coordinates. But now i need once i click on point in the map which should open a gallery of pictures taken at that coordinate... But i ran into an issue that only it gets one picture, not 3...

here is my code:

var displayFeatureInfo = function (pixel) {
var feature = map.forEachFeatureAtPixel(pixel, function (feature) {
    return feature;
});

var info = document.getElementById('info');
if (feature) {
    var thumbUrl = feature.get('url');
    $.ajax({
        url: thumbUrl,
        dataType: 'JSON'
    }).then(function (data) {
        info.innerHTML = "
" + feature.get('caption') + "
 " +
        '
';
    })

} else {
    info.innerHTML = '&nbsp;';
}

if (feature !== highlight) {
    if (highlight) {
        featureOverlay.getSource().removeFeature(highlight);
    }
    if (feature) {
        featureOverlay.getSource().addFeature(feature);
    }
    highlight = feature;
}

};

here is the loading of pictures:

function loadImages() {
///Below url is from PSN personal onedrive. Exchange with relevant other
///https://api.onedrive.com/v1.0/drive/root:/Billeder/2012%20Leshoto:
var sourcePhoto = new ol.source.Vector({});

$.ajax({
    url: url,
    dataType: 'json',
    // beforeSend: function(xhr){xhr.setRequestHeader('Authorization', token);}

}).then(function (data) {
    //we process the data into features we can add to our map
    var items = data.value; //all images in folder
    for (var i = 0; i < items.length; i++) {
        //only if geo images
        if (items[i].location != null) {
            var itemUrl = "https://api.onedrive.com/v1.0" +
                items[i].parentReference.path + "/"
                + items[i].name +
                "?expand=thumbnails,children(expand=thumbnails(select=large,c200x150_Crop))&access_token=" +
                token;//.thumbnails[0].large.url, // url to the full image
            var pos = new ol.geom.Point(new ol.proj.transform([items[i].location.longitude, items[i].location.latitude], "EPSG:4326", "EPSG:3857"));
            var feat = new ol.Feature({
                geometry: pos, //the geomtry that maps the image on ground
                url: itemUrl,
                caption: '', //Image title
                thumbnail: '' //a thumbnail represenation of the image
            });
            sourcePhoto.addFeature(feat);
        }
    }
    layPhoto.setSource(sourcePhoto);
    map.addLayer(layPhoto);
})

}

So forEachFeatureAtPixel only returns one feature of only one picture, but not for all pictures. So my main question is when i addFeature on loadImages function should I somehow assign it like an array of photos to that coordinate and not as entity ?


texts: ArcGIS server can not be used in Mobile browser and Firefox browser/ ArcGIS Javascript

texts:
I am using ArcGIS JavaScript API to develop a web page to consume services from ArcGIS Server. The page loaded good in Chrome browser but not work for Firefox, and also both Android and Safari mobile browsers have issues of loading the map.

For example,

var pointlay = newArcGISDynamicMapServiceLayer("https://server.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer",{"opacity":0.5});

map.addLayers(pointlay);

this code works well when using map service(layer) from ArcGIS Online, but have issues when I changed the url from my own ArcGIS Server.

Anyone know where is the problem?


texts: Problems in viewing ArcGIS webservice from MS Windows

texts:
We setup web GIS service using the combination of ArcGIS Server and Oracle. We put the spatial data in Oracle and use ArcGIS Server to publish the service.

Currently we have a problem in viewing the web GIS from computer using MS Windows, but can view it using Ubuntu Linux and Mac OS X. If we view the service using MS Windows, sometimes all of the function works but most of times they fail.

I would like to ask you if some of you had this kind of problem? If so, please kindly hint me to a solution.


texts:
I have a road network (in shapefile) which is in a projected system (e.g. EPSG:2100). I also have a number of GPS files in WGS84.

I have already stored the data into Oracle 12c (Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production) using just the Locator (and not Spatial and Graph).

I want to perform the following actions:

Create buffered geometries from the existing road links (i.e. linestring to polygon).

Transform the GPS points from WGS84 to EPSG:2100.

Match the (transformed) GPS points with the buffered road links.

When the data are displayed on a web page (with leaflet.js), I want to be able to define an area and select only the links and GPS signals contained in that area.

Will the Locator suffice for that? Obtaining license for Oracle Enterprise and Spatial and Graph is out of the question.

Trying to clarify things a bit further and make the question simpler, all I am asking is if the Oracle's equivalents of PostGIS' ST_Transform, ST_Buffer and ST_Contains are freely available with the Locator or the (paid) Spatial and Graph is required.


texts:
For 120 datasets, which I already loaded into carto and are shown where they are supposed to be shown, I want images to be viewed as well.

In my thinking it should have been enough to put in an URL for each dataset in the "image_url" field but it won't work... Is there a simple explanation, what I can do? Do I need html-skills, which I don't have...?

I want pictures for every dataset...so simple :-)


texts: Where are the address ranges in OpenStreetMap?

texts:
I recall coming across some OSM initiative that was proposing to put US address ranges in the data using TIGER (I think). However, I have seen no such ranges in any of the data I have looked at so far.
I am wondering if anyone has noticed this kind of information or can point me in the direction of concrete descriptions of its existence (or lack thereof). If it does not exist, is there a method for extracting address ranges from what is given in nodes and ways?
I know the data can be very spotty, but assuming a perfect world of open source data editing, if a way is comprised of nodes that each have an address, could one extrapolate To-From address ranges for the left and right side of the line?


texts: Is there a way to store time-bounded geometries in PostGIS?

texts:
I work with American Community Survey data. ACS is now releasing new demographic data annually, and a new set of TIGER/Line files to go with it. But the vast majority of the geographies (states, counties, tracts, ZIP codes) do not change annually, and larger geographies (states and counties) are stable for decades.

In order to conserve server space, I'm thinking about trying to store these geometries with effective dates (start and end years), and then querying by the desired year. There is a shapefile like this for international boundaries created for the CShapes R package (http://nils.weidmann.ws/projects/cshapes). Polygons representing country boundaries over different years all overlap in the shapefile, but to get the countries for a specific year you just have to query:

WHERE 2010 BETWEEN cowsyear AND coweyear

where the fields cowsyear and coweyear represent the start and end years for each country.

This doesn't seem like it would be that difficult to implement in PostGIS, using a base table with all times and views that select time slices. I would also need to input all geometries for each new year and test for equality to eliminate redundant geometries and alter the time bounds. My question is whether anyone has done this and has recommendations for how to proceed or any code I can steal.


texts:
I have a DEM and a virtual raster of Sentinel-1 images over a year. I managed to create a view from above with the plugin "Raster Timeseries Manager" which allowed me to merge all my Sentinel-1 rasters into a .vrt file (which I can animate with the plugin). I also created a 3D map view from a DEM, and I would like to animate my VRT on my 3D map view (which is not viewed from above). However when I create my 3D map view, I can not manage to "refresh" when I animate my vrt. All I have is one raster.
Is there a way to refresh the 3D map view without having to close the window and recreate another one ?
3d view 1


texts: Rasterize shapefile using another raster's size and resolution

texts:
Rasterizing a vector (shp) I face the following problem: I want my output file (the rasterized vector) to have the same resolution and dimensions as an existing raster.

If I understand the interface correctly, the option "keep size and resolution of existing layer" should do this job. However, there is no option to choose an existing layer. Any hints?

Of course, I can achieve (at least approximately) what I want to do using the –te and –tr parameters. However it would be interesting to know if and how the "keep seize and resolution of existing layer" works.


texts: QGIS join attribute data to dxf file using EntityHandle as key field

texts:
I would like to joint attribute data (csv table or slt.) to a drawing (dxf file) imported to QGIS.

Such imported data have an attribute EntityHandle which seem to me like an AutoCAD specific 'id'. I'm not an AutoCAD specialist, therefore the question:

Can it be ensured, that this 'EntityHandle' does never change (e.g. when changing the drawing in AutoCAD)? Is this a suitable way to join attribute tables and dxf's?


texts: ArcPy updating fields from another table

texts:
I'm trying to update missing values in one .shp from another .shp. I'm using SelectLayerByLocation to identify the properties which lie within the boundaries of a suburb and then using a UpdateCursor to update the properties list with the suburbs. The code below doesn't iterate through the list correctly so all I get is the first value from the initial SearchCursor updating the properties list.

fc_P = propertyDataset
fc_S = suburbsDataset
LOCALITYList = []
query = '"LOCALITY" =\'\''
field_P = ["LOCALITY"]
field_S = ["ADMINAREA"]

arcpy.MakeFeatureLayer_management(fc_S,"Suburbs_layer")
arcpy.MakeFeatureLayer_management(fc_P,"Properties_layer", query)

arcpy.SelectLayerByLocation_management("Properties_Layer", "WITHIN",
"Suburbs_Layer")

with arcpy.da.SearchCursor("Suburbs_layer",field_S) as Srow:
    for row in Srow:
        Suburb = Srow[0]

with arcpy.da.UpdateCursor("Properties_layer", field_P) as Ucursor:
    for Urow in Ucursor:
        Urow[0] = Suburb
        Ucursor.updateRow(Urow)

del Ucursor
del Srow


texts: Analyzing population within buffer using raster population grid

texts:
I have a set of points and a population grid that is a raster file (http://sedac.ciesin.columbia.edu/data/set/gpw-v3-population-density-future-estimates/data-download). I am trying to solve how many population are within 50km, 100km, 200km, and 500km distance away from each point.

I first converted the population raster to polygon so that I could use buffer and intersect tools; however, I realized doing so loses a lot of accuracy and a significant number of population was lost from the process.

After this failed attempt, I used zonal statistics on the buffered areas. But I realized that the buffered zones overlap when the distance goes over 100km, which cause some of the data to get lost.

Ultimately, I want to calculate how many people are living within certain distances from each point by using raster population data.

Does anyone know a way around this?


texts: Why does Mapbox Studio deform my polygon layers?

texts:
I'm uploading perfect squares to Mapbox Studio, either .shp or .geojson, and the resulting layers are stretched or otherwise deformed.

Here are my polygons as seen in QGIS, EPSG:3857. They are all 50*50 meters, exactly orthogonal.

After loading them into Mapbox Studio they remain orthogonal, yet some end up getting stretched like north-south in this example, but there are also east-west stretching.

An even worse kind of deformation happens if the polygons are askew.

Here are the original polygons:

And the deformed ones in Mapbox Studio

Zooming in, you can see another deformation.

I tend to believe this is some tiling issue, where the polygons cross webmap tiles incorrectly, but have not managed to find the cause.

Has anyone encountered such a thing or knows a what to resolve the issue?


texts: ArcGIS: Adding labels to 2D FeatureLayer in JavaScript 3.25

texts:
Is it possible to add labels to a 2D FeatureLayer in ArcGIS using the JavaScript 3.25 API. I can only find examples that use Javascript 4.8 and 3D scenes.

The following code doesn't show anything:

layer = new FeatureLayer("https://services3.arcgis.com/ntG7nrNunSl8x2gF/arcgis/rest/services/SmallAreasAgeRanges/FeatureServer/0", {
    "id": "0",
    "outFields": outFields,
    "showLabels": true,
    "labelingInfo": [{
    "labelExpressionInfo": {"value": "Abc"},
        "labelPlacement": "center-center",
        "symbol": new TextSymbol("Abc")
    }]
});


texts:
I have the attached raster inside ArcGIS. I want to convert this TIFF into a KML file. I figured I would convert it based on color to the point where i have a bunch of polygons that are the different slopes but I seem to be stuck.

So far I have tried to use the layer to kml tool and when I tried this option it created a 1kb .kml file which did not show any information. I also tried to vectorize by color but that also didnt seem to work


texts: Is OpenLayers compatible with OGC WKT SRS definitions?

texts:
I'm trying to use WKT in OpenLayers.  Proj4js seems to have no problem with this but the OGC definition describes the units as "US survey foot" whereas OpenLayers has an INCHES_PER_UNIT definition of "us-ft".

Should this be addressed by registering "US survey foot":

OpenLayers.INCHES_PER_UNIT["US survey foot"] = OpenLayers.INCHES_PER_UNIT["us-ft"];

Or is there an openlayers/wkt incompatibility?

This is the wkt in question.  Normally I would use a WKID but this is a WKT test.


texts: How to convert ESRI grid file to ASCII format, or otherwise import into matlab

texts:
I need to import a climate map downloaded from WorldClim into Matlab for manipulation with the mapshow command. I am comfortable reading in ASCII grid data into matlab, but this format is not available from this website.

Available are the ESRI format with the file extension ".adf" and generic grid files with extension ".bil"

Anyone know how I can get these into matlab?


texts: Why do Web ADF Map and MapResourceManager maintain their state in session this way?

texts:
I'm using ArcGIS Server Local datasource.
ArcGIS Web ADF MapResourceManager control maintains resources added once until session is abandoned. Why does it do so? Why not just use viewstate?
Map control maintains it's state in session, too (and Toc).

The minor problem is that before adding a new MapResourceItem to MapResourceManager I have to check wether it's inside already (with normal controls I would just check for Page.IsPostBack).
The major one - how am I exposed to clear map's and toc's state (other that read default values and set them, overwriting whatever it saved into it's state; extent for example). I tried to call RefreshServerObjects() on MapResourceLocal, call GetStateFromDataSourceObjects() on IMapFunctionality retrieved from Map control. The only way that works is HttpContext.Current.Session.Abandon() which is not a solution.

So how do you either turn off storing map state in session or how do you reset that state at any time?

Just found a way to clear just map's session state without abandoning whole session:
map.StateManager.RemoveAllSessionState(false);

But the question is still up - why is it done this way?


texts: How to integrate Openstreetmap in Rails3.2 using Mongodb?

texts:
I'm planning to use Open street map in my Rails app to track locations, Can any one guide how to integrate Open street map with Rails 3.2, using MongoDB.

Thanks


texts: Exploding line into segments using QGIS?

texts:
Is there a command to explode a line feature (with many segments) into its segments?

Like this:

I have seen this: Simple automated way to split all lines in layer at vertices using QGIS?

But, I was looking for something similar that keeps everything in the same layer while editing it and does it only for the selected feature(s) not all elements. I am thinking in a simple command that takes the selected featured(s) and produces the desired output like the Split Patrs or Split Features in the Advanced Digitizing Toolbar.


texts: Processing to a Table in a python script tool not accessible via main model on Server

texts:
I have a python script running in a main model that adds new fields to a table, runs some calculations etc. I have then tried to pass the final table as a parameter (ThemeIndicators_2) from the python script back into the main model so I can connect this to the 'Table to Excel'.

This works perfectly on my local machine but when I run it on Server as a GPTool I get the following error:

c:\arcgisserver\directories\arcgisjobs\geoprocessing_dev\airogeoprofile_roi_gpserver\j225cda15bd37482c85f1f67aaddb3270\scratch\scratch.gdb\ThemeIndicators_2 does not exist or is not supported Failed to execute (Table To Excel). Failed to execute (Model2). Failed to execute (GeoProfile_RoI_2).

It seems that the output from processing of table (ThemeIndicators_2) is not actually accessible in the scratch.gdb when the job is run on server. I have tried to set it to the scratch.gdb in the tool but it's not working. See last lines of python script below:

arcpy.DeleteField_management("ThemesIndicators_1", ["IndCode"])
OutTable = os.path.join(arcpy.env.scratchGDB,"ThemesIndicators_2")
arcpy.CopyFeatures_management(ThemesIndicators_1, OutTable)
arcpy.SetParameterAsText(0, "ThemesIndicators_2")


texts:
A work-in-progress plugin's dialog window contains a rolodex which allows the user to cycle through a timeseries of data;  updating the relative memory layers geometries with each new time selection.

The script below is called upon when cycling to a new time selection.  Even though it updates the layer's geometry without problems, the layer's attribute table (if open) is updated with 'ERROR' for all of the reloaded field values.
If the table is closed and reopened after each successive timeseries change, the field value updates are successful.

Is there a means of auto-updating a memory layers constantly opened attribute table based on user interaction?

        updates = []
        trackLayer.startEditing()
        for groupIdx, group in enumerate(newPathGroups):
            for pathIdx,path in enumerate(group):
                feature = QgsFeature()
                feature.setGeometry(QgsGeometry.fromPolyline(path))
                feature.setAttributes([self.groupNames[groupIdx][0],str(groupIdx+1),\
                                       trackingRange, feature.geometry().length()])
                trackProvider.addFeatures([feature])
        trackLayer.commitChanges()
        trackLayer.reload()
        trackLayer.updateFields()

UPDATE:

Is there possibly a inverse of the following function, allowing a checksum to see if existing table is open, and if so - remove and reload?

Although I would much rather possibly access an existing open attribute table model, and refresh the data source if possible...


texts:
I’m trying to solve the following problem.
I have a regular grid of points covering Europe

nx <- 361 ; ny <- 181
xmin <- -30.0 ; ymin <- 25.0
dx <- 0.25 ; dy <- 0.25
lat <- seq(ymin, ymin+(ny-1)*dy, dy)
lon <- seq(xmin, xmin+(nx-1)*dx, dx)

What I need doing is to associate the country to each grid cell and do country operations. For example, I have to multiply the population density of France (Spain, Poland, etc) by a given factor. I have produced an ugly script for masking the grid coordinates with country’s names, but it is not very practical and was wondering if there is a more efficient way to do it.
Here is the code I have produced :

m <- matrix(1, ncol=nx, nrow=ny) # create grid with unit (or whatever) value
n <- vector(mode='character', length=nx*ny) # empty character vector with    same length as raster of grid
EUstates <- c('AUT', 'BEL', 'BGR', 'HRV', 'CYP', 'CZE', 'DNK', 'EST', 'FIN', 'FRA', 'DEU', 'GRC',
          'HUN', 'IRL', 'ITA', 'LVA', 'LTU', 'LUX', 'MLT', 'NLD', 'POL', 'PRT', 'ROU', 'SVK',
          'SVN', 'ESP', 'SWE', 'GBR')
r = raster( m, xmn=xmin,xmx=max(lon),ymn=ymin,ymx=max(lat)) # create a raster of grid 'm' to be used for masking
# now loop through EU countries for masking
for (c in EUstates){
    EUc <- getData("GADM", country=c, level=0)
    rr <- mask(r, EUc) # assigns NAN to whichever is outsided country c
    n[which(!is.na(rr@data@values))] <- c  # assign country name to cells     that are not NAN
 }
 n[which(n=='')] <-'SEA'  # all remaining empty cells assigned as 'SEA'


texts: Find bounding box for multiple features using PyQGIS?

texts:
I want to find the bounding box of several features selected by their attributes. Here's what I've been trying:

tNumList = [8,9,10,11]
selectGeom = QgsGeometry()
for tNum in tNumList:
    request = QgsFeatureRequest().setFilterExpression( u'"Territory" = {}'.format(tNum))
    iter = territoryBorders.getFeatures(request)
    feat = QgsFeature()
    iter.nextFeature(feat)
    selectGeom.combine(feat.geometry())
    print selectGeom.boundingBox().width()

Is there a better way to get a single feature from a layer then using the getFeatures(request)?

This just gives me empty rectangles. What am I doing wrong?


texts: Field Calculator: Round UP to the nearest thousand

texts:
I have a cost field in a table that I do field calculations on. The field contains values like:

1,000
2,100.00
3,500.99
4,900

I would like to use the field calculator to round the values up to the nearest thousand (unless the number is already rounded to the nearest thousand):

1,000.00
3,000.00
4,000.00
5,000.00

How can I do this with python in the field calculator?


texts: Why doesn't a CartoDB layer (using cartodb.js) on top of Google Map in Firefox on Ubuntu work?

texts:
I'm creating a layer using CartoDB.js and putting it on a Google Map base layer.

This works on every other browser and platform I have access to (IE, Chrome, Firefox on OS X), but does not work on Firefox (31.0) using Ubuntu (14.04).

I made a simple bl.ock of this. The success callback is never called, but there aren't any errors.


texts: Definition queries deleting themselves in ArcMap?

texts:
After switching to ArcMap 10.2 I've noticed that my definiton queries will seemingly randomly remove themselves. I have no idea what triggers the deletion since I have noticed it after reordering items in the TOC, turning layers on or off, adding new layers, changing the symbology, even after Applying a DQ and having it show up then hitting OK only to have it not work.

I have tested the issue with a variety of MXDs, different project files, GDBs, SHPS, different company servers, etc. The issue arises for all of them. Recently, we completely removed all things Arc and are currently reinstalling things one at a time. We thought maybe it was one of the third party extensions that I use and have narrowed it down to either the DWR addons for IWFM tools or AquaVeo's ArcHydro extension. Things were going fine for a couple weeks after adding ArcHydro, and we thought the issue was maybe a caching or temporary file thing until yesterday when the problem popped up again.

I was just curious if anyone else has run into this issue, what things were tried on your end, and if you managed to fix it without having to call ESRI (I am NOT looking forward to calling ESRI, but that's the next step in this process since we cannot pinpoint it to a specific third party extension).


texts: Generating extent of 1 ft rise in floodplain using ArcMap

texts:
I have a polygon layer that represents the max inundation extent along a stream for the one-year storm event (generated in hec ras).
If this floodplain was theoretically raised by one foot, what would the new floodplain extent look like?
This would be easier to do if the floodplain polygon was one elevation, but it's along a river so the elevation of the floodplain changes throughout the reach. I have ArcGIS Advanced Desktop and Spatial Analyst. I also have a high resolution DEM for the area.
How do I generate a new surface extent for this higher floodplain?


texts: Where can I find a list of non deliverable zip codes

texts:
Here is an interesting problem I am facing... There are certain areas within the US where the USPS does not offer postal delivery to those addresses. One example here is my Zipcode 92067 which is "Rancho Santa Fe". All homes within the 92067 zip code can only accept regular postal mail when such mail is sent to ones PO box.

So, my question here is: where can I find a list of all zipcodes or for that matter zip4s which don't have rural delivery.

Thanks in advance!

Based upon the data from Jeffery I created the following dataset, mapped and plotted the results based on those zipcodes. Here are the results of that work: https://www.google.com/fusiontables/DataSource?snapid=S441148K1ew


texts: Coloring labels in color of features automatically in ArcGIS

texts: I have map project in ArcMap. My labels on the map are one color. I want to color the labels in color as polygons, where the labels are places.


texts: GDAL/ogr2ogr .vrt driver - ERROR 1: Unable to find source field

texts:
We are using ogr2ogr to convert GML to Geopackage v1.2, using a .vrt to enforce a "schema" (reason: the greater control it offers over using a .gfs mapping file (e.g. enforcing nullable fields, mapping the gml ids to something other than gml_id)).

Per GML feature, fields only exist IF they have data. For instance, feature X may have a name and an alternateName but feature Y only has a name (no alternateName). Note: it isn't empty/null, it's just missing altogether.

This trips up ogr2ogr when that field is not provided for a particular feature (e.g. feature Y): ERROR 1: Unable to find source field alternateName

Using a .gfs does not give us this issue, but has the disadvantages mentioned previously.

Ideally, we would be able to let ogr2ogr know that we don't care if the field is found in the source data, just map it anyway (as null or empty), but I can't find any appropriate configuration option.

EDIT - i raised the following issue on the GDAL github
https://github.com/OSGeo/gdal/issues/1699


texts: When is a 3D Visualisation in GIS Useful?

texts:
I can currently only think of two cases:

to visualise potential changes in a landscape, such as the effect of adding windfarms, or the addition of a new building to an urban area. However both these examples are often done using CAD packages.

to impress an audience - which while no doubt effective to get an interest by stakeholders in a GIS, may not provide analytical benefits.

Whilst 3D data is often critical (for floodplain analysis, river profiles, geological surveys etc.) does a 3D viewer add anything?


texts: How to use ArcGIS Online Web Maps/Apps to Collect Community Input securely?

texts:
I want to set up a computer at a public hearing that runs an ArcGIS Online Web Application from my subscription account where citizens can choose from predefined editable point layers I've already created (EX Critical Safety Issue, Transportation Need) to place points in our project study area. I've already customized the point features with the attributes I want to collect (Ex: Date, Name, Address, Comment etc) in a File Geodatabase in ArcCatalog.

My first thought was to use a Web Map which allows editing of layers. However, Web Maps are not very secure i.e. a citizen could alter another persons comment and so on. Looking for a direction to take to best implement a data collection web app that allows users to choose my predefined editable layers without being able to click on other citizen comments and edit those as well.

In short, I'm looking for a more secure editable Web App template. The big application would be to post this web app on a website to collect the input of people who can't make it to  public hearings. I apologize for the long winded question but does someone have a direction I can take? I may be overlooking some very obvious concepts of ArcGIS Online but I feel I should be able to do this.


texts: How to divide irregular polygon into equal areas

texts: I am seeking to divide this 200 acre polygon into 5 polygons of 40 acres.  I have yet to find a concrete solution to this task by searching this forum.  Is there a pragmatic tool in existence that can help accomplish this task?  I am using ArcGIS 10.5.  I have attempted the fishnet tool but all that accomplished was create a grid.  Another suggestion I found (The Parcel Editor toolbar) is unavailable with my current license.


texts: Using ArcGIS field calculator to find and replace words in string?

texts:
I obtained a KML file that has the popup information already formatted as HTML. I converted the file to a shapefile to use in AGO. Unfortunately the links that are supposed to operate a search function on a site do not work because the site reads the %20 as characters and not a space. Here is a sample of the data in the PopupInfo field:

Chemicals in Inventory \t
 \t \tSULFURIC ACID
   \t \tFac. Emergency Coordinator 24-hour phones \t
 \t \t1-800-KNOWEHS (1-800-566-9347)
  \t \tEmergency Contact 24-hour phones \t
 \t \t(972) 839-6769
 1-800-KNOWEHS (1-800-566-9347)

  Last Modified:8/11/2016

I removed the %20 and replaced it with a space using the find and replace function, but the website still reads it as %20. My next guess was to just remove the name=(chemical name), but I don't know if there is a wildcard I can use to do them all at once or if I need to do them separately.

Is there a wildcard I can use in either VB or Python in ArcGIS 10.2 for Desktop?


texts:
PostGIS version POSTGIS="1.5.3" GEOS="3.3.1-CAPI-1.7.1" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.3" USE_STATS

Postgresql version PostgreSQL 9.1.2

I'm having issues inserting Curves into a PostGIS database using st_geomfromgml().  Basically I'm hitting up Geoserver WFS services and storing returned geometries.

Here is an example of failing GML;

    <gml:Curve xmlns:gml="http://www.opengis.net/gml" srsName="urn:x-ogc:def:crs:EPSG:4326" srsDimension="2">
      <gml:segments>
        <gml:LineStringSegment interpolation="linear">
          <gml:posList>-61.5681 -179.687 -61.52288589853826 -180.0</gml:posList>
        </gml:LineStringSegment>
        <gml:LineStringSegment interpolation="linear">
          <gml:posList>-61.52288589853826 -178.0 -61.5177 -179.9641</gml:posList>
        </gml:LineStringSegment>
      </gml:segments>
    </gml:Curve>

Yet if I split this up into multiple inserts like;

    <gml:Curve xmlns:gml="http://www.opengis.net/gml" srsName="urn:x-ogc:def:crs:EPSG:4326" srsDimension="2">
      <gml:segments>
        <gml:LineStringSegment interpolation="linear">
          <gml:posList>-61.5681 -179.687 -61.52288589853826 -180.0</gml:posList>
        </gml:LineStringSegment>
      </gml:segments>
    </gml:Curve>

    <gml:Curve xmlns:gml="http://www.opengis.net/gml" srsName="urn:x-ogc:def:crs:EPSG:4326" srsDimension="2">
      <gml:segments>
        <gml:LineStringSegment interpolation="linear">
          <gml:posList>-61.52288589853826 -178.0 -61.5177 -179.9641</gml:posList>
        </gml:LineStringSegment>
      </gml:segments>
    </gml:Curve>

It works fine.  What is incorrect with the original GML?


texts: Data sources are missing spatial reference data

texts:
I am trying to add a shapefile to a mxd file in =ArcGIS 10.6. When I do, I get the following error message:

The polygon is always completely off the map.
I have tried to use the define projection tool, but that does not put the polygon in the correct place. Is there another way to set the projection in the correct spot?


texts: How to display WGS 1984 Web Mercator (Auxiliary Sphere) services in Google Earth?

texts:
The basemap services provided by Esri (on ArcGIS Online, Data and Maps for Sever, and the Data Appliance for ArcGIS) use the WGS 1984 Web Mercator (Auxiliary Sphere) spatial reference (WKIDs 102100 or 3857). When they're displayed in Google Earth, they don't line up correctly (see attached). In fact, if I display a service in Google Earth from my own ArcGIS Server instance, I can often get Google Earth to crash.

Older versions of ArcGIS Online services, such as the ESRI_Imagery_World_2D service, use WGS 84 (WKID 4326) as the spatial reference, and these are projected correctly in Google Earth.

How can I get services that use WKID 3857 to project correctly in Google Earth?


texts: Multiplying files from different folders based on similar date in filename using ArcPy?

texts:
I am fairly new to Python and ArcPy.

I've been trying to get files originating from different directories and multiplying files from directory a only if directory b had files containing exact same dates within the filename.
Example of file a: 20020101_105433.img
Example of file b: 20020101.img

So I wrote this code thinking it might be able to recognise that 20020101_105433.img can be used to multiply against another file from the other directory that contains the same date within i.e. 20020101.img

import arcpy
import string
from  math import *
from arcpy import *
from arcpy.sa import *
import os
from os import listdir
from os.path import join

arcpy.CheckOutExtension("spatial")

BP = "H:\\NorthSea\\Images4AllDates\\BPnoEo\\"
Eo = "C:\\Users\\robyn\\Desktop\\NCEPre2\\Watts2Eo\\"
output = "C:\\Users\\robyn\\Desktop\\FinalPPresults\\"
arcpy.env.cellSize = "MINOF"

netSW = os.listdir(Eo)
chlKd = os.listdir(BP)

for files in netSW and chlKd:
    SW = os.path.join(Eo, files)
    filenameSW = SW[40:48]
    CC = os.path.join(BP, files)
    filenameCC = CC[35:43]
    if files.endswith(".img"):
        if (files in SW[40:48]) == (files in CC[35:43]):
        #or if filenameSW == filenameCC:
            Output = output + files
            BPI = Raster(SW) * Raster(CC)
            BPI.save(Output)
            print Output + " done"

The error number is 000732 (Dataset does not exist).

I've had a look at the re.compile module but also don't really understand it enough, essentially it should have this pattern: re.compile("[0-9]{8}") where there can be numbers from 0-9 and 8 characters in a sequence to match the pattern?

I have possibly got this wrong too.


texts: Identifying points on left or right side of street using PostGIS?

texts:
The scenario:

I have points (addresses) and multiline strings (streets) i.e., ap and street tables in my PostgreSQL 9.5 db. Table ap contains 3 rows (sample points) while street contains 85 rows. The sample scenario is shown below.

What I need:

For each point ap, I need to identify whether it is on "left side" or "right side" of the street.

The code:

On GIS SE, I found some relevant questions already. For example:

Detecting if point is on left or right side of line in PostGIS? and
Determining what side of line point is on using PostGIS?

The following code is adapted from the first link.

With cp as
(
Select
    a.gid ap_id,
    a.geom ap,
    ST_SetSRID(ST_LineMerge(b.geom), 3044) line,
    ST_SetSRID(ST_ClosestPoint(b.geom, a.geom), 3044) p
from
    ap a
Left Join street b on
ST_Dwithin(ST_SetSRID(b.geom, 3044), ST_SetSRID(a.geom, 3044), 25)
Order by a.gid, ST_Distance(b.geom, a.geom)
)
, h as
(
Select
    ap_id, ap,
    line, p,
        ST_MakeLine(p, ap) vec,
        ST_MakeLine(p,
        ST_LineInterpolatePoint(line,
            ST_LineLocatePoint(line, p) * 1.01)) seg
From cp
Order by ap_id
)
Select
    ap_id,
    degrees(ST_Azimuth(ST_StartPoint(vec), ST_EndPoint(vec)))
        - degrees(ST_Azimuth(ST_StartPoint(seg), ST_EndPoint(seg))) diff
from h
order by ap_id

The output:

The above code (for the sample scenario) works and the output is:

ap_id    diff
1       -269.999999988824
2        89.9999999946886
3        269.999999980956

Error:

However, the code for another point dataset (87 rows), throws following error:

ERROR:  line_interpolate_point: 2nd arg isn't within [0,1]

Also, the above code doesn't seem to work for cases when street is east-west having bearing of 90 degrees (Reference, here). I need to perform this task of identifying points for a large dataset. Thus, I am looking for suggestions to get through this problem. Is there any alternative way to identify whether points are on left side or right side of the street?


texts: How can I connect qt ui with qgis, which browse the data file?

texts:
I have created a form in qt designer which is basically a dialog box with line edit and a browse button to browse .csv files.

I am trying to connect this with QGIS so that as soon as a layer is loaded the dialog box pops up in which we can browse for the attribute file which is in .csv format.

I have written python logic also ,but i am not getting the dialog box asking for the file to browse.


texts: Why are ellipse polygones simplified when used in a FeatureService?

texts:
I have polygons with ellipse shape in a SDE Oracle ST_GEOMETRY geodatabase. All those polygons are correctly displayed when in a MapService. But when displayed in a FeatureService, some polygons undergo deformation. It's like they were simplified.

I'm using Oracle 11g and ArcGIS 10.0


texts: Applying JSON style from URL to Vector in OpenLayers

texts:
Can the style be a URL in OpenLayers?
var layer_offline = new ol.layer.VectorTile({
    declutter: true,
    source: new ol.source.VectorTile({
      format: new ol.format.MVT(),
      url: 'http://localhost/tile?z={z}&x={x}&y={y}'
    }),
    style: ???? // <--- This one I would need to load a JSON file
});