texts: how to remove underscore from filename in directory using modelbuilder

texts:
Does anyone have a script I can use in modelbuilder that will?:

parse an "_" from a filename
usable in modelbuilder with an inline variable (%name%) and Feature class iterator
transfer or copy the actual renamed shapefiles to another folder?

Any help or suggestions will be greatly appreciated.


texts: OpenLayers on iPhone with navigation: marker-click event won't work

texts:
I'm making a map with openlayers. For the navigation on the iPhone I added OpenLayers.Control.Navigation(), so zoom and pan work fine.
On the desktop, i can click a marker and a popup appears.
But on the phone nothing happens?

Any suggestions?

map = new OpenLayers.Map("map", {projection: mercator,
    controls: [

        new OpenLayers.Control.LayerSwitcher(),
        new OpenLayers.Control.Navigation(),
        new OpenLayers.Control.ZoomPanel(),
        new OpenLayers.Control.MouseDefaults()

        ],
        units: 'meters',
});

temp = tCoord(lon, lat);
        var feature = new OpenLayers.Feature(markerLayer, temp);
        feature.closeBox = true;
        feature.popupClass = OpenLayers.Class(OpenLayers.Popup.Anchored, {minSize: new OpenLayers.Size(320, 100)} );
        feature.data.popupContentHTML = "
" + name +"
" + desc
                                        +"
Route hierher
";
        feature.data.overflow = "hidden";

        var tempMarker = new OpenLayers.Marker(temp, icon.clone());
        tempMarker.feature = feature;
         tempMarker.events.register("mousedown", feature, markerClick);
        allPoints.push(new Array(zeilenCounter, tempMarker));

(tCoord transforms from wgs84 to spherical mercator)


texts: Using handheld GPS for sub-meter precise positioning

texts: I've heard that we could use two or more handheld GPS to get a better positioning accuracy using post processing techniques. Anybody can tell me the methodology? Also, can we program handheld GPS such that it records coordinates every second?


texts: Tippecanoe optimization and still retaining filtering ability

texts:
I'm trying to optimize our displayed vector tileset in symbollayer (In the mobile SDK). If I'm uploading the geojson as it is, I'm getting very bad performance for a number of 3500 features (Only using Points, nothing else, but the points are rather closely grouped). If I'm using tippecanoe to optimize the tiles, all is working pretty fine performance-wise. However, I'm also attempting to add some kind of filtering by property, and when doing so on the output of the tippecanoe, not all the points that match the filter expression are showing up when zooming out to a small zoom level.
I believe that maybe I'm missing some flag in tippecanoe that could help me in this case, or maybe some other thing that I could do to handle this kind of behavior.
Example geojson:
https://gist.github.com/aviadsteps/6e034097eb9f0fe3c48d021603de583b
When trying
tippecanoe -zg -o optimized_layer.mbtiles -l main --drop-densest-as-needed many_features.geojson

I get tiles that have great performance, but if I will try to filter on certain features' properties, at a high zoom level, I wouldn't see any point.
And when trying
tippecanoe -z16 -Z0 -pf -pk -B 0 -o full_layer.mbtiles -l filters many_features.geojson

I get tiles that have relatively bad performance (Especially when zooming out and in), but when filtering on the same features, at the same zoom levels, I'm able to see the points that are matching the filter.

Is there a way to get both?
In zoom level 0 in optimized_layer.mbtiles, I see only one marker. However I'm pretty sure it is possible to show a little bit more, what do I need to supply to tippecanoe to let it know that it could show more markers on a given zoom level?


texts: Looking for ArcPy tool for calculating statistics on field with summary field AND boolean fields

texts:
What I'm searching for is a tool that will sum a field by a secondary unique field AND booleans...

Let's say I have 12 table each with 4mil records and the following fields:

Donation_Amount ($ amount of a donation)
County_FIPS (county from which the donation was made)
Republican (y/n)
Democrat (y/n)
Independent (y/n)
In_district (y/n)
Individual (y/n)
PAC (y/n)

I want to summarize donations per boolean for each unqiue county fips.

Ideally the result I'd like is a table of all unique FIPS and an amount sum and count for Repub, Dem, Ind, In_District, Indiv, PAC.

Tried to get it to work with iterate in model builder and couldnt... Also read about summarize and frequency tools but Summarize seems to be limited with how many secondary fields you can use, and Frequency tool is only for ArcInfo (I need for ArcView 10.1)

Essentially I know this is simply a database process to summarize data based on secondary fields... I have heard of tools in R that do this (in Plyr and Reshape2: cast/melt) but would ideally like to do it in a program with GUI and even more ideally, in ArcMap so it wouldnt require too much shuffling of data...

Thanks all!  Much appreciated.


texts: What CRS to use for cylindrical raster world map?

texts:
I've drawn a cylindrical world map for a fictional planet. Exported it as png and scaled it, so one pixel corresponds to one km at the equator and from north to south pole.

I tried several cylindrical crs on it but it does never work out as I want and I can't find out why.
My goal: When I use the measure tool it should give me the following outputs:

Horizontal length of equator (width of my png) = 38,211km
Vertical distance from north to south pole (height of my png) = 19,105.5km
When I measure the horizontal distance where the poles are (top and bottom rim of my png) it should show 0 km because of the cylindrical projection.

How can I georeference my png to get these results?


texts: How to make sure the result of lat/lng distance calculation is correct

texts:
I'm very novice to GIS systems, and I'm trying to fulfill a requirement. I've created a small program to calculate the distance of a given lat/lng pair, based on this answer.

However, for a city like Tehran which is more like a horizontal rectangle, the width is way less than the height.

Since a small city might be regarded as a flat surface comparing to the curvature of Earth, I expect the results to be valid for visual inspection.

So I also went online to calculate the result, and from this site, the calculation again shows the same numbers, that is, the width is unbelievably smaller than the height.

To get the latitude and longitude, I simply used Google Maps and here are the values:

**leftmost latitude = 35.7267243
rightmost latitude = 35.7442993

topmost longitude = 51.4743653
bottommost longitude = 51.4347113**

Apparently I did something wrong, but I can't really make it work. Can you please help me?


texts: Seeking option to symbolize layer using chart in ArcMap?

texts:
I'm using ArcMap 10.3.1

My layer includes ~20 beach sites, along with the counts of different debris types for each site (e.g. glass debris, metal debris, etc). I want to symbolize these types in either a bar graph or a pie chart for each site, but the "chart" option is not showing up under symbology. The options are features, categories, quantities, and multiple attribute. The debris fields are all doubles.

Any suggestions on how to get an option for charts?


texts: Obtaining ghost entities with difference tool?

texts:
I have a vector map of land use for Europe. It contains square polygons which are each one from a type of land use.
As there are 19 million of entities, I would like to delete the entities that correspond to the sea as I don't need them.

So I selected all the entities that are sea.
I saved the selected features to a new layer.

Finally, I used the tool Difference (geoprocessing Tool -> difference) to do :
all my entities - sea = the entities I need.

I obtained a map that looks perfect, but the table of attributes is exactly the same that the original one : it contains the sea, so still 19 millions entities.
So what is really strange is that if I try to select sea, there is no entity, but in the table there are. I selected all the sea entities in my table and on the map nothing is in "yellow".
It's like ghost entities.

Then I really don't understand.

My QGIS version is 2.18.9


texts:
I installed Girona on Ubuntu 17.10 and it never worked for me.
I just updated Ubuntu 18.04 LTS and Qgis displays the following message:

  Traceback (most recent call last): File "", line 1, inImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10 'not found (required by / home / user / .local / lib / python3.6 / site-packages / PyQt5 / QtCore.so)

And it does not connect to the plugin repository.


texts: Regression with Nominal and Categorical Data

texts:
I am doing a project looking at the prevalence of a weeds in an area. As an example, I have the following layers:

Weeds Layer (polygons) {categorical data} Each polygon represents a point or polygon that corresponds to a certain type of weed. There are 16 weed types.
Plant Zone Layer (polygons) {categorical} Each polygon corresponds to 1 of 7 categories.
Rainfall {polygons} {Ordinal Numerical categories} Each polygon corresponds to one of 5 ranges, like 0-5 inches, 5-10 inches etc
Average vegetation height (polygons) {Numerical} Polygons representing the average height of vegetation

These layers are all projected and fit nicely on top of each other in my workspace. I want to answer questions like,
"Where does weed X occur most often? (Dry areas?, in plant zone 4?, where the vegetation is high?)

So, this sounds like something suited for correlation and regression in something like R, but things are only spatially related. I'm new to GIS and any help greatly appreciated. I'll clarify my goals if it helps.

Thanks


texts:
I am helping set up a project to gather survey data from small retail outlets in an emerging market using Open Data Kit.

Is there any established methodology to estimate how much territory a surveyor can cover in a given time?

I'm finding it difficult to estimate time and manpower requirements.


texts: How to ensure raster tabulation is in integer using 'tabulate area' tool?

texts: I'm trying to tabulate raster cells based on its values using the 'Tabulate Area' tool, but the result shows decimal values instead of integer. Is there any way I can ensure the result of the tabulation is integer?


texts: Error when trying to import DWG file in QGIS 3.10.9

texts:
I am trying to import a DWG file (from Autodesk AutoCAD 2019) into QGIS using the Import tool (Project>Import/Export>Import files from DWG/DXF).
I have been following the steps as detailed in the QGIS user manual Ch 13.1.3.4 (https://docs.qgis.org/3.16/en/docs/user_manual/managing_data_source/opening_data.html?highlight=dwg#importing-a-dxf-or-dwg-file).
I create a geopackage file target package, specify the project CRS (epsg:3857) and select the DWG file. However when I select import I get a red error message that says the following: Drawing import failed (). Another time I tried to import it using British National Grid CRS and the error message read: Drawing import failed (unsupported version).
I have also tried selecting an existing geopackage as the target package but this results in a second error message appearing in addition to the first which reads: Could not open layer list ().
Does anyone know how to fix this? Is it because it is a newer version of AutoCAD that created the DWG or?


texts: Getting distance between two point layers based on a common field

texts:
I have two point layers, related to each other by a common ID, but with very different locations.

I'd like to join them based on the ID field, but I'd also like to have the distance between them as an attribute.

My first idea was generating a line between the points with a common field and then getting its length. However, I don't know a tool that draws a line between separate point layers based on a common field.

I have a way to workaround this, but it seems messy:
I run Generate Near Table and it gives me all the possible relations between all points from feature A and all points from feature B. I run two attribute joins to get back the attributes from each table and, after that, I can select only the records where tableA.commonField = tableB.commonField.

Would it be a better way to do it? I'm using Esri Software.


texts: Can't edit data in certain columns in attribute table

texts:
I am able to edit certain attributes in my table, but not others. For any given record, I can edit all but two of the columns. Those two columns cannot be edited in any record. The non-editable records happen to be integer, though there are integer fields that I can edit.

Here's the schema

I'm editing by clicking the "Toggle Edit" button, then clicking in a field in a specific record. I can enter data for all except the circles fields.

The dbf file has not been opened/edited in anything other than QGIS

How do I enable those columns for editing?
The source data is an ESRI shapefile, if that matters. I've closed the project and reloaded it and the problem remains the same.

QGIS 3.4.2, Windows 64 bit.


texts: Modify the number format of results table from QGis Group Stats Plugin

texts:
The Group Stats plugin it great, I would like to know if it is possible to make the plugin yields its statistics values in other format that is not the scientific one. I know I can export the data and then import them into a spreadsheet but what I want is to quickly visualize the results in a thousands-like notation.

I am using QGis 2.18.21 - 32 bits, Windows 10


texts: Remote Sensing Landsat Surface Reflectance and Albedo

texts:
I'm pretty green when it comes to RS and I'm doing this school project that I need help with. The project is to measure albedo changes for the tongue of a glacier and I'm using R programming to do it. So I got my data from earth explorer and went for the surface reflectance product in order to save some steps. However, the values for these cells are higher than expected, around 2000 depending on the band. I say higher because when I use a weighted average formula for calculating albedo, which I found in some papers cited below, the outcome gives me cell values of around 1000, not the 0 to 1 I would expect for and albedo. The paper mentions its using a surface reflectance as well for this formula.

My question is, is this formula wrong? Albedo = 0.493Band2 + 0.203 Band + 0.150 Band5 + 0.154Band

Or does some other processing need to be done to my Earth Explorer Surface Reflectance Product. https://landsat.usgs.gov/landsat-surface-reflectance-high-level-data-products

Also I'm using Landsat 4-7 images.

sources:

  Pimentel, Rafael, et al. "Comparison between Snow Albedo Obtained from
  Landsat TM, ETM+ Imagery and the SPOT VEGETATION Albedo Product in a
  Mediterranean Mountainous Site." Hydrology 3.1 (2016): 10.

Also, this is really similar but uses TOA instead of surface reflectance:
http://yceo.yale.edu/how-convert-landsat-dns-albedo


texts: Aligning two rasters of same resolution perfectly on top of each other in QGIS

texts:
I have two rasters, that I managed to make in the same resolution using the 'Raster tools --> Resampling' tool by SAGA. The pixel sizes are exactly the same, however the new resampled raster, in the image it is the red, does not fall perfectly on top of the target raster (in blue).

I have checked that both rasters have the same CRS projection system, PIXEL size, dimensions, file type, but the only thing I see different is the Data Type. The Red is 'Byte' and the blue is 'Int32'. I have a feeling this difference is what is making my rasters not be aligned.

With the idea that this may be the issue, I have tried the following:

Re-doing the the 'Raster tools --> Resampling' tool once again to see if there is any indication or option where I can specify that I want my original red raster to be resampled as the target blue raster, in Int32. I have deselected the first option "Preserve data type" to accomplish this. However, this doesn't change much. (Also, choosing 'Cells' in the 'Fit' section instead of 'Nodes' only makes the pixels be further away from the raster I want to align with.)

Use the 'Align Raster' tool but I have greatly failed at this since it asks to resample two layers when I only want to resample 1. My outcome is basically the two rasters with values very different from the original rasters. Whenever I change any setting on that, it gives me a warning message that it "Failed to align rasters".

I seek help with this. I know with ArcGIS its easier to do but I only have QGIS.


texts: NHibernate spatial geometry type become NULL

texts:
I am using postgres/postgis as db and Nhibernate as ORM on a C# project.

This is the first time I try to map postgis to a .Net application. My setup uses NHibernate version 4.0.4.4000 and NHibernate.Spatial.PostGis 4.0.4.4000 (with Npgsql version 3.0.5)

I followed this tutorial in order to set up the mappings, so I have:

in the web.config

<property name="dialect">NHibernate.Spatial.Dialect.PostGisDialect,NHibernate.Spatial.PostGis</property>

for the nhibernate configuration I added

cfg.AddAuxiliaryDatabaseObject(new SpatialAuxiliaryDatabaseObject(cfg));

my xml mapping file has the following mapping:

<property name="Geom" column="the_geom" type="NHibernate.Spatial.Type.GeometryType, NHibernate.Spatial" />

and my model class has the following property

public virtual IGeometry Geom { get; set; }

Now when ever I fetch any of the geometries the property Geom is null.
In the logs I don't get exceptions nor error messages.
I don't know what else to try.

In this question, using MS sql server, he got it working because he figured out that hist current dll (Microsoft.SqlServer.Types.dll) and the required one supported different versions of Ms sql, so mapping that dll to an older version fixed the problem. Could that be the case here? how/what can I try?


texts: How to visualize different segments of a MultiLineString?

texts:
I have a GeoJSON file that describes the outline of an ice shelf; I hand-digitized the geometry from satellite imagery and DEMs.
The data consists of a MultiLineString, but some of the constituent LineStrings begin or end very close to each other.
I have to edit some of the data manually, but QGIS will only display the entire geometry in one color.
I'd like to visualize more easily where one LineString begins and the other ends.
Is there a way to show each LineString as a different color, either in QGIS or another program?
My temporary workaround is to write a Python script that will split the MultiLineString into separate LineStrings, write each one out to a separate file, and read those into QGIS.
The annoying part is that I'll then need to recombine them into a MultiLineString again, as this is the accepted schema for a whole other processing workflow that I've developed to generate triangular meshes for finite element modeling.
I found this answer which might have helped me split the MultiLineString into several LineStrings with less typing, but I'd rather just be able to see the different segments of this MultiLineString and edit it in place than go through these intermediate steps.


texts: Is there a way to set the workspace on selected features

texts:
i´ve built in a tool for arccatalog which transfers GIS Files into shape Files.
Everything is working so far, but i want it a bit more customer friendly.

Atm it looks like this:

You can right click on the file (here MapInfo .tab file) in the catalog tree and choose in the context menu "Konvertierung in WGS 1984"

then the tool interface opens and you can choose your input and output file:

But its annoying to choose all the time the input in the file system again.
I want that my selected file from the catalog tree is already listed as input data.

So my question is:

Is there any way to set the workspace from the input data in my tool TO the selected file on which i right clicked (here: Blk1403.Tab), i.e. the Filepath which is listed on the top in arccatalog.

The Tool is just a simple Model built with ModelBuilder, it contains some Py scripts and some tools from the Toolbox.
Then the Model is implemented as a Button with the Add-in Wizard.
Then it is draged & dropped into the context menu of the "Text-contextmenu" via Customize Mode.

The first py script of the Model calls the ogr2ogr.exe and looks so far right now:

# -*- coding: iso-8859-15 -*-

import sys
import string
import os
import arcgisscripting
import arcpy

gp = arcgisscripting.create()

inPath1 = sys.argv[1]

outformat = sys.argv[2]
outPath1 = sys.argv[3]

ogrstring = ' -f "' + outformat + '" "' + outPath1 + '" "' + inPath1 + '""'
callstring = '"C:\\WINDOWS\\system32\\cmd.exe /C" "R:\\RBS\\Software\\FWTools2.4.7\\bin\\ogr2ogr.exe" ' + ogrstring

gp.addmessage(callstring)

os.system(callstring)


texts: OpenLayers popup not closing on mobile device

texts:
I am developing an app that should also work on mobile devices.
I would like to close all open popups when clicking on the map (in this case only one can be open at any point, as opening a new one closes all existing ones; therefore referring to index 0 in the code snippet below).

The event has been registered like this:

itemsMap.events.register("click", itemsMap , function(e){
   closeOpenPopups();
});

And here is the function that takes care of it:

function closeOpenPopups(){
    // close popup if existent
    if(itemsMap.popups[0]){itemsMap.removePopup(itemsMap.popups[0]);}

    // unselect all features
    control_select_feature_showItem.unselectAll();
}

This works perfectly fine when testing it on non-mobile devices, but the popup just won't close on mobile devices. The strange thing: the unselectAll() works fine, so I guess I can assume that the click event is changed into a tapping event when using a mobile device (or that method would never be fired, right?).


texts: Keeping attribute table when converting from polygon-based feature layer to grid layer

texts: I am trying to transfer (or extract) attribute data from a polygon-feature class to point data. I can do this for a grid file using the Spatial Analyst-Extraction-Extract multi-values to points operation. But how do I do the same operation for a feature class layer? Or, alternatively, when I convert the feature to a grid file so I can use the operation listed above, my attribute table won't transfer to the grid table so I lose this information.


texts:
We extracted the start and end points in the link layer.

Can I buffer at the start and end points? (Size 0.001)

layer = iface.activeLayer()
for f in layer.getFeatures():
  geom = f.geometry().asPolyline()
  start_point = QgsPoint(geom[0])
  end_point = QgsPoint(geom[-1])


texts:
is it possible to create popups with images via QGIS2web?
if yes, what would be the workflow?

Couldn't it figure out yet.


texts:
I installed mapserver 6.4.1 using OSGeo4W and I created a mbtiles file for a small region of OpenStreetMap (loaded into PostGIS) using TileMill.

My questions are:

a -
Do I have MapCache? MapServer site says that MapCache is part of MapServer but I did not understand if I need to install it separately or is it 'in' the MapServer.

b -
If MapCache is not installed automatically (I assume it isn't, but I hope it is:)
How do I install it? I cannot find compiled version for Windows and I tried to build it myself but ran into problems of missing libraries etc.

c -
How do I use it to serve the mbtiles?

I managed to use MapServer via ../cgi-bin/mapserv.exe?map=...
but how do I put MapCache in the middle between the client (will be OpenLayers) and MapServer? (as I understood the cache server sits between the client and the server), or do I still talk to MapServer and it talks with MapCache?


texts: Load or display differents geojson data on zoom level for leaflet maps

texts: I have a map with 3 levels of information. The first is the country, the second the state and the last one the cities. I wonder know if it's possible to use the zoom value in order to display the different datas from my geojson file ? I think about a kind a zoom listener or maybe display the three layer but use the setOpacity link to the zoom level.


texts: How to import a multiband image into IDL?

texts:
I want to run mathematical calculation on monthly NDVI images from april to october. I stacked monthly NDVI images through april to october into an image (with 7 band) using ENVI. Now I wanna import this image into IDL. How can I do this? What kind of function or procedure should be written?

Please help me?


texts: Can I change the width of a line in a GeoServer WMS layer through OpenLayers?

texts:
I have a layer in geoserver with an SLD style, which I display in a map web app using OpenLayers2.
I want to know if there is a way to change part of the style (the width of the line geometry) through Openlayers? Is it possible to manipulate easily the SLD (style) of the WMS?


texts: ArcGIS REST API: using /addItem with secure service

texts:
Using the code below I am adding 100's of Map Services to a portal instance.  The script successfully runs and adds them however the services are secure so I would like portal to store the username and passwords. Using the ESRI API documentation I can see that within the [Item Info Parameters] there are username and password parameters which is a common parameter.  How do I call the common parameters and set them?

service_url = arcserver.list_services()

for each in service_url:
    serv_name = each.split('/')[7]
    temp_url = each.split('/')[0:7]
    rest_end_pt =  '/'.join(temp_url) + '/' + serv_name.replace('.', '/')
    title = serv_name.replace('.MapServer', '')
    tag = each.split('/')[6]
    payload = {'token': sh.token, 'url': rest_end_pt, 'title': title, "type": "Map Service"}
    post_url = admin.root + '/addItem'
    print post_url
    a = requests.post(post_url, data=payload)
    print a

Ive tried passing the username and password in multiple variations:

 payload = {'token': sh.token, 'url': rest_end_pt, 'title': title, "type": "Map Service", 'serviceUsername': 'xxx', 'servicePassword': 'xxx'}

Which results in a failure in the form of 400 response.


texts: Turf intersect point with Leaflet GeoJSON error

texts:
Leaflet and Turf. I am trying find all the layers on a Leaflet map that intersect a point when the user clicks on the map. I am using the turf library to test for this. In the console when I click on the map it returns this error:

turf.min.js:1 Uncaught Error: geojson must be a valid Feature or Geometry Object
    at J (turf.min.js:1)
    at Object.Lo [as intersect] (turf.min.js:1)
    at js2.js:22
    at eachLayer (leaflet.js:5)
    at e.<anonymous> (js2.js:20)
    at e.fire (leaflet.js:5)
    at e._fireDOMEvent (leaflet.js:5)
    at e._handleDOMEvent (leaflet.js:5)
    at HTMLDivElement.r (leaflet.js:5)

Here is the code

map.on('click', function(e) {
        var str = "Latitude: " + e.latlng.lat.toFixed(5) + " Longitude: " + e.latlng.lng.toFixed(5) + " Zoom Level: " + map.getZoom();
        var lat = e.latlng.lat;
        var lng = e.latlng.lng;
        var pt = turf.point([lng, lat]);

        map.eachLayer(function(layer) {
            if (layer instanceof L.GeoJSON) {
                var click_intersection = turf.intersect(pt, layer.toGeoJSON());
                if (click_intersection) {
                    console.log(layer.feature.properties)
                }
            }
        });

Reference questions turf.js intersect problem?

Get popup info in multiple layers from one click

update

    var c = new L.GeoJSON.AJAX("http://127.0.0.1:8000/childcare_buff_data/",{
        style: color(c, "orange", 0.8)})
        ;
    c.addTo(map);

    map.on('click',function(e){
        lat = e.latlng.lat;
        lon = e.latlng.lng;
        ProcessClick(lat,lon)
    });

    var theMarker;
    var a;

    function ProcessClick(lat,lon){
        theMarker = L.marker([lat,lon]).addTo(map);
        c.eachLayer(function(layer) {
            intersects=turf.intersect(theMarker.toGeoJSON(),layer.toGeoJSON());
            if (intersects){
                a=layer.feature.properties.buff
                console.log(a);
                }
            })};

I get this error

turf.min.js:1 Uncaught TypeError: Cannot read property 'length' of null
    at turf.min.js:1
    at turf.min.js:1
    at S (turf.min.js:1)
    at Pn (turf.min.js:1)
    at Object.Lo [as intersect] (turf.min.js:1)
    at js2.js:31
    at eachLayer (leaflet.js:5)
    at ProcessClick (js2.js:30)
    at e.<anonymous> (js2.js:22)
    at e.fire (leaflet.js:5)

here is the geojson http://www.mediafire.com/file/9fnbz32ib9n1aaj/childcare.geojson/file


texts: Geoprocessor AddMessage issue in Eclipse

texts:
I wrote the following code as a wrapper around messages pushed during the running of the script. Using Python IDLE this works fine, but in Eclipse I get the following output:

def ESRIP(gp,message):
    """Prints messages into ArcGIS Script window"""
    message = str(message)
    gp.AddMessage(message)
    return message

print ESRIP(gp, "processing one million points")

Any thoughts on how I can remove the weird text?


texts: QGIS merge selected features tool malfunctions due to geometrical errors

texts:
The issue occurs using the 'Merge Selected Features' tool when there are geometrical errors in the features (not all are picked up by the 'check geometrical validity' tool).

In 2.2 Valmeria, the merge fails to complete. This is acceptable, as it alerts me that I need to fix geometrical issues with the features.

In 2.3 nightly build from 12th June, the merge fails to complete, and at least one of the features is deleted. This can be undone, but it is a worry, as the user might not notice on time.

Anyone experienced similar, or advice if I should report this somewhere?


texts:
I am running geonetwork 3.0 on tomcat. I want to put all configuration files to an external directory that is not affected by geonetwork undeploys or upgrades.

I started with this description but the entire process seems to be somewhat complex. Isn't there an easier way like copying the config files to an external dir and changing the directory link e.g. by setting a parameter in context.xml?

Or maybe I just didn't understand the workflow completely.


texts:
Can we use QGIS for Image Annotation? Box or Polygon Labelling? Can someone suggest any tool for the same? The file format is tiff.
I aim to find out copper sites in multiband tiff images. I have used sentinel 2a data. Combined the 12 bands into a raster and exported it as a tiff file.
I want to label the mine location in tiff file using an annotation tool.
So far I have tried

http://emapr.ceoas.oregonstate.edu/pages/education/how_to/image_segmentation/how_to_spatial_segmentation.html - scikit-learn to do this although as the size of my tiff file is 3 GB. This fails to do the work.
I am currently tring AWS but I am not sure it is processes tiff files.
GRASS/QGIS - I know it performs Supervised Learning, although I am not sure if it has any plugin for annotation.


texts: Extracting watersheds at (arbitrary) pour points of waterways inconsistent with DEM

texts:
I am using ArcGIS 10.4.1.

I am trying to extract watersheds for a number of random locations along a river network. These locations represent points where certain physio-chemical qualities of the river water are measured and I am interested in knowing for which cells in the DEM the water is flowing to this cell.

The datasets i have are:

A (filled) DEM (5m resolution) covering the entire study area (the whole of Flanders, a comparatively large area and thus a heavy file).
A polyline dataset containing the locations of all flemish rivers & waterways. This dataset is divided into many small segments which all have a unique code and contain beginning and end points consistent with the flow direction.
A shapefile containing the measuring points, I snapped these locations using the Near tool to ensure they're located on the rivers.

At first this seemed to be a straightforward problem as I have extracted watersheds many times before using the following sequence of tools: Fill->Flow Direction->Flow Accumulation->Snap Pour Points->Watersheds.

However the problem with the data is that the waterways are not consistent with the DEM: they do not necessarily follow the topography (Flanders has artificially changed the course of many rivers and also has many canals). A colleague advised me to 'burn' the rivers into the DEM (By converting them into a raster, giving them all an arbitrary low value (e.g. -2000) and adding that raster to the DEM). Thus my model has come to look like this (notice I have split up the last part of the analysis because there are two categories of points and otherwise there would be overlap between the watersheds of the different points):

Unfortunately, this approach does not seem to work and it yields very small, nonsensical watersheds that sometimes even violate the flow direction of the rivers. As such I myself with the help of colleagues have tried several other approaches:

A colleague suggested that I simply try to extract the watersheds using the polyline dataset directly rather than using pour points. I have tried this, by first dissolving the polyine dataset so it becomes just one element and then breaking it up at the locations of the measuring points using the 'Split Line at Point' tool. This however splits the dissolved polyline not only at those points but also at all junctions (nodes) as well some random vertices. (I have tried to run the integrate tool first but to no avail.) I have no idea why the tool does this but it makes this approach useless. I have also tried to split the lines at the points manually but this still aggregates the lines in strange ways, leading to the following, bizarre pattern of watersheds:

Since a shapefile containing the watersheds of all the small segments individually already exists, a possible approach would be to determine all the upstream segments and then add up all the small watersheds to one large one that would correspond to the watershed of the start point of the section on which the measuring point is located. To achieve this, I converted the rivers polyline dataset to a geometric network and subsequently used the trace upstream functionality that exists for this type of datasets. However, this yields no output and the group layer which is supposed to be created by the tool does not show up anywhere. I have never worked with networks before though so maybe (probably) I am doing something wrong.
I imagine it must be possible to use Python to circumvent the experienced problems and extract the watersheds in a method uniquely suited to this situation. While I have limited experience in working with Python, I have never used it in conjunction with ArcGIS and would like to avoid this scenario since I imagine there is fairly steep learning curve and I simply do not have the time for that right now.

I'm at a loss as to how to proceed at this point.


texts: Preventing an Openlayers WMS layer from updating on zoom-change

texts:
I'm using openlayers to overlay a raster. When I zoom out, the overlaid layer expands to cover a larger area than was originally requested. I want the tile to be fixed to a particular boundary, and for the WMS query to end, once the zoom changes. When I get the WMS layer the first time, it looks like this:

However, if I zoom out the screen then looks like this:

My javascript is as follows:

wms_url = 'mysite.com/mapserv.cgi?map=population.map&ny_pop';

oldRaster = new OpenLayers.Layer.WMS(
               "pop_raster",
               wms_url,
               {    layers: wms_layer,
                    transparent: true
                    },
               {    maxExtent: polyBounds,
                    displayOutsideMaxExtent: false,
                    tileSize: new OpenLayers.Size(tileWidth, tileHeight),
                    opacity: 0.3,
                    gutter: 0
                    }
           );
           map.addLayer(oldRaster);

I've tried adding the attribute persist: false but it does not change anything. I calculate polyBounds using the screen size, and then tileHeight and tileWidth based on the screen resolution so that one tile fills the box that is drawn on-screen.

When I inspect the GET command using HTTPFox the page seems to be actively pulling down more data from the WMS, but I'm not sure why as there are no fresh requests.


texts: .gdbtable file type, how GIS reads it, and how to batch-convert it to a CSV?

texts:
TL;DR: How do I convert .gdbtable to .csv in Python? Where is the location data in the attribute table?
Using QGIS 3.14. I have a data type which I'm unfamiliar with, a GDB table it appears. The exact dataset I'm working with is a directory which contains various files which look like a0000000b.gdbtable so illegible to me but when I drag the whole directory in QGIS it imports all the data perfectly. Now, I'm not a QGIS or even a GIS person so I want this data to be stored and handled in Python, but I have no idea how to even begin and I couldn't find a library or anything to work with. I found this post but it's outdated and also it's for .gdb files which are not the same (right?). Now, I could open the attribute table and export as CSV but two problems with that:

I need this process to be automatic (i.e. using a GIS API or Python) such that it doesn't depend on GIS software as this needs to be done several times a week with new data being downloaded

The attribute table doesn't appear to have any information about how to draw the layer, and of course that's something I'd want to preserve. More to follow:

For context the data is oil and gas pipelines so each row in the attribute table is a separate pipeline however these are the attribute table headers:
[OBJECTID, PipelineID, Country, CountryISO, Region, Basin, OnOffshore, Environment, Status, Contents, UpdatedDate, CreatedDate, Symbol, SHAPE_Length]
So seemingly no location info however QGIS knows exactly where each pipeline is and shows it on the map. How does it know, where is the location data stored, and what is the type of data here exactly? A shapefile? Polygon? Multiple concatenated lines? List of points for each pipeline that are then drawn connected? I'm not sure if you could tell without actually having access to the data, which I could provide a sample if necessary.
I can clear up anything that doesn't make sense, I am new to GIS and this data type (which is why I'm trying to do this in Python).


texts:
Is there any way to optimize this code? It creates two buffer feature classes based on two different fields in the shapefile attribute table

import arcpy
from arcpy import env
## Set Workspace
env.workspace = "I:\GIS Programming\Week 11 - Manipulating Spatial Data\data"
fc = "airports.shp"
## Details for new field in attribute table
newfield = "BUFFER_DISTANCE"
fieldtype = "TEXT"
fieldname = arcpy.ValidateFieldName(newfield)
arcpy.AddField_management(fc, fieldname, fieldtype, "", "", 12)
print "New Field" + newField + "Created."
print "Updating Buffer Distances"
## BUFFER_DISTANCE is added to table as BUFFER_DIS for some reason
fields = ("FEATURE", "BUFFER_DIS")

## Create update cursor for feature class
with arcpy.da.UpdateCursor(fc, fields) as cursor:
    for row in cursor:
        if row[0] == "Airport":
            row[1] = "15000 METERS"
        else:
            row[1] = ""
        cursor.updateRow(row)
print "Airport BUFFER_DISTANCE field updated"
print "Creating buffer feature class"
##Create buffer
arcpy.Buffer_analysis(fc, "airport_buffer", "BUFFER_DIS")

## Create update cursor for feature class
with arcpy.da.UpdateCursor(fc, fields) as cursor:
    for row in cursor:
        if row[0] == "Seaplane Base":
            row[1] = "7500 METERS"
        else:
            row[1] = ""
        cursor.updateRow(row)
print "Seaplane BUFFER_DISTANCE field updated"
print "Creating Buffer feature class"
##Create buffer
arcpy.Buffer_analysis(fc, "seaplane_buffer", "BUFFER_DIS")


texts: Area of each polygon that intersects another layer and total area of intersections in QGIS

texts:
I have two layers: 'A' (orange) and 'B' (purple).

Using a Virtual Layer and group_concat I am able to list the polygons in layer 'B' that intersect with those in layer 'A' thanks to @Jesse McMillan's solution
SELECT A.fid, group_concat(b.fid)
FROM A LEFT Join B
ON ST_Intersects(a.geometry, b.geometry)
GROUP BY A.fid

However, I also wish to include the area of each polygon in an attribute table the area of each polygon in 'B' that insects with one in 'A', and the total area of the intersecting polygons, like this:

Can this also be done using group_concat() and a Virtual Layer?


texts: Add a polygon programmatically in OpenLayers 3?

texts:
I added a point like this and it works fine, but for polygon it's not working.

var iconFeature = new ol.Feature({
          geometry: new ol.geom.Point([8637791.36, 1456487.82]),
          name: 'Null Island',
          population: 4000,
          rainfall: 500
        });
var vectorSource = new ol.source.Vector({
  features: [iconFeature]
});

var vectorLayer = new ol.layer.Vector({
  source: vectorSource
});

My code for polygon is as follows -

var poly = new ol.Feature({
        geometry: new ol.geom.Polygon([8623931.28, 1449016.75],[8624007.72, 1458265.63],
                    [8629358.31, 1458571.37],[8628441.06, 1455284.58],[8625765.77, 1449781.12],[8630275.55, 1453450.09],
                    [8629281.88, 1452456.42],[8627294.51, 1451080.54],[8625765.76,1449781.11],[8623931.28, 1449016.75]),
        name: 'hello',
        population: 200,
        rainfall: 40
        });
var vectorSource1 = new ol.source.Vector({
  features: [poly]
});

var vectorLayer1 = new ol.layer.Vector({
  source: vectorSource1
});

map.addLayer(vectorLayer,vectorLayer1);

It's not adding polygon to map. Also on click I want a popup showing name, population and rainfall


texts: I have a raster data in TIFF format which represents land use categories (urban, forest, agriculture etc). This I made in ArcGIS where it is possible to see all categories in different unique colors but I can't see those categories when I opened that file in QGIS.


texts: How to generalize training data for a random forest classifier?

texts:
I am working with a random forest classifier in eCognition (new with eCognition 9.0).  The image shows 8 NAIP tiles I am attempting to classify using approximately 100 training points.  The training data (blue points) are very simple and are comprised of a shapefile indicating the location and class of vegetation.  I am classifying the images on a tile by tile basis, so I am looking for a way to utilize all of the training data rather than only the points that lie within the extent of an individual tile.

What methods are available to utilize the full range of training data on a tile by tile basis?  I have considered extracting the pixel values for each point and exporting that as a table, although I have not found a way to use tabular data to train the random forest classifier in eCognition.


texts: Local GeoJSON Access Mapbox GL JS / Online GeoJSON Updating?

texts:
I've seen a lot of similar questions floating around but they have not really addressed what I am looking for.

I am a novice at web development.

I'm attempting to change my project so that my geoJSON data is no longer stored within the html and is rather accessed through a separate file. It worked absolutely fine when the var stores = {etc, etc}, but now that I've pointed it out externally it is no longer working. Here is the code that I am using:

var stores = 'MasterDirectory_QC_V10.geojson';

map.on('load', function (e) {
 map.addSource('places', {
type: 'geojson',
data: 'stores'

 });

I've tried a lot of solutions and none of them have work. I noticed it was kicking out a cross origins request error, so I ran it in an instance of chrome with the security settings off. This did not help. I am aware switching to using jquery to get the geojsons would work well, but I think my code is a bit complex at this point for that - theres a lot going on outside of this snippet that might interfere with that. I've also noticed when I try to move the css to a different sheet instead of the  section, that does not work either.

My eventual goal is to be able to host my geoJSON somewhere such that users of my system can submit new data to the geoJSON and update it - such that the map/directly will be dynamically updated as this happens. I do not necessarily know what the most direct way of doing this beyond putting it up on AWS.

jsbin: https://gist.github.com/cormundo/b7703bb55b8a74d19caa0ebf75c856cf


texts: How to convert Geometry type column to degree Minutes Second in SQL Server 2008 R2

texts:
I have shape column of type geometry and I want to convert X and Y coordinates into Degree Minutes Second format using SQL query and i am using sql server 2008 R2.

Currently I got Lat and long using this query

Select W.SHAPE.STY as latitude, W.SHAPE.STX as longitude from tbdata


texts: Symbology color assign based on Field value in ArcMAP

texts:
I have Parcel data for multiple small areas nearby each other.

In Each Area, there are many parcels with Landuse information with "Landuse" Field as well as each parcel is having RGB value in another field called "Parcel_RGB" with a comma delimiter respectively.

I have used "Landuse" and "Area Name" field for Symbology and the color I am applying manually.

In Each area, the land-use color will be different.

Is there any solution using Arcpy to apply color from field values.


texts: Adding FieldName in Field Mapping - ArcGIS

texts:
In ArcGIS FieldMapping, is there any way to add "FieldName", while we use MergeRule-Join?

Please refer the attachment;

I know, we can concatenate Field Values using MergeRule-Join, with Delimiter "|". but is it possible to add FieldName before FieldValue.


texts: Identifying based on legend items visibility in ArcGIS WPF app?

texts:
I have built a WPF app that has a dynamic legend that is refreshed as a user toggles on/off a layers visibility. I would like the identify task to only identify layers that are visible in the legend control ( legend is in tree view).

Is this possible?

Right now the identify task is based on the URL provided in the identify task constructor. The service URL that the identify task consumes has some layers off and other layers turned on but the user has the ability to turn on/off layers in the table of contents. This allows the user to turn off all the layers in the legend and still identify features


texts: When computing distances between 2 vector layers - getting window of analysis right size

texts:
In QGIS I have a big island (Britain). There are lots of rivers inland, but not many at the coasts. The rivers were originally vector layers. I converted them to Raster (by burning them with the value of 1). The image attached shows the options I put in. This gives a black square over some of the island; it does not reach the coast because the rivers are all inland (or perhaps because I did not specify) I want the black square to cover the whole island.

How would I specify that?

image: https://ibb.co/cfR2QG


texts:
I have database in myadmin with column for long. and lat. informations.

Is there a way to connect qgis with myadmin?

Or what type of database I must create if I want that each row repesented a point on map?


texts: Why can't I install python-qgis on Ubuntu 12?

texts:
I am with ubuntu 12 and Qgis 1.8. I have installed QGIS and grass plugin but I can't install python plugin. How to install python plugin with dependeny in Ubuntu?

~$ sudo apt-get install python-qgis
[sudo] password for sugandha:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-qgis : Depends: python-qt4 (>= 4.1.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


texts: Google Earth Engine: how to use buffer function

texts:
I am using the following codes to extract weather data for a list of point with longitude and latitude. Now I would like to have the data for a buffer of 1km for each data.
var temp = ee.ImageCollection("ECMWF/ERA5_LAND/MONTHLY");

// misc
var dateStart = ee.Date('1981-01-01');
var dateEnd = ee.Date('2020-12-01');

var maxtemp = 400;
var performCloudMasking = true;
var scale = temp.first().projection().nominalScale();
var crs = temp.first().projection();

var adm1Unit;

function makeDatelist(n) {
  return dateStart.advance(n,'month');
}
function maskClouds(img) {
  var cloudMask = img.select('temperature_2m').lte(maxtemp);
  return img.updateMask(cloudMask);
}

function collecttempvalue(aDay) {
  if (performCloudMasking) {
    temp = ee.ImageCollection("ECMWF/ERA5_LAND/MONTHLY").map(maskClouds);
  }
  temp = temp.select("temperature_2m");
  temp = temp.filterDate(ee.Date(aDay), ee.Date(aDay).advance(1, 'month'));
  temp = temp.mean().clip(adm1Unit);

  var dailyValue = temp.reduceRegion({
    reducer: ee.Reducer.mean(),
    geometry: adm1Unit.geometry(),
    scale: scale,
    crs: crs,
  }).get('temperature_2m');

  return dailyValue;
}

function appendtempvalues(feature) {
    adm1Unit = feature;
    var dailyValues = dateList.map(collecttempvalue);
    var dateValueDict = ee.Dictionary.fromLists(dateList.map(formatDate), dailyValues);
    feature = feature.set(dateValueDict).setGeometry(null);

    return feature;
  }

function formatDate(d){
  return ee.Date(d).format('YYY-MM');
}

var n_days = dateEnd.difference(ee.Date(dateStart),'month');
var dateNumber = ee.List.sequence({start: 0, end: n_days, step: 1});
var dateList = dateNumber.map(makeDatelist);

var result = location.map(appendtempvalues);
  Export.table.toDrive({
        collection: result,
    fileFormat:"CSV",
    folder: 'GEE_no2_countries'
  });


texts:
I made the following script to merge shape files of different format types (poly,line, points):

def main():
    import arcpy
    from arcpy import env
    import globalpath
    import os
    env.workspace = globalpath.toolDataPath
    dataPath=globalpath.toolDataPath
    arcpy.env.overwriteOutput = True

    #try:
    DataTypeL=[("Polygon","mergedTOTPoly.shp"),("Polyline","mergedTOTLines.shp"),("Point","MergedTOTPoint.shp")]

    for dType in DataTypeL:
        (Typei,Title)=dType
        matches = []
        counter=0

        for dirpath, dirnames, filenames in arcpy.da.Walk(dataPath+"\\UtilityDataFromZorgel",datatype="FeatureClass",type=Typei):
            for filename in filenames:
                match = ( os.path.join(dirpath, filename))
                arcpy.AddMessage(m)
                matches.append (match)
                counter = counter + 1
        arcpy.Merge_management(matches, dataPath+"\\utilities"+Title)
        arcpy.AddMessage(str(counter)+" "+str(Typei)+" layers were merged into "+ str(filename))
    #except:
    arcpy.AddWarning("Merging Utility Layers Failed")
if __name__ == "__main__":
    main()

I get the following error:

Traceback (most recent call last):
  File "C:\merger.py", line 30, in <module>
    main()
  File "C:\merger.py", line 25, in main
    arcpy.Merge_management(matches, dataPath+"\\utilities"+Title)
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3762, in Merge
    raise e
ExecuteError: ERROR 001156: Failed on input OID 0, could not write value 'Kanata' to output field TILE_ID
Failed to execute (Merge).

When I merge these files manually from arcmap it works, and fields are mapped as follows:

"STRUCT_TYP \"STRUCT_TYP\" true true false 18 Text 0 0 ,First,#,Allstream_hdwr_L,STRUCT_TYP,-1,-1,allstream_L,STRUCT_TYP,-1,-1,Allstream_lines_L,STRUCT_TYP,-1,-1,Allstream_text_L,STRUCT_TYP,-1,-1,Atria_lines_L,STRUCT_TYP,-1,-1,Atria_text_L,STRUCT_TYP,-1,-1,bell_L,STRUCT_TYP,-1,-1)

where STRUCT_TYP is a shared field.

please let me know how can I get around this error, and if it is indeed mapping the fields how can I do it in batched merging, or should I merge each file individually?


texts: Polygon to raster without losing any polygons

texts:
I'm trying to convert polygons to raster. But the output raster dataset doesn't have  polygons which went into as input data. I need all the date in the attribute to follow with to the raster dataset as well.

What am I doing wrong?

I'm using ARCGIS 10.1.


texts: Reset style of a vector layer after features are added

texts:
I have created two Openlayers vector layers, named "temp" and "drawings1". Each of the layer have different styles. The problem is when I copy a features from drawings1 to temp, the style of "drawings1" is also copied to the "temp" layer. It seems that the pre-configured style of the temp layer is ignored. Is there anyway to reset the style of a vector layer?

//Define a style for the drawings1 layer and temp layer
var highlight_style = { fillColor:'blue', strokeColor:'#2E2EFE', fillOpacity:0.6 };
var hover_style = { fillColor:'#FF0000', strokeColor:'#FF0000', fillOpacity:0.6 };

//Initialize a vector layer for storing selection Objects
drawings1 = new OpenLayers.Layer.Vector("Selections", {isBaseLayer:false, features:[], visibility:true, style:highlight_style}
        );

//Initialize a vector layer for storing selection Objects
temp = new OpenLayers.Layer.Vector("Hover", {isBaseLayer:false, features:[], visibility:true, style:hover_style}
        );

map.addLayers([drawings1,temp])

//Copy a feature from drawings1 to temp
tempFeature = drawings1.features[0];
temp.addFeatures(tempFeature);


texts: ST_Union returning Null with Spatialite, even after ST_MakeValid

texts:
I am attempting to run ST_Union on some features in a GROUP BY Spatialite query, with the aim of counting the number of features, and the total area of those features, which may overlap so should not be summed individually e.g.

SELECT COUNT() as tot_count, ST_Area(ST_Union(geom)) AS tot_area
FROM features

However, with various methods, ST_Union always returns Null, as does ST_UnaryUnion. I can use ST_Collect fine, and get the total area from that, but I believe this will not account for the possible overlap in the features.

There are initially four invalid geometries in the features, as identified by ST_IsValid. Fixing these with ST_MakeValid appears successful (confirmed by ST_IsValid), but does not fix the issue, nor does ST_Buffer(geom, 0). However, if I specifically exclude those four invalid geometries with a where clause, the Union produces a result. Any ideas on the problem? Are the geometries still invalid, despite running ST_MakeValid, and ST_IsValid confirming this was successful? Is there anything else I can try?


texts:
I am trying to automate a workflow and I am working with the first 'piece' of the code which should check the feature classes for spatial reference and project them out if they do not equal the defined projection.

The following is the code I am using:

# Import arcpy and numpy
import os
import arcpy
import numpy

arcpy.env.workspace = r"C:\Users\GIS\Python\Distances.gdb"
outWorkspace = r"C:\Users\GIS\Python\Distances.gdb"

try:

    # Use ListFeatureClasses to generate a list of inputs
    for fc in arcpy.ListFeatureClasses():

        # Determine if the input has a defined coordinate system, can't project it if it does not
        dsc = arcpy.Describe(fc)

        if dsc.spatialReference.Name != "NAD 1983 StatePlane California III FIPS 0403 (US Feet)":
            # Determine the new output feature class path and name
            outfc = os.path.join(outWorkspace, fc + "_NAD1983")

            # Set output coordinate system
            outCS = arcpy.SpatialReference('NAD 1983 StatePlane California III FIPS 0403 (US Feet)')

            # run project tool
            arcpy.Project_management(fc, outfc, outCS)

            # check messages
            print(arcpy.GetMessages())

        else:

            print(fc)

except arcpy.ExecuteError:
    print(arcpy.GetMessages(2))

except Exception as ex:
    print(ex.args[0])

The code above just outputs all of the feature classes into the defined projection rather than discriminating between the ones that are properly projected and the ones that are not.

-Side Note- numpy is not used here but will be later.


texts: Do SAS Bridge to Esri and SAS/GIS extensions add value to Spatial Analyst and Spatial Statistics?

texts:
My organization uses SAS extensively, but has been increasing GIS use and capacity recently (that's why they hired me).  I was asked to evaluate the two SAS GIS extensions Bridge to Esri and SAS/GIS.  I've found some documentation and a lot of mostly sparse and vague marketing materials... see...

http://support.sas.com/rnd/datavisualization/BridgeForESRI/V2/
http://support.sas.com/rnd/datavisualization/papers/SASMapping.pdf
http://support.sas.com/documentation/cdl/en/apdatgis/62945/PDF/default/apdatgis.pdf

I was wondering if anyone here had any experience, insight and input with these extensions?  I gather that they provide the ability to run some spatial stats processes in SAS environments, but if we have a spatial analyst license and access to the ESRI spatial statistics tools, is there any real value added here?  I've found exporting and importing DBF and CSV files between SAS and ArcGIS fairly fluid.


texts:
I have a query in PostGIS using st_intersects like this

SELECT "name", "id_punto", "geometry", "properties", "type" FROM "points" AS "points" WHERE st_intersects("geometry",
'POLYGON ((-103.7222993373871 19.24991497165985,-103.71497154235841 19.24991497165985,-103.71497154235841 19.251824273576922,-103.7222993373871 19.251824273576922,-103.7222993373871 19.24991497165985))') = true;

Using st_intersects I bring all the points within a polygon that I indicated everything works well and shows a result like this:

My question is how I can exclude from the result some points within a multipoint for example:

MULTIPOINT (-103.7220613692669 19.25003446877862, -103.7211920807273 19.25105574878461)

try with a leftjoin but I did not get it


texts: KMZ with orthomosaic shows white squares with red Xs when zooming in Google Earth Pro?

texts:
Every time in the morning when I first open my Google Earth Pro, Why does my kmz that has an orthomosaic show white squares with red X's when you zoom in?  Here is a screenshot:

I tried to clear out the caches but it is still showing it. Can anyone out there help me to solve this problem?


texts:
I was just wondering what the most up-to-date source for US Zip Code boundaries would be.

My first thought was TIGER, whenever that comes out, but then I thought that the Postal Service might be a better bet.

Does anyone have some input?


texts: Why WFS request to Geoserver 2.7.1 have multiple responses?

texts:
I am seeing multiple WFS requests from the OL3-based web-application. Each one has a different id at the end of the url.

*service=WFS&version=1.1.0&request=GetFeature&typeName=layer_name&outputFormat=application/json&srsname=EPSG:3010&BBOX=156543.03392804042,6574807.42497772,176110.91316904553,6594375.304218725,EPSG:3010&**_=1496846692711***


texts: How to create a scale from a colored DEM?

texts:
I am trying to create a scale from this image

image source

How would I be able to create a colored scale corresponding to the image height exactly, as I do not have any programs that I can download DEM data from the USGS site and make a DEM myself.


texts: Loop over GeoTIFF image pixels, extract coordinates and pixel color

texts:
I have a very large GeoTIFF image (~650MB) with color-coded landcover data from here.  I need to extract the latitude, longitude, and pixel color for each pixel in the image, so I can import it into a MySQL database for my application.

I'd prefer solutions in PHP or Python, but anything that I can run on Linux would be fine.


texts: Unable find driver PostgreSQL in ogr2ogr

texts:
I need use ogr2ogr tool for import osm into PostgreSQL database. I've tried this command:

  ogr2ogr -f PostgreSQL PG:"dbname='OSM_DB' host='localhost'
  port='5432' user='postgres' password='postgres'"
  "E:\Sources\OSM Data\map.osm.pbf"

I'll use ogr2ogr.exe which is default added into my PostgreSQL 9.6 installation bin folder. It return this error:

  ERROR 1: Unable to find driver PostgreSQL'.
  The following drivers are available:
    ->PCIDSK'
    -> JP2OpenJPEG'
    ->PDF'
    -> ESRI Shapefile'
    ->MapInfo File'
    -> UK .NTF'
    ->OGR_SDTS'
    -> S57'
    ->DGN'
    -> OGR_VRT'
    ->REC'
    -> Memory'
    ->BNA'
    -> CSV'
    ->GML'
    -> GPX'
    ->KML'
    -> GeoJSON'
    ->OGR_GMT'
    -> GPKG'
    ->SQLite'
    -> ODBC'
    ->WAsP'
    -> PGeo'
    ->MSSQLSpatial'
    -> OpenFileGDB'
    ->XPlane'
    -> DXF'
    ->Geoconcept'
    -> GeoRSS'
    ->GPSTrackMaker'
    -> VFK'
    ->PGDUMP'
    -> OSM'
    ->GPSBabel'
    -> SUA'
    ->OpenAir'
    -> OGR_PDS'
    ->WFS'
    -> HTF'
    ->AeronavFAA'
    -> Geomedia'
    ->EDIGEO'
    -> GFT'
    ->SVG'
    -> CouchDB'
    ->Cloudant'
    -> Idrisi'
    ->ARCGEN'
    -> SEGUKOOA'
    ->SEGY'
    -> XLS'
    ->ODS'
    -> XLSX'
    ->ElasticSearch'
    -> Walk'
    ->CartoDB'
    -> AmigoCloud'
    ->SXF'
    -> Selafin'
    ->JML'
    -> PLSCENES'
    ->CSW'
    -> VDV'
    ->TIGER'
    -> AVCBin'
    ->AVCE00'
    -> `HTTP'

Can you tell me how can I fix it ? I am using windows OS.


texts: How can I move and resize features with an ArcView license?

texts:
this might be a silly question but I have a problem with moving features in ArcGis 10. I'm only using the ArcView license so the editing tool "representation" is deactivated.

Is there an easy way to simply move my selected features (maybe by converting them?)?

Also I need to "Resize" my selected features by a certain percentage!

Thanks in advance!


texts: Reclassify values of the land use land cover class of Copernicus Global Land Cover Layers in Google Earth Engine

texts:
I am using the Copernicus Global land cover layers:CGLS-LC100 collection 3 data set.
I want to reclassify the value of the lulc for my application.
Map is showing but when I want to reclassify the problem encounter is lulc1.eq is not a function.
// lulc
var lulc1 = ee.ImageCollection("COPERNICUS/Landcover/100m/Proba-V-C3/Global")
.select('discrete_classification');
print(lulc1)
var properties = lulc1.propertyNames();
print('Metadata properties:', properties);
// print(lulc1.bandNames())

Map.addLayer(lulc1, {min: 0, max: 200, palette: ['#282828', '#FFBB22','#FFFF4C'
,'#F096FF','#FA0000','#B4B4B4','#F0F0F0','#0032C8','#0096A0','#FAE6A0',
'#58481F','#009900','#70663E','#00CC00','#4E751F','#007800','#666000','#8DB400'
,'#8D7400','#A0DC00','#929900   ','#648C00','#000080']}, "Land Cover")

print(data)
var lulcreclass = ee.Image(1).where(lulc1.eq(0).and(lulc1.eq(50)), 9)//**problem encounter in this lin**e
           .where(lulc.gt(50).and(lulc.lte(100)), 6)
           .where(lulc.gt(100).and(lulc.lte(150)), 4)
 Map.addLayer(lulcreclass,{},"LULC RECLASS")


texts: QGIS: multiplying of symbology transparency

texts:
In order to export partly transparent symbology to PDF in QGIS as vectors, the symbology itself needs to have transparency – if the whole layer is sat to be transparent, the symbology gets rasterized.
Having the symbology itself as transparent (which does export as vectors correctly), however, creates the effect of multiplying, increasing when elements overlap – up to a point where they no longer look transparent:

This is in stark contrast to having the layer itself as transparent, as below:

Unfortunately, however, this does not export as vectors. Is there a way to turn off multiplying of symbology transparency, getting the same effect as if the whole layer is transparent, in order to be able to export uniformed transparency as vectors?


texts: Assigning shortcut key to custom Python script in ArcMap?

texts:
This is a modification of Assigning keyboard key to Python script in ArcMap?

I want to assign a shortcut key to call custom Python script while editing vector layer in ArcGIS 10.3. The rationale behind Python script that called by shortcut is to minimize steps required to turn on/off particular layers in the Table of contents. The answer provided in the initial question does not solve the problem.

'''
Script turns off A & B layers.
'''

import arcpy

#A list of layer names that needs to be turned off.
names = ["A", "B"]

mxd = arcpy.mapping.MapDocument("current")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
layers = arcpy.mapping.ListLayers(mxd, "*", df)

for layer in layers:
  if layer.name in names:
    layer.visible = False

arcpy.RefreshTOC()
arcpy.RefreshActiveView()


texts: Difference in JTS from Vivid Solution and locationtech

texts:
I need to create convex hull from set of points so I searched for JTS. I found two libraries one from package

com.vividsolutions.jts.geom

and another from package

org.locationtech.jts.geom

Can anyone tell me the difference in them.


texts: Selecting nearest polygons on both sides of polyline in ArcMap?

texts:
I have a polyline (in red), and several lots on each side of the polyline (in yellow). I would like to select the lots which are closest on each side of the polyline (selected in blue). I have tried to use a buffer around the polyline, but the distance between the lots and the polyline varies. So, a buffer with a large distance would capture too many lots and a buffer with too small of a distance would capture too few.

My question is similar in nature to Get nearest polygons in both sides of a polyline with arcpy, but my problem is that there are several lots "behind" a lot, and I need to select only the closest lot.

I am using ArcMap 10.3 with an Advanced License.


texts:
In Calculating View Angle? the accepted answer contains the following calculations:

  Given two points (x,y,z) and (x',y',z') in an earth-centered coordinate system, the vector from the first to the second is (dx,dy,dz) = (x'-x, y'-y, z'-z)

And then provides an example:

  The XYZ coordinates of the airplanes are (x,y,z) = (1285410, -4797210, 3994830) and (x',y',z') = (1202990, -4824940, 3999870), respectively (in the ITRF00 datum, which uses the GRS80 ellipsoid). The pilot's view vector therefore is (dx,dy,dz) = (-82404.5, -27735.3, 5034.56).

What am I missing such that:

1202990 - 1285410 = -82404.5 (vice -82420)

-4824940 - -4797210 = -27735.3 (vice -27730)

3999870 - 3994830 = 5034.56 (vice 5040) ?


texts: Leaflet: Different custom information popups for each GeoJSON polygon

texts:
I'm really new to this and I'm trying to create popups for 2 polygons which will each contain a paragraph of written information.

The function I have so far differentiates between the 2 polygons by the property 'NUMBER' (numbered 1 and 2)is:

    function onPolygonClick(e) {

            if (feature.properties.NUMBER = 1) {
                    geojson.bindPopup("<this is some writing>");

            } else if (feature.properties.NUMBER = 2) {
                    geojson.bindPopup("<this is some more writing>");
            }
        }

I have this function tied to a click in a separate function:

        function setEvents(feature, layer) {
            layer.on({
                mouseover: highlightFeature,
                mouseout: resetHighlight,
                click: onPolygonClick
            });
        }

Which is then put into the GeoJSON:

            // load the geojson data, style it, set events and add to map
            geojson = L.geoJson(data, {
                        style: style,
                        onEachFeature: setEvents,
                    }).addTo(map);

However the popup is not working. What should I do differently?


texts: FME shapefile writer NULL values in date format fields

texts:
I have a data source with string fields containing dates formatted like 20180202120000 (YYYYMMDDhhmmss) and I would like to write these in date fields in a shapefile using FME (2016.1).

UPDATE: Feature Type Properties for [ESRISHAPE] writer:

In order to get the required ISO date format YYYY-MM-DD I've set a DateFormatter transformer like shown below:

When I redirect the writer to FMEInspector, the result looks as expected, but in the resulting shapefile the date fields contains only NULL values.

No Idea what I'm doing wrong, any hints?


texts: AnySite - Export Spreadsheet of Multiple Demographic Points

texts:
I have a point file of every single intersection in my city. I'd like to be able to run demographics on EVERY SINGLE POINT and have the demographic data for intersection  go into a single master spreadsheet.

AnySite will create a report for each point on an individual basis, but I need all that data from each of those reports in one big spreadsheet.


texts: Writing query to select MIN and MAX values by groups?

texts:
In ArcMap 10 i'm working in a Personal Geodatabase where the points (see screenshot below) represent the number of each house in the street. Each point has an ObjectID. This ObjectID is an unique value for each "link" of the street to which all the points are related.

I have a total of 35,000 points (house numbers), which are all related to 14,000 different links. What I want is to select both the MAX and MIN value in each side of the street.
Each side of the street also has a unique ID, which appears in my attribute table as CVEFT. On every link, the CVEFT (for both sides) is different.

This is what my Table looks like:

As you can see in the screenshot above, there are several points (NUMEXT) related to the same link (OBJECTID). You can also see that all the points related to a single link may have 2 different street-side codes (CVEFT).

I want to build a SQL query that allows me to select the MIN and MAX values for every Link, for each side of the street.

Does anyone have any idea of how to do this?


texts: r.reclass for NDVI in QGIS gives no output

texts:
I have a raster layer with NDVI values. I want to reclassify the raster to five classes. The project and the layer are in EPSG 32633.
When I use r.reclass in QGIS, there is no output.
What is the error?


texts: How to use GeoServer in my LAMP stack with weekly data updates

texts:
I need to make a Web GIS and weekly update all my data.

Currently I'm working on localhost with this work flow:

PostgreSQL (db with csv and shape)
GeoServer (to take data from db)
Qgis (get the layers from GeoServer and made elaboration)
LeafLet (create folder to do a webgis)
Put leaflet folder into my server.

I want to stop to load the leaflet folder into my server and do again the 5 steps above, all the time that I want just to update the csv (and shape).

Also I want that other peoople can access to the db on PostgreSQL and updating JUST the csv.

so Is it possibile with PostgreSQL doing all this?


texts: Finding 2nd order polygon neighbors (and 3rd, 4th etc.) using ArcGIS for Desktop?

texts:
I have a shapefile of contiguous polygons and for each pair of polygons, I need to know how many polygons are between them, following an neighboring/bordering approach. The output is likely to be a non-spatial table.

For example, for this group of polygons:

The output would be something like this:

and so on...

I can use ArcGIS for Desktop for that.

My idea of solution so far:

A model where, for each polygon, I run Polygon Neighbors (Analysis), merge with all the neighbors and run it again, until all there's only one polygon. However, I have little knowledge on coding/scripting, so I'm unsure on how to build this model exactly and if there's a simpler way.


texts: While publish raster layer in geoserver it shows background as black. How to remove the black color. if there is any options to permanently remove the black color.


texts: How to extend grid lines (survey traverse lines) created by vector grid tool in QGIS?

texts:
We have a polygon. We want to create a grid (sort of) with certain intervals, let's just say - 200ms. In QGIS, using "Vector grid" option we can do this. But, once it's get clipped, it's like Fig -1. Obviously the purpose of clipping is to a smooth and perfect snap.

But, while field surveying (for which the map is going to be used) we can't just end the line perfectly with the AOI (polygon). At times, field person will not be able to do that. So what we would like to do is, extend the grid lines equally on all sides so that the whole survey line will be traversed properly.

Currently, some of my colleagues are doing this using MapObjects wherein which we can Round-off north end to, say 20.  Which means, if the north coordinate for a line is 2906161, it will be rounded off to 2906170 (the next round integer). Since we have very limited number of licenses for MapInfo, I just want to try it with QGIS. Hope it can be done using Python script.  If not, is it possible to do this through Model builder?


texts:
When learning MapBasic I found the most useful way to learn how to do certain tasks was to do them using the GUI and then watch the MapBasic window in MapInfo to see how they were achieved in code. It was also very useful for repeating repetitive tasks.

I was wondering if QGIS had something similar for python?


texts:
Are there any books/blogs/youtube channels/websites, for beginners, that provide training for ArcGIS Runtime for .NET (C#).

I know of this Add a map to your app resource provided by ESRI (which seems quite good upon further inspection). But I was interested to see if anyone had found anything else?

Given the relative infancy of the ArcGIS Runtime SDKs, I don't expect a plethora of responses to this question.


texts: ArcGIS map with basemap toggle and simplemarker pointer

texts:
I am using ArcGIS map which gives me an error:

Below is my function which i am using to implementing the map on my
application:

function handlerForVariableB (latt, longt, complaintid)
{

  // execute code that is relevant when "$a" was set on the server-side.
   $.ajax({
    type: "GET",
    url:  "tools/nrega_v2.1/map.php",
    data: 'complaintid='+complaintid,
    success: function(data){
      var data_array = JSON.parse(data);

  $('.modal-info').html("");

  var hrymap='

';
    $(".modal-info").append(hrymap);

  $('#hrymap').html("");

    $('#hrymap').html("

");
          //var map;

      var map;

     require([
        "esri/map", "esri/views/MapView", "esri/widgets/BasemapToggle",
        "esri/geometry/Point",
        "esri/symbols/SimpleMarkerSymbol",
        "esri/graphic",
        "esri/layers/GraphicsLayer", "esri/symbols/PictureMarkerSymbol","esri/layers/ArcGISDynamicMapServiceLayer","esri/layers/ArcGISTiledMapServiceLayer",
        "dojo/domReady!"
      ], function(
        Map,  MapView,
  BasemapToggle,Point, SimpleMarkerSymbol, Graphic, GraphicsLayer,PictureMarkerSymbol,ArcGISDynamicMapServiceLayer,ArcGISTiledMapServiceLayer
      ) {
        map = new Map("map", {
          basemap: "<?php echo $basemap; ?>",
      center: [longt,latt],
          zoom: "<?php echo $zoomlevel; ?>",

        });
         var view = new MapView({
    container: "viewDiv",
    map: map,
    center: [-86.049, 38.485],
    zoom: 3
  });

  // 1 - Create the widget
  var toggle = new BasemapToggle({
    // 2 - Set properties
    view: view, // view that provides access to the map's 'topo' basemap
    nextBasemap: "hybrid" // allows for toggling to the 'hybrid' basemap
  });
 view.ui.add(toggle, "top-right");

        map.on("load", function() {
          var gl = new GraphicsLayer();
          var p = new Point(longt,latt);

     var s = new PictureMarkerSymbol('img/location.png', 51, 51);

          var g = new Graphic(p, s);
          gl.add(g);
          map.addLayer(gl);
          map.addLayer(new ArcGISDynamicMapServiceLayer('<?php echo $roadlayers; ?>'));

                    });
      });

     $("#detail_content").css({'display':'block'});

    }
  });

}

Below are the js and css which are using in my application:

<link rel="stylesheet" href="inc/css/bootstrap.min.css">

  <link rel="stylesheet" href="inc/css/font-awesome.min.css">

  <link rel="stylesheet" href="inc/css/ionicons.min.css">

  <link rel="stylesheet" href="inc/css/AdminLTE.min.css">
<link rel="stylesheet" href="css/global.css">
<link href="css/custom.css" type="text/css" rel="stylesheet">
  <link rel="stylesheet" href="inc/css/skins/_all-skins.min.css">
  <link rel="stylesheet" href="inc/css/custom.css">
  <link rel="stylesheet" href="inc/style.min.css">
 <link rel="stylesheet" href="leafletslib/leaflet.css" />

    <link rel="stylesheet" href="https://js.arcgis.com/3.29/esri/css/esri.css">


texts: How to capture GPS co-ordinates from a Microsoft InfoPath form on a mobile device

texts:
We are looking for a way to capture GPS coords through the Microsoft INFOPATH form which is loaded on our Mobile Motion device.

Basically, we are trying to put a VB script behind the “Get GPS Coord” and possibly
the “Photo & Coordinates” buttons on the “INFOPATH” form that we have developed.
My VB code experience is non-existent but can have programming backgound.

This is the only VB script we have which does not work:

DIM ptg AS TGIS_Point
ptg = GIS.CS.FromWGS( GisPoint( oGPS.Longitude, oGPS.Latitude ) )
dim gisPoint as TGIS_ShapePoint
gisPoint = oLayer.CreateShape(gisShapeTypePoint,0)
gisPoint.AddPart
oPos.SetPosition( ptg, NOTHING, 0 )
gisPoint.AddPoint(ptg)
gisPoint = gisPoint.MakeEditable
gisPoint.IsSelected = TRUE
App.SelectedShapes.Add(gisPoint)
App.ActiveLayer = oLayer
GIS.Update()
GIS_Legend.Update()
GIS_Attributes.Update()
'OPEN CRUISE POINTS FORM HERE
DIM CruisePointsForm as TForm2
CruisePointsForm = ScriptApp.CreateForm(TForm2.Create(ScriptApp))

Thanks in advance. :)


texts: Showing field value on top of line symbol in ArcMap?

texts:
In browsing through the Living Atlas Layers in ArcGIS Online, I discovered a layer of tornado data that represents tornado intensity and path using lines of varying color and thickness with a number on top of the line to show its magnitude:

I have hail data in ArcMap that I'd like to reproduce this effect with. How do I use the Magnitude field in the attribute table (referring to hail size) to produce a similar effect?

This is what I currently have:


texts: Resampling 0.7 m LiDAR (in raster already) to 10 m DEM in R?

texts:
How do I resample the 0.7 m LiDAR to 10 m DEM in R?

What are the basic rules for checking the consistency?


texts: ApplySymbologyFromLayer_management gives error saying it can accept only two arguments?

texts:
I have a layer file and I need to apply unique value categories to that layer based on the field present in attribute table of that layer

I tried using:

input = arcpy.GetParameterAsText(0)
output = arcpy.GetParameterAsText(1)
symbologyFields = {"VALUE_FIELD", "#", "symbol"}
arcpy.ApplySymbologyFromLayer_management (input, output,symbologyFields)

But this code shows an error that ApplySymbologyFromLayer_management can accept only two arguments. But I took this code from ArcGIS tool reference site http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm

What actually I need is to color my polygons using the values in the attribute table field.

i.e.

I can say that apply symbology by going into properties tab and click on categories and the unique values and select the field. This I am in need of doing it with the help of code.

Can anyone help regarding this?


texts: Unable to upgrade QGIS from 3.14 to 3.16.5 or 3.18.1

texts:
I have run many versions of QGIS 2 and 3 on two mac computers.  I have not been able to get 3.16.5 (LTR) or 3.18.1 to work on either of them.
However, on a third computer which has never had QGIS installed on it, both 3.16.5 and 3.18.1 install and run fine.
I suspect that some leftovers from previous versions of QGIS are causing the problems.
I have tried removing the profiles by trashing the folder ~/Library/Application Support/QGIS and emptying the trash.    The problems persist.
Symptoms:

Opening an existing project crashes
Creating a new project in 3.16.5 and changing the project CRS gives an error message:

No transform is available between ESRI:102747 - NAD_1983_StatePlane_Virginia_South_FIPS_4502_Feet and Custom CRS: GEOGCRS["unknown",DATUM["unknown",ELLIPSOID["GRS 1….

proj_create_operations: cannot build geodeticCRS 4326: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name, area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE auth_name = ? AND code = ?: no such column: publication_date

It does not matter which CRS I choose, a similar error message appears.
The QGIS about panel shows the same information on both the working and non-working systems (except that the working system is Mojave.  However, I had this problem before I upgraded to Big Sur, so Big Sur is not likely to be the problem.)
This about panel is from one of the non-working systems:
QGIS version
3.16.5-Hannover

QGIS code revision
58ba7c1ed6

Compiled against Qt
5.14.2
Running against Qt
5.14.2

Compiled against GDAL/OGR
3.2.1
Running against GDAL/OGR
3.2.1

Compiled against GEOS
3.9.1-CAPI-1.14.2
Running against GEOS
3.9.1-CAPI-1.14.2

Compiled against SQLite
3.31.1
Running against SQLite
3.31.1

PostgreSQL Client Version
12.3

SpatiaLite Version
4.3.0a

QWT Version
6.1.4

QScintilla2 Version
2.11.4

Compiled against PROJ
6.3.2
Running against PROJ
Rel. 6.3.2, May 1st, 2020

OS Version
macOS 10.16

Active python plugins
processing;
db_manager;
MetaSearch

What may need to be removed?
A clean install of macOS is out of the question because there are too many current projects in too many different applications.


texts: Generalizing line with angle rules in QGIS

texts:
I'm looking for an automatic way to generalize/simplify vector lines in QGIS like the following picture :

I would like the generalization to include only the angles indicated by the small star on the right. Is that possible with the v.generalize tool?


texts: Why prj2epsg cannot resolve PostGIS SRText?

texts:
In many places I have seen people referring to http://prj2epsg.org (here, here). I have used this service too, however, the service cannot uniquely identify an EPSG code alway. I understand that it might not always be possible to determine the EPSG code, but what about common ones? For example, the link bellow uses the service to determine EPSG code for the SRText for EPSG:3857 found from PostGIS's spatial_ref_sys table:

http://prj2epsg.org/search.json?terms=PROJ....

Am I using the service Incorrectly? Or PostGIS stores SRText differently than prj2epsg expects?

In case you are interested, here is the actual SRText:

PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],AUTHORITY["EPSG","3857"],AXIS["X",EAST],AXIS["Y",NORTH]]


texts: Transforming image from Web Mercator Projection to Simple Cylindrical (Plate Carree) projection?

texts:
I have an image that is projected using the Web Mercator projection.

Does anybody know how to transform (in ArcMap) this image from the Web Mercator projection to the Simple Cylindrical (Plate Carree) projection?


texts: Starting a GIS project in java with OSM data

texts:
I am starting a new GIS project in Java. Till now, I used JTS and geotools to load shape files - these data were then displayed on a swing interface. For this new project, I would like to use OSM data. I am wondering what is the most efficient way to start.

What I am dreaming on is a simple and light open source java viewer that would be able to load and display OSM data in both vector and raster format, and that I could extend for my project.

Does it exist?


texts: Data-type detection in ArcGIS table loading

texts:
When adding tables layers from Excel files, ArcGIS attempts to guess the data-types:

  Microsoft Excel does not enforce field
  types for values during data entry
  like standard databases do. Therefore,
  the field type specified in Excel is
  not used in determining the field type
  exposed in ArcGIS. Instead, field type
  in ArcGIS is determined by a scan of
  the values in the first eight rows for
  that field. If the scan finds mixed
  data types in a single field, that
  field will be returned as a string
  field and the values will be converted
  to strings.

Does anyone know what heuristic rules are used here?


texts: How to change network analysis settings in a service from a web app

texts:
I'm a basic/novice user with ArcGIS Server, so I'd like to know if I publish a network analysis service using ArcGIS for Server, will the user be able to change analysis settings as one would in ArcMap e.g. changing impedance from distance to travel time, adding time options etc?

I've looked at the server help for NA as well as the network analysis service help, but it doesn't really say. After some looking around, it seems that creating a model with the Network Analyst tools I need (such as Make Route Layer), making the attributes and other relevant components model parameters, and publishing it as a geoprocessing service would be the way to go.


texts: Error while using ST_Line_Interpolate_Point: first argument isn't line

texts:
I've been running a scheduled task that contains some SQL code that has been running fine up until a few weeks ago. I don't believe any of the code had changed recently so I went through the debugger and found the following.

The portion of code that fails:

Execute 'create table ab_appl_lines as select gid, disp_num, degrees(st_Azimuth(st_astext(ST_Line_Interpolate_Point(ST_LineMerge(ST_Line_Substring(st_Boundary(the_geom), 0.01, 0.02)), 0.10)), st_astext(ST_Line_Interpolate_Point(ST_LineMerge(ST_Line_Substring(st_Boundary(the_geom), 0.01, 0.02)), 0.2)))) as an_angle,st_Boundary(the_geom) as the_geom from ab_appl where disp_type= ''EZE'' or disp_type= ''REA'' or disp_type= ''VCE'' or disp_type= ''EAS'' or disp_type= ''REC'' or disp_type= ''RDS'' or disp_type= ''RRD'' or disp_type= ''FRD'' or disp_type= ''ROW''or disp_type= ''ISP'' or disp_type= ''DRS'' or disp_type= ''PLA'' or disp_type= ''KRS'' or disp_type= ''LOC'' or disp_type= ''MLL'' or disp_type= ''MLP'' or disp_type= ''MSL'' or disp_type= ''MTS'' or disp_type= ''ROE'' or disp_type= ''PIL'' or disp_type= ''SML'' or disp_type= ''SMC'' or disp_type= ''SME''; alter table ab_appl_lines add primary key(gid);';

The error:

  ERROR:  line_interpolate_point: 1st arg isnt a line CONTEXT:  SQL
  function "st_line_interpolate_point" statement 2 SQL statement "create
  table ab_appl_lines as select gid, disp_num,
  degrees(st_Azimuth(st_astext(ST_Line_Interpolate_Point(ST_LineMerge(ST_Line_Substring(st_Boundary(the_geom),
  0.01, 0.02)), 0.10)), st_astext(ST_Line_Interpolate_Point(ST_LineMerge(ST_Line_Substring(st_Boundary(the_geom),
  0.01, 0.02)), 0.2)))) as an_angle,st_Boundary(the_geom) as the_geom from ab_appl where disp_type= 'EZE' or disp_type= 'REA' or disp_type=
  'VCE' or disp_type= 'EAS' or disp_type= 'REC' or disp_type= 'RDS' or
  disp_type= 'RRD' or disp_type= 'FRD' or disp_type= 'ROW'or disp_type=
  'ISP' or disp_type= 'DRS' or disp_type= 'PLA' or disp_type= 'KRS' or
  disp_type= 'LOC' or disp_type= 'MLL' or disp_type= 'MLP' or disp_type=
  'MSL' or disp_type= 'MTS' or disp_type= 'ROE' or disp_type= 'PIL' or
  disp_type= 'SML' or disp_type= 'SMC' or disp_type= 'SME'; alter table
  ab_appl_lines add primary key(gid);" PL/pgSQL function
  process_create_ab_appl_lines() line 4 at EXECUTE statement

ST_Line_Interpolate_Point takes a linestring and a float as arguments and as far as I can tell that's what I'm passing in the code as ST_Line_Merge? Am I missing something more here?


texts: Subset two rasters with different extent and origin (and resolution) only where there are data in both in R?

texts:
in R, I have two rasters with different extents and origins (and possibly even resolution). How to efficiently take the subset of each of them only where there are data in both of them?

Here is a code that attempts to do that (through the function getOverlap):

library(raster)

# Generate 3 dummy rasters
r1 <- raster()
extent(r1) <- extent(0, 100, 0, 500)
res(r1) <- c(5, 5)
values(r1) <- sample(10, ncell(r1), replace=TRUE)

r2 <- raster()
extent(r2) <- extent(10, 120, -10, 400)
res(r2) <- c(5, 5)
values(r2) <- runif(ncell(r2), 1, 50)

r3 <- raster()
extent(r3) <- extent(2.5, 120, -10, 400)  # xmin is the problem
res(r3) <- c(5, 5)
values(r3) <- runif(ncell(r3), 1, 20)

# Function to return a brick of two rasters only where they superpose
getOverlap <- function(a, b) {
  ab <- intersect(a, b)
  rbrick <- brick(resample(a, ab),
                  resample(b, ab))
  rmask <- trim(sum(rbrick))
  mask(crop(rbrick, rmask), rmask)
}

# Function to check if a raster and its subset are identical (conserved)
checkConservation <- function(zbrick, a, b) {
  checka <-
    (as(crop(a, zbrick[[1]]), 'BasicRaster') == as(zbrick[[1]], 'BasicRaster'))
  print(paste("1st raster is conserved: ",checka, sep=""))
  checkb <-
    (as(crop(b, zbrick[[2]]), 'BasicRaster') == as(zbrick[[2]], 'BasicRaster'))
  print(paste("2d raster is conserved: ",checkb, sep=""))
}

There is a trouble when the extent happens to be not properly placed in comparison to the resolution (see that r3 is actually not conserved):

z12=getOverlap(r1,r2)
checkConservation(z12, r1, r2)
  [1] "1st raster is conserved: TRUE"
  [1] "2d raster is conserved: TRUE"

z13=getOverlap(r1,r3)
checkConservation(z13, r1, r3)
  [1] "1st raster is conserved: TRUE"
  [1] "2d raster is conserved: FALSE"

Here is an attempt to correct for this by artificially adapting the extent of r3 as a function of the resolution (it works):

r3bis <- raster()
extent0 <- c(2.5, 120, -10, 400)
resol <- 5
xmin <- round_any(extent0[1], resol, floor)
xmax <- round_any(extent0[2], resol, ceiling)
ymin <- round_any(extent0[3], resol, floor)
ymax <- round_any(extent0[4], resol, ceiling)
extent(r3bis) <- c(xmin, xmax, ymin, ymax)
res(r3bis) <- c(resol, resol)
values(r3bis) <- runif(ncell(r3bis), 1, 20)

z13bis=getOverlap(r1,r3bis)
checkConservation(z13bis, r1, r3bis)
  [1] "1st raster is conserved: TRUE"
  [1] "2d raster is conserved: TRUE"

Any better way to do that generically and more concisely than above?

Is there really no built-in function to do that (common?) operation?

(i.e., replacing getOverlap --> superposing two or more raster layers with different extent/origin and automatically selecting (subsetting) areas where there are data in all of them and homogenize the extent/origin or the resulting subsets)?

Ideally, the solution would even generically do that for rasters with different resolution (i.e., take the subset of one raster where there are data in another, coarser one).

Maybe in another R package (code snippet very welcome)?

This question is related to Calculating area of overlap between 2 raster layers with different origins and extents in R and How to create a raster brick with rasters of different extents?, though I haven't really found my answer there.


texts: Finding nearest Stop location (DB) from current location

texts:
I could not think of a Title which exactly describes my problem, but I will try to explain.

I have a bus route as DB table where Lat/Long of each Bus stop is stored.

Now, I get live GPS cordinates and when the bus reaches a particular point, I want to know whether its close to Stop S2 or S3 - The key is that least distance should be measured along the bus route , not the shortest linear distance ignoring say a curve.

I am using Google maps API. Kindly suggest which path to take.Please note that its not a nearest place from current location using google places API.


texts:
I am doing some test in ArcGIS online to know how much helpful it is for my firm, But when I opened my road line .Zip shapefile in ArcGIS online it is showing some snapping issues as well as changed the shape of the roundabouts. (road line does not have any problem in Desktop GIS softwares) Anyone can help me to know what is actually happening with files when I open it in ArcGIS Online.

ArcGIS Desktop

ArcGIS Online

Both are same vector file, but the first one is in ArcGIS Desktop and Second image is in ArcGIS Online.


texts: Problem validating parent model with nested models in modelbuilder

texts: I have a parent model with several nested models.  I'm having trouble getting the parent model to validate.  The issue is with sub model 4.  The two screenshots are of the parent model and sub model 4.  The output from sub model 3 feeds into parameter “Merged_BBK_Assets” in sub model 4.  There are no other input model parameters in sub model 4.  If I run the first three sub models then open, validate and run sub model 4 from within its model window, it runs fine.  The Merged_BBK_Assets is created in sub model 3 and does not exist till then.


texts: Use ArcPy to set vertical coordinate system

texts:
I'm trying to automate a process where a new geodatabase is created and includes a series of point feature classes that show survey points for drilled wells.

Now, I have managed to set the horizontal coordinate system and put all the data into the appropriate fields including the x,y and z coordinates, but I cannot for the life of me figure out how to set the vertical datum. I need to do this so that wells with elevation values above/below sea level can be directly compared to one-another.

To set the horizontal coordinate system I have:

in_dataset = fc

# get the coordinate system from the proper parameter
hzCoords = parameters[13].valueAsText

# run the tool
arcpy.DefineProjection_management(in_dataset, hzCoords)

Where do I go from here to set the vertical datum? I'd even be happy setting the vertical datum as a standard as all the data that could possibly be used will be in the same vertical datum.

Edit: This is not a duplicate question, the answer provided in the "duplicate" doesn't work for me.


texts: Reading Lambert Conformal Conic NetCDF into GeoServer?

texts:
I'm working on reading in a NetCDF file into GeoServer and GeoServer has no problem reading it in as a data store, but when I go to publish the layer from the data store I get an error that states "Unable to load raster for granuleDescriptor" from org.geotools.imageio.netcdf.NetCDFImageReader.

I've read through the CF Conventions 1.6 Documentation and COARDS documentation to ensure the NetCDF file meets formatting standards. I've been working with the dataset for quite some time and am unable to find out what the issue is.

I'm using GeoServer 2.7.4 which is using GeoTools 13.4. In case you'd like to use the preconfigured environment I'm using, the environment it's configured in is my own GeoServer Docker container. Information on the container can be found on it's GitHub page.

The sample dataset can be found here. The link includes the dataset, projection in WKT, and a text file showing the stack traced that is thrown.

Here is the exact error thrown.

2015-12-18 22:29:32,882 DEBUG [io.netcdf] - Unable to load raster for granuleDescriptor
org.geotools.coverage.io.netcdf.NetCDFResponse@3c9d1be6 with request NetCDFRequest [
interpolation=javax.media.jai.InterpolationNearest@5420f335,
source=org.geotools.coverage.io.netcdf.NetCDFSource@6621e90,
readType=DIRECT_READ,
spatialRequestHelper=SpatialRequestHelper [
    requestedBBox=ReferencedEnvelope[0.0 : 5.0, 54.0 : 59.0],
    cropBBox=ReferencedEnvelope[0.0 : 5.0, 54.0 : 59.0],
    requestedRasterArea=GridEnvelope2D[0..4, 0..4],
    destinationRasterArea=java.awt.Rectangle[x=1,y=1,width=5,height=5],
    requestCRS=GEOGCS["WGS 84",
        DATUM["World Geodetic System 1984",
            SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
        UNIT["degree", 0.017453292519943295],
        AXIS["Geodetic longitude", EAST],
        AXIS["Geodetic latitude", NORTH],
        AUTHORITY["EPSG","4326"]],
    requestedGridToWorld=PARAM_MT["Affine",
        PARAMETER["num_row", 3],
        PARAMETER["num_col", 3],
        PARAMETER["elt_1_1", -1.0],
        PARAMETER["elt_1_2", 59.0]],
    requestedResolution=[1.0, 1.0],
    requestedBBOXInCoverageGeographicCRS=null,
    requestCRSToCoverageGeographicCRS2D=null,
    destinationToSourceTransform=null,        coverageProperties=org.geotools.coverage.io.SpatialRequestHelper$CoverageProperties@6e92b820,
    empty=false,
    needsReprojection=true,
    approximateRequestedBBoInNativeCRS=null],
originalRequest=org.geotools.coverage.io.CoverageReadRequest@62767596,
name=soil_moisture]
Resulting in no granule loaded: Empty result

Here is the projection of the dataset:

PROJCS["Lambert_Conformal_Conic",
GEOGCS["GCS_Sphere",
    DATUM["Not_specified_based_on_Authalic_Sphere",
        SPHEROID["Sphere",6370000.0,0.0]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["false_easting",0.0],
PARAMETER["false_northing",0.0],
PARAMETER["central_meridian",-97.0],
PARAMETER["standard_parallel_1",30.0],
PARAMETER["standard_parallel_2",60.0],
PARAMETER["latitude_of_origin",40.0000076294],
UNIT["Meter",1.0]]
AUTHORITY["EPSG", 102009]

One strange observation is that the error seems to state it reprojecting to a projection other then the one that the file is defined as. I've also tried placing the WKT projection string as the crs_wkt attribute of the Lambert_Conformal variable with no dice.


texts: Use of array image in Google Earth Engine

texts:
I have a array image:
var blist = change.select('tBreak');
Each pixel value in the image is a time.The time format uses is the serial date, starting from 0000-01-01.

And I have an image collection of NDSI values per day.

var imgcollection = ee.ImageCollection('LANDSAT/LT05/C01/T1')
    .filterDate('2000-02-14','2010-01-01').filterBounds(table)
    .map(function(image){return image.clip(table)}) ;

function NDSI_V1(img) {
 var ndsi = img.normalizedDifference(["B2","B5"]);
 return ndsi;
}

var ndsi = imgcollection.map(NDSI_V1);

I want to get an image where each pixel is the ndsi difference of the time provided by blist.For example, there is a pixel blist whose value is [t1, t2]. Then, the pixel value of the target image is the value of ndsi at time t2 subtract the value of ndsi at time t1.
I hope someone can help me.Thanks

This is my array and image