texts:
I'm trying to run the following algorithm which runs fine when I select a layer I imported from the CSV file in question but not when I just try to run if from the file itself.

input = '/media/path/points.csv=csv&detectTypes=yes&xField=long&yField=lat&crs=EPSG:103172&spatialIndex=no&subsetIndex=no&watchFile=no'

layers = QgsProject.instance().mapLayersByName('points')
#input = layers[0]

output = '/media/path/outline.shp'

params = { 'DATE_FORMAT' : '', 'GROUP_FIELD' : 'rid', 'INPUT' : input, 'ORDER_FIELD' : 'vertex_ind', 'OUTPUT' : output }

res = processing.run('qgis:pointstopath', params)

I'm getting:

  File "/usr/share/qgis/python/plugins/processing/core/Processing.py",
  line 137, in runAlgorithm
      raise QgsProcessingException(msg)
  _core.QgsProcessingException: Unable to execute algorithm Could not load source layer for INPUT:
  /media/path/points.csv=csv&detectTypes=yes&xField=long&yField=lat&crs=EPSG:103172&spatialIndex=no&subsetIndex=no&watchFile=no
  not found


texts: One polygon shapefile is not visible despite successful export with QGIS2WEB

texts: In my application, all the layers including vector and raster layers successfully imported and web-hosted, but only one vector layer is not visible online, which is visible in desktop mode as well as on the legend too. even I have increased the preview feature limit also. What could be a problem?


texts:
How can I calculate the average moving window in Google Earth Engine? I want to apply it over SWIR1 band to map water bodies. Specifically, I want to know which functions I should use. Based on search,

Reducer.mean()
kernel.square()
Focal_mean()

seem to be candidates.


texts:
I have a javascript page that was built with qgis/webappbuilder.  The legend is currently built with an array listed as follows:

var group_environmental = new ol.layer.Group({
                            layers:     [lyr_bedrockgeology,lyr_surfacegeology,lyr_deednoticeareas,lyr_cea,lyr_historicfill,lyr_rivers,lyr_chromatesites,lyr_newjerseykcsl],
                            showContent: true,
                            title: "Environmental"});
var group_landuse = new ol.layer.Group({
                            layers: [lyr_waterbodies,lyr_wetlands,lyr_forests],
                            showContent: true,
                            title: "Land Use"});
var group_basemap = new ol.layer.Group({
                            layers: [lyr_natural215,lyr_wmsnjroads,lyr_parcelwfsthudsoncountyparcels,lyr_hudsoncountyblocks,lyr_jerseycityzoningmap,lyr_hobokenzoningmap],
                            showContent: true,
                            title: "Base Map"});

lyr_natural215.setVisible(true);
lyr_wmsnjroads.setVisible(false);
lyr_parcelwfsthudsoncountyparcels.setVisible(false);
lyr_hudsoncountyblocks.setVisible(false);
lyr_jerseycityzoningmap.setVisible(false);
lyr_hobokenzoningmap.setVisible(false);
lyr_waterbodies.setVisible(false);
lyr_wetlands.setVisible(false);
lyr_forests.setVisible(false);
lyr_bedrockgeology.setVisible(false);
lyr_surfacegeology.setVisible(false);
lyr_deednoticeareas.setVisible(false);
lyr_cea.setVisible(false);
lyr_historicfill.setVisible(false);
lyr_rivers.setVisible(false);
lyr_chromatesites.setVisible(false);
lyr_newjerseykcsl.setVisible(false);
var layersList = [group_basemap,group_landuse,group_environmental];
var legendData = {
  "DRSQL_BedrockGeology20170224105153647": [{"href": "9_0.png", "title":""}],
"Natural_201520170217162025846": [{"href": "0_0.png", "title": ""}],
"ddde3cb3a18740849d6c911e49086cea_1620170217173950822": [{"href": "12_0.png", "title": ""}],
"DRSQL_LULC2012WATER20170217164541478": [{"href": "6_0.png", "title": ""}],
"DRSQL_SurfaceGeol20170224105208638": [{"href": "10_0.png", "title": ""}],
"hudsoncountyblocks20170217162028759": [{"href": "3_0.png", "title": ""}],
"076a3d08a34348d2bdb3c109ec349e53_1720170217173034797": [{"href": "11_0.png", "title": ""}],
"DRSQL_LULCForest20170227082648024": [{"href": "8_0.png", "title": ""}],
"DRSQL_LU2012Wetlands20170217164530627": [{"href": "7_0.png", "title": ""}],
"ed5549b6bff140fda40e69d5dd251843_820170217170758597": [{"href": "15_0.png", "title": ""}],
"6f11f6204ffa40a09527c8205aec4425_720170217170412551": [{"href": "16_0.png", "title": ""}],
"statefill20170217162103537": [{"href": "13_0.png", "title": ""}],
"DRSQL_STATERIVERS20170217161657796": [{"href": "14_0.png", "title": ""}],
"WMS_NJRoads20170217161657704": [{"href": "1_0.png", "title": ""}],
"ParcelWFST_HudsonCountyParcels20170217163348695": [{"href": "2_0.png", "title": ""}]
};

Is it possible to have the legend built based upon the setVisible variable when it is true and hide it when the layer is not visible?  I was looking at the push() method and I was thinking of something along the following pseudocode, but I don't know how it would actually be written:

var legendData = {}
For (var layer in layersList) {
 If layer.setVisible = true then
 layer.push()
}

This way, when a layer is turned on in the layer list, it will show in the Legend and when it is turned off it would be removed from the Legend div.  Any suggestions?


texts: How to extract Latitude and Longitude of Shapefile for importing into Tableau?

texts:
I'm having a hell of a time so any help would be appreciated.

I want to extract the latitude and longitude of the Health Authority boundaries from the zip file below.  The ultimate goal is to import these coordinates into Tableau.

http://www.bcstats.gov.bc.ca/Files/1d01fdf3-dc2a-4715-ba81-0aef150a49b8/Boundaries-HealthAuthorities.zip


texts: Using fixed QGIS modeler vector input parameter?

texts:
I'm writing a QGIS (v3) model and I'd like to have a vector layer input fixed to a specific shapefile. This way, every time I run the model, I don't need to select the file.

Is this possible?

Right now, when I choose a vector layer input, it does not let me select which file to use.


texts: Many layers from a unique KML file? (OpenLayers)

texts:
I have a KML file generated from a server that contains many networks.

I want to know if is it possible to generate one layer for each network from this single KML file?


texts: Converting Map to graphics and annotations in ArcGIS for Desktop?

texts:
i want to export a map for later editing before print, so i thought about converting all the annotations and and graphics and save them in the .mxd map.

when i export graphics after exporting labels , the graphics cover some labels, and there is no option to make the graphics in back level. but when i export the graphics before exporting labels, the labels makes some displacement due to some maplex config, despite making a maplex lock on labels, it cannot be fixed.

Is there a way to manipulate graphics and annotation as layers despite saving them in the map?

if there is an alternative solution to edit map in a CAD like style before print is welcome.

i'm using ArcMap 10.1.


texts: osm2pgsql error when import pbf for Nominatim DB


texts:
I am trying to get the number of curves/bends of a polyline. I know that I can accomplish this by getting the vertices of the polyline, and check the from and to and compare their angles, if they match then no bend, if they don't match then that's a bend/curve. I am hoping that arcobjects might have an existing function that accomplishes that, any ideas ?
the pictures below shows the required.

public static int GetNumberOfCurves(this Ipolyline crntEdge)
{
// what I can do here is cast the polyline into IPointCollection
// get each point and get the from and to and compare the angles.
// but I am hoping there is something within the Apis that can get thosen curves
}


texts: Select by attribute using modulo operation?

texts:
In ArcMap 10.5, I want to select the rows where the modulus of the objectid by 3 equals 1.

How to write a SQL sentence in select by attribute window?

My current query statement is something like this:

MOD( [OBJECTID],3)=1

but unfortunately it selects all of the rows. What's the problem with that?


texts:
I just want to ask what these error messages mean... I am preprocessing jp2 images through SCP.
QGIS3.8
Python 3.6
jp2 images downloaded on Sentinel 2


texts: Using transform function in QGIS layer geometry generator?

texts:
I'm trying to use the following expression in the geometry generator in a QGIS layer to show a 1-mi boundary around points:
buffer(transform($geometry, 'EPSG:4326', 'EPSG:102654'), 5280)

However, the buffer doesn't show
To test, if I transform to the source to and from EPSG:4326, the buffer does work (but obviously doesn't display correctly).
What is it about the EPSG:2877 I'm using that is causing the problem?


texts: What is the difference between a Polygon Z and a Polygon ZM?

texts: I've been asked to make a new 3D dataset in an existing ArcScene document, to illustrate new borehole locations. The existing features have a geometry type of "Polygon ZM", but when I attempt to create new features (based on an extruded Polygon) the type is "Polygon Z". The original author is dust in the wind and I have no idea what the original methodology was! Can anyone clarify the difference between these types?


texts: Casting ILayer to IFeatureLayer in ArcObjects?

texts:
I'm trying to use the following code in an ArcMap 10.1 extension:

    private IFeatureLayer getLayer(string lname)
    {
        IMap          map;
        IFeatureLayer flayer;
        IEnumLayer    layerTag;
        ILayer        layer;

        try
        {
            map = ArcMap.Document.FocusMap;
            layerTag = map.Layers;
            layer = layerTag.Next();
            while (layer != null)
            {

                flayer = (IFeatureLayer) layer;

                if (flayer.Name.Equals(lname))
                {
                    if(validateFeatureClass(flayer.FeatureClass)){
                        flayer.Visible = true;
                        flayer.Selectable = true;
                        return flayer;
                    }
                }
                layer = layerTag.Next();
            }
            return null;
        }
        catch (Exception ex)
        {
            MessageBox.Show("Error: " + ex.ToString(), "Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            return null;
        }
    }

but it hits the skids (throws a cast exception) when I try to use flayer = (IFeatureLayer) layer;

I had before flayer = layer as IFeatureLayer but then name checking line failed due to a null reference exception.

Am I missing something obvious here?


texts: Changing CRS transformation using QGIS python code?

texts:
I am generating some maps with the python standalone scripting in QGIS. When i load Polygon shapefile with the CH1903 / LV03 CRS ( EPSG-21781) and fetching SQL database table having WGS1984 CRS (EPSG-4326)
sequence of Layers are as follows

Polygon Shapefile ( CH1903 / LV03 CRS -EPSG-21781)
SQL Database table (WGS1984 CRS -EPSG-4326)
Output Map units is in CH1903 / LV03 CRS -EPSG-21781 for Manually added layers
Output Map units is in WGS1984 CRS -EPSG-4326) for standalone script with same shapefile and same data.

Now my question is how to change CRS transformation in standalone script where i will get correct output in the form of CH1904 CRS after loading shapefile and point layer data from SQL database.


texts: Why is GDAL/QGIS creating Geospatial PDF's with erroneous spatial data?

texts:
I have a GeoTiff that I wish to convert into a geospatial PDF for use in Avenza.  I attempted to use gdal_translate, and also used the QGIS's Raster->Conversion->Translate which apparently just builds gdal_translate commands.  In both cases I am able to create a PDF, but the spatial data is wildly inaccurate.

To test the geospatial PDF, I load it into Adobe Acrobat Reader. The map displays well, but when I check the spatial data by using Acrobat Reader's Edit->Analysis->Geospatial Location Tool I see incorrect values for longitude and latitude.

If I zoom in closely in Acrobat Reader and move the mouse across the map, I can see that lon/lat values are cycling over their respective ranges several times across the map.  For example, if I move the mouse pointer from left to right across the map, longitude values go from 0 up to 180 and then to -180 and up to 0, and on as if I were repeated flying around the globe.  Similar pattern for latitude.

This GeoTiff was created using QGIS and GDAL as discussed elsewhere in this forum. I have verified that the GeoTiff's spatial info is correct by successfully loading it back into QGIS as a raster layer and comparing it against the original vector data.

I would guess that this is an issue with the coordinate reference system and have tried tinkering with a_srs settings to no avail other than sometimes gdal_translate fails to produce any spatial data at all in the PDF.

So my resulting PDF's will load in Avenza but it cannot interpret the spatial data correctly.  For example, it may say that the distance is thousands of miles away when it should be near zero.


texts: Creating a map of population density using shapefiles in R

texts: This would be a pretty simple task for me in ArcGIS, but I'm trying to start using R and I'm stumped. I have census data in the form of a shapefile that contains the population of each shape in the shapefile. I would like to divide the population by the area of each shape in order to create a density map. But I can't figure out how to calculate the area of each shape in the shapefile, and I can't figure out how to take the area once I've calculated it and divide the population by the area.


texts: r.sun.daily - WARNING: Unable to rename null/cell file [...] to [...]: File exists (GRASS GIS 7.0.4)

texts:
When running the r.sun.daily (link) addon for GRASS GIS 7.0.4, which is a script to run the r.sun module in a loop, I get this error:

WARNING: Unable to rename null file 'C:\Users\.../.tmp/unknown/3560.1' to C:\Users\.../cell_misc/Beamtest/null': File exists

WARNING: Unable to rename cell file 'C:\Users\.../.tmp/unknown/8584.0' to 'C:\Users\.../fcell/Beamtest': File exists

While the script is able to finish. It returns this error multiple times. So it seems that it is unable to return separate rasters for each loop of r.sun for each of the requested output file. Does anyone know what could be the problem?

Below is the code I use to run to script:

r.sun.daily --overwrite elevation=taastrupDEM2clip@User aspect=taastrupAspect@User slope=taastrupSlope@User lat=taastrupLat@User long=taastrupLon@User horizon_basename=horangle horizon_step=11.25 beam_rad=taastrupBeamtest diff_rad=taastrupDiffusetest refl_rad=taastrupReflectedtest glob_rad=taastrupGlobaltest start_day=1 end_day=3 day_step=1


texts: Does a Google Earth Pro licence allow you to export geo-referenced satellite images for use in other GIS software?

texts:
I'm considering purchasing Google Earth Pro so that I can use satellite images in commercial reports.  I wasted my trial period however, and I don't know whether I can export geo-referenced images from GE pro for use in other software (e.g. QGIS).

Can this be done (both in practical and legal terms), or does the licence tie you to only printing from GE Pro, or is it legal to extract those images, but you can only get them as jpegs?

As a slight aside, does the licence allow you to print Google maps that are generated from other sources, e.g. the OpenLayers plugin in QGIS, which would be the simplest solution for me


texts: Finding distance between point layer and matching polygon layer using ArcGIS Pro

texts:
I have two points (GPS photo coordinates) per polygon (area photo is taken).
The two points have an identifier that links both to their corresponding polygon, so I already know each polygon will have two corresponding points. This is just to make sure the photos' gps points are within a reasonable distance of the polygon (like 500ft). I do not care if they are closer to one polygon than another, I just need to ensure the photo gps points are somewhat near their respective polygon.
I have several thousand cases of this and am using ArcGIS Pro. I have been toying with the near tool, but it seems it will just find the nearest feature, whether or not it shares the correct attributes.
Is there another tool I could utilize to figure this out?


texts: Making network from line feature class using Network Analyst in ArcGIS Pro?

texts:
So I have points in an area and want to find the shortest distance to travel to all the points once by plane. So I think I need to do a network analysis. I am using ArcGIS Pro.

I have a line feature class that connects every point to all other points (removing duplicates and connections to itself, etc.). I know this isn't a true road network but I am hoping it is possible to "hack it" into acting similar since the flight lines connect to each point and represent the potential travel routes.

I have been following this tutorial and made a network no problem with their sample data: https://www.esri.com/arcgis-blog/products/arcgis-pro/transportation/create-a-local-government-network-dataset/

It goes through how to make a network from a feature class BUT the issue is it already comes with a template to use that only works with the specific sample data that comes with the tutorial.

I can't figure out how to make a network from the feature class I made without a template. I have the attributes needed, it's in a feature dataset, has a projected coordinate system, a "street name", all that sort of stuff.

Does anyone have any idea how to made a network dataset without a template?


texts: Importing multiple .asc files into PostGIS violates check constraint. Why?

texts:
I am importing thousands of .asc files into PostGIS into this table:

CREATE TABLE stg.COUNTRY_1M(rid serial primary key, rast raster);
CREATE INDEX ON stg.COUNTRY_1M USING gist (st_convexhull(rast));

from command line:

export PGPASSWORD=mypasswd
for i in $(ls *.asc); do raster2pgsql -a -C -I -s 27700 -t 1000x1000 "$i" stg.COUNTRY_1M | psql -U user1 -d data_processing -h localhost -q; done

but I am getting the following error starting from the second file:

Processing 1/1: country_1m.asc
ERROR:  new row for relation "country_1m" violates check constraint "enforce_max_extent_rast"
DETAIL:  Failing row contains (2, 0100000100000000000000F03F000000000000F0BF0000000080841E41000000...).
etc.

How can I generate one table for all the raster points without errors?


texts: Why QGIS produces georeferenced TIFF files differing in size by two orders of magnitude on the basis of very similar JPEG maps?

texts:
I am using QGIS for vectorising some small-scale maps from a historical atlas. The maps are provided as JPEG images 3703 x 4718 ranging roughly from 5 to 9 MB in size. All georeferenced tiff images are roughly from 40 to 100 MB. But one. One of the maps, which is by no means remarkable and processed in exactly the same manner as the others results in a 5+ GB TIFF file which is nearly unmanageable.

What may be the cause of that?

Software details: QGIS 3.4.2-Madeira under Ubuntu 16.04.

Source image is imported as: "Unknown datum based on Bessel 1841 ellipsoid".

Transformation settings are: "Transformation type: Thin Plate Spline / Resampling method : Cubic / Target SRS: EPSG:4326 - WGS 84 / Compression: none"


texts: Why is my default value stil NULL even when i have made an expression for the Default Value?

texts:
I seem to have a problem with the default value in one of my colums by the calculator expression.

I have two specific columns that have widget input one being tekst value and the other being numbers

These are called PlotL and PlotC. At the end there is third column which will have a new value which just is the merging of two value's in those two columns.

So I have made the expression PlotL || PlotC as the "default value" of that Third Column. And the example does give the result what I want. But here is the kicker, after the object is added/Created and I open the Attribute Table, it is still NULL. Now I have searched before here for a simular question and that sollution was just to save my edits and go out of my edits. But after that still nothing.

What is going on here and what I am doing wrong?


texts: I am trying to calculate the distance between a polyline (River) and multiple points. However after installing the MMQGIS plugin and running a Hub Distance between the two layers the error comes up 'Hub layer River not found'


texts: convert png with alpha channel to GeoTiff

texts:
How do I convert a png with an alpha channel to a GeoTIFF using gdal_translate so that the alpha channel gets reflected in the GeoTiff. Currently the GTiff that is produced is resulting in 3 Bands, which does not contain the transparency requirements that I want.
The command I am trying is.:

gdal_translate -of GTiff
-gcp 567.344 496.649 4.00783e+06 4.42978e+06 -gcp 391.051 1127.79 3.89327e+06 3.44496e+06 -gcp 1595.33 290.84 5.60473e+06 4.91106e+06 -gcp 164.791 32.1259 3.23639e+06 5.03231e+06 -gcp 1562.15 1131.46 5.57244e+06 3.53e+06 -gcp 447.23 586.995 3.84236e+06 4.2981e+06 -gcp 1.73364 49.8788 3e+06 4.936e+06 -gcp 999.31 38.3279 4.5828e+06 5.2809e+06
-co ALPHA=YES 'source' 'dest'


texts: Reducing GetFeature radius / buffer in Geoerver 2.5.2

texts:
When clicking some features on the map to get feature information in OpenLayers (as part of a GetFeature request) I'm getting also information of other nearby features that I'm not clicking on.

I've notice that this is more accurate in GeoServer 2.6-RC1 but at the moment this version is failing me in quite important operations like queries of this sort that are working in version 2.5.2:

http://localhost:8080/geoserver/wms?service=WFS&version=1.0.0&request=GetFeature&typename=mittic:Geral&PROPERTYNAME=land_cultu&OUTPUTFORMAT=application/json&

I can't use the maxFeatures parameter because sometimes I have overlapping features and I need the information of both.

So far I've tried setting the Default Rendering Buffer parameter in the web interface, setting buffer to a small value in vendor parameters in code but nothing makes any changes.

Any help?

(Edited to include issues print screens)

Difference in accuracy: (red dot is where I click. Feature id 48 is the yellow one below

2.6:

2.5.2:

GetFeature query working in 2.5.2 and failing in 2.6-RC1


texts: New SQL Monitor Showing Database Deadlocks, Should I be alarmed?

texts:
We recently installed a SQL Monitoring tool that is raising High Alerts for SQL Server Deadlocks on my SDE database at random times during the day.

Using the information provided in the Alert I have found that the deadlock is relating back to  the SDE_state_locks Table.

SQL info: SQL Server 2008 R2 (x64)

ArcSDE 10.0


texts: OS Openspace with polygon layer through openlayers 3

texts:
I am trying to develop a web page displaying a base layer from Ordnance Survey openspace api and overlaying flood polygon data on to from geoserver. I understand that the CRS for OS is EPSG:27700 so what I have done is:

1) Loaded the flood data already in EPSG:27700 into Geoserver
2) Ensured that the Native CRS specified in GeoServer is EPSG:27700
3) Checked that the layer displays something in the "Layer Preview"
4) Created a basic webpage using OpenLayers3 utilising the handy JS code from Bill Chadwick (http://www.bdcc.co.uk/ol3/examples/os-openspace.html)

Here is the code I am using:

<script>

    var openSpaceOl3 = new OpenSpaceOl3('EB8FE9471221364EE0430B6CA40A6BDC', document.URL, OpenSpaceOl3.ALL_LAYERS);

  var layers = [  openSpaceOl3.getLayer(),
        new ol.layer.Tile({
      extent: ol.proj.transformExtent([-6, 49, 2, 56], 'EPSG:4326', 'EPSG:27700'),
      source: new ol.source.TileWMS({
        url: 'http://localhost:8080/geoserver/FloodRisk/wms',
        params: {workspace:'Flood', layers: 'LowRisk', tiled: true},
        serverType: 'geoserver',
        projection: openSpaceOl3.getProjection();
      })
    })
    ];

  var map = new ol.Map({
    layers: layers,
    loadTilesWhileInteracting: true,
    target: 'map',
    view: new ol.View({
      center: ol.proj.transform([0, 52.5], 'EPSG:4326', 'EPSG:27700'),
      zoom: 8,
      projection: openSpaceOl3.getProjection();
    })
  });

</script>

The base layer displays correctly on its own, but when I add in the flood layer from GeoServer it doesn't work. It should work without too much problem if the projections of both layers are EPSG 27700 - right?!?
I know that there are some more complicated examples overlaying OSM and OS tiles which require the proj4 transformations, but these should not be required if the transformation is the same - right? :-)

I have a feeling that some of the problem could be also due to the extents for the flood layer not being correct as when I take this line out the OS map does display and I can see calls to Geoserver in fiddler, but the tiles are not correct (presumably because the extents are missing).

Any ideas? - there could me multiple problems with the above code as I'm tying myself in knots trying to figure it out!


texts: Advice on which version of AutoCAD to purchase

texts:
I am starting a consulting agengy and I need to determine what my best interests are regarding the purchase of AutoCAD software.  I have great faith in the more reputable users on this site, and I'm seeking advisement; particularly from those of you who use both ESRI software and map capable versions of CAD.

A little background: Due to variuos positions I've held in my locale, I have strong expertise in relation to Mining Land Tunure, and the Aggregate Resources Act (in Ontario, Canada).  For those of you who are unfamiliar, Aggregate material refers to Pit & Quarry operations (sand, gravel & crushed stone).  Also notewothy, there are a number of Environmental studies associated with these strands for which I provide AutoCAD, GIS, and legislative support.  I leverage GIS and AutoCAD technology interchangably.  I am extremely comfortable going back-and-forth between these two software packages, which allows me to bring a variety of effiiciencies to my worflows. Lastly, I am completely self-taught in AutoCAD, but I have exceptional strength with regard to using it for my needs.

My dilemma I moved from LDD to Civil 3D a few years ago, and I simply can't imagine going back to a less capable version od AutoCAD now that I've experienced the Cadillac of the AotoCAD realm.  The difference between map 3D and Civil 3D is $5000 +tax per seat.  This is a lot of money at start-up.  I only need a few tools (to my knowledge) from the Civil 3D environment (surface from survey, from .shp, etc).  I don't need most of its functionality (corridors, alignments, etc, etc ................>.  The reseller has indicated that he can give me a few of the Civil tools as part of the Map 3D package, but I have never used it "stand alone".  Otherwise, I need spatial data in CAD for site plans via mapconnect and mapimport.  For the most part, it will be shapefiles.

If anyone could advise (who has knowledge of both Civil & map versions) it would be greatly appreciated.  I have done more reading than my schedule can afford.  Will Map 3D meet my needs?  Are there marked differences and shortcomings when measuring Map 3D against the superior product.  I appreciate any advisement.


texts:
I have the ability to select features on the map with a click using OpenLayers.Control.SelectFeature. How can i add a double-click handler to that?

I have tried modifying this code to suite my needs, but it ends up overriding my SelectFeature. So i'm able to handle the double click, but the single click in the SelectFeature stops working.

DEMO LINK

DEMO CODE:

<script type="text/javascript">
    var map, vectorLayer;

    function init() {
        map = new OpenLayers.Map('map');
        var layer = new OpenLayers.Layer.WMS("OpenLayers WMS",
                "http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: 'basic' });

        vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");

        map.addLayers([layer, vectorLayer]);

        var wkt = new OpenLayers.Format.WKT();

        polygonFeature = wkt.read("POLYGON((-85.419086 49.25385,-55.05949 44.951293,-71.090388 1.315632,-91.743655 4.348987,-85.419086 49.25385))");

        vectorLayer.addFeatures([polygonFeature]);
        var bounds = polygonFeature.geometry.getBounds();
        map.zoomToExtent(bounds);

        addClickHandler();
        addDoubleClickHandler();

    }

    function addDoubleClickHandler() {

        var DblclickFeature = OpenLayers.Class(OpenLayers.Control, {
            initialize: function (layer, options) {
                console.log(this);
                OpenLayers.Control.prototype.initialize.apply(this, [options]);
                this.handler = new OpenLayers.Handler.Feature(this, layer, {
                    dblclick: this.dblclick
                });
            }
        });

        var dblclick = new DblclickFeature(vectorLayer, {
            dblclick: function (event) {
                console.log(event);
            }
        });

        map.addControl(dblclick);
        dblclick.activate();
    }

    function addClickHandler() {

        var handler_featureselected = function (e) {
            console.log("handler_featureselected");
        };
        var handler_featureunselected = function (e) {
            console.log("handler_featureunselected");
        };

        var selectControl = new OpenLayers.Control.SelectFeature(vectorLayer,
            {
                hover: false,
                clickout: false,
                multiple: true,
                toggle: true,
                //box: true,
                eventListeners: {
                    featurehighlighted: handler_featureselected,
                    featureunhighlighted: handler_featureunselected
                }
                //multipleKey: "shiftKey"
            }
        );

        map.addControl(selectControl);
        selectControl.activate();
    }

</script>


texts: Using ArcPy to export individual mxds from data driven pages?

texts:
I'm trying to generate individual mxds for each page in my data driven pages (which I have set up already). I have 38 pages in total, so I would need to generate 38 mxds. The pages are named according to the zone (A, B, C etc.) and the number assigned (1,2,3 etc). Each page would be named something like A1, B2, or C13. The zone name is recorded in attribute table under the field name "DIST_NAME".

I'm not very familiar with python, and this my first foray into python in ArcGIS. I've managed to piece together some code. I have two versions; neither of which works.

Version 1:

I was able to generate individual mxds with this version, but I didn't get the proper file names. I gave me 1, 2, 3 etc. when I wanted A1, A2, A3 etc.

for pageNum in range(1, mxd.dataDrivenPages.pageCount +1):
   mxd.dataDrivenPages.currentPageID = pageNum
   mxd.saveACopy(r"H:\Test\\" + str(pageNum) + ".mxd")
   mxd.dataDrivenPages.refresh()

Version 2:

I got the two pageID lines off from the help site. This generated 1 mxd with the incorrect name.

for pageNum in range(1, mxd.dataDrivenPages.pageCount +1):
   pageID = mxd.dataDrivenPages.getPageIDFromName("DIST_NAME")
   mxd.dataDrivenPages.currentPageID = pageID
   mxd.saveACopy(r"H:\Test\\" + str(pageID) + ".mxd")
   mxd.dataDrivenPages.refresh()

Can anyone please point out what I'm doing wrong in my code?


texts: Eliminate Polygon Part tool doesn't eliminate part - a bug?

texts:
I'm using the Eliminate Polygon Part tool in ArcGIS to remove dry land surrounded by water (aka islands).

Tool Inputs:
Condition: AREA
Area: 50,000 Square Feet
Percentage: 0
Eliminate contained parts only: CONTAINED_ONLY
(There were no errors, the tool completed successfully)

It is my understanding, according to the Help, that by using this tool that any island 50,000 square feet or less will be absorbed by the polygon that is surrounding it (and therefore it will be "eliminated"). But, while that is happening, it seems something else is going on as well.

Actual polygons are being seemingly "removed" in the final output (which is weird in and of itself, because I didn't think this tool was supposed to remove actual polygons), but also, the output makes it appear that those polygons have been eliminated, when in fact, upon closer inspection, they are still there, "underneath" the larger polygons.

I'm confused. Is this supposed to be happening, am I misreading how to use this tool, or is this a bug? I could only really find two questions pertaining to this problem here and here, but no answer.

Image Descriptions:
The image on the left is the original feature class. The image on the left is after I run the tool. Upon investigation I found that areas that seem to have disappeared in the feature class on the right are actually there (e.g. area selected in blue). You can see the selected feature in the right-hand image in the image on the left, but you can only see it in the image on the right after I've selected it and it becomes highlighted. (I found these areas when multiple features were unexpectedly selected while using the Identify tool).


texts: Entering manual coordinates to draw polygon in Leaflet?

texts:
I want the user to enter manual coordinates of a polygon and then to click on a button to draw the polygon.

My code:

        Polygon: <input type="text" name="coordPolygon" id="coordPolygon"/>

        <input type="button" onclick="drawPolygon()" value="Draw"/>

When the user enters for example [[48,-3],[50,5],[44,11],[43,-2]] the console tells me:

TypeError: latlngs is null

Note: I didn't test Leaflet.draw, I want to try with it later


texts: How do you override the required Create Fishnet parameters in ArcMap 10.1?

texts:
I'm writing a python script that creates a fishnet in a specified area (parcel shapefile) that accepts user input to create a polygon shapefile that represents a building, and polyline shapefile that represent parking area in the parcel.  In ArcMap, you're able to choose the optional parameter of "Template Extent" that automatically populates the Y-Axis, and Origin Coordinates that the tool requires.  I keep getting this error when running my script:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000735: Fishnet Origin Coordinate : Value is required
ERROR 000735: Y-Axis Coordinate : Value is required
Failed to execute (CreateFishnet).

In my CreateFIshnet syntax, using "#" in the origin_coord and y_axis coord results in an error instead of passing the request to the optional {template}.

Is there a way around this? I'd like the optional {template} parameter to take priority, but I'm wondering if I have to create points within the specified area and pass those coordinates to the fishnet parameters?


texts: How to make XY to Line dynamic to access query?

texts:
I have connected the Access file to the ArcGIS file, and displayed it using the tool XY to line, but when I change the access file, this is not automatically adjusted in the ArcGIS template. Somehow, ArcGIS makes the XY line static, so it does not have the possibility to change.

What should I do to make the produced lines 'dynamic'?


texts:
I have a 3rd party python geoprocessing script that requires rpy2, and thus also r. What is the best way to get these working together?

Using R with ArcGIS Desktop says the most useful option for using R with ArcGIS is via the Geospatial Modelling Environment but as near as I can tell GME doesn't use rpy2. The script I'd like to use is not that large, but I didn't write it and don't want to port it to a different module. I don't understand the workings well enough to be confident I could do so without making a mistake.


texts:
I have a question concerning label placement in QGIS. I'd like to rotate every label by 180°. Therefore, I set the rotation value to 180 (I've tried different ones as well as different variable types) according to the description:

I also applied every combination of "Preserve data rotation values" (what does that actually mean?) checked/unchecked and Rendering->"Show upside-down labels" (each value). But all this seems not to have any effect on the labels. What am I missing?


texts: Calculate field tool doesn't stop running because of codeblock in ModelBuilder?

texts:
I am running the following model, which seems to work and populate the added field that I want, but the final calculate field doesn't stop running even though it seemed to do what it should. The point shapefile has 48,000 rows. Essentially I am seeing if !Yield! is not more than 2 standard deviations away from the !Yield! mean. If it is within the 2 standard deviations then return 1 else return 2 into the column.

Value = mean of the yield
Value2 = standard deviation of the yield.

I am using ArcGIS Desktop 10.5.1.


texts: Using PostGIS ST_ClusterWithin() on table?

texts: I am using the postgis ST_ClusterWithin function to cluster my spatial data in a table. I want to get the rows of the table as a result of the query clustering query (maybe the Pk's of each element in each cluster) instead of the geometry collection. Returning geometry collection seems to loose the context of the data by just giving me the geometry and nothing else. Now will I have to query the database with a ST_Contains or ST_Within again on the database to form the clusters using the rows in that table. Is there a different way. I am using a query similar to Spatial clustering with PostGIS


texts: Grouping points using grouping analysis to look at raster characteristics within overlapping buffers?

texts:
I want to extract averages from raster data that fall within buffer zones around a village point.

The problem is that the villages are pretty close together in some places and I need to come up with a methodology to group villages and their respective buffers to create groups.

Then I want to look at averages in these zones using the zonal statistics tool.

I am open to another way of doing this - any suggestions welcome!


texts: Is it possible to import a KMZ file in to access with VBA?

texts:
I am building an MS Access database and am a beginner but have experience with VBA coding in excel (including the generation of KML files).

In theory, is it possible to import a KMZ file in to access, compare data (unique numbers) from the KMZ with tables within the access database, amend the KMZ data (change color codes for polgygons where the data matches), and regenerate the KMZ (or as KML) for display in google earth?

I have reviewed the KMZ file and the unique numbers I require are stored in the placemark description, with duplicate information stored within "Extended data" tags under "Simple Data".


texts: Calculating intersect for two featurecollections

texts:
I am trying to calculate the area of watershed within each polygon for a set of square polygons (1km*1km) in my study area. I converted a water image to a featureCollection of water polygons, it works great. I get an error when I try to intersect the square polygon layer to the water featureCollection. I also would like to export the result to a csv.

//my study area

var studyArea = ee.FeatureCollection('users/oamram/ABM_Kenya/StudyArea');

//square polygons 1km in dimensions

var polygons = ee.FeatureCollection('users/oamram/ABM_Kenya/Polygons1km');

Map.centerObject(studyArea,13);

var start = '2014-01-01';

var finish = '2014-01-31';

//get water dataset

var dataset = ee.ImageCollection('JRC/GSW1_0/MonthlyHistory')
                  .filter(ee.Filter.date(start, finish));

 //select water layer

  var water = dataset.select('water');

//identify water area

   var sumWater = water.reduce(ee.Reducer.sum());

//clip to my study area

  var clipped = sumWater.clip(studyArea);

var waterVis = {
  min: 0.0,
  max: 2.0,
  palette: ['ffffff', 'fffcb8', '0905ff'],
};

//Apply watermask- water values =2 in this layer//;

var maskedComposite = clipped.updateMask(clipped.eq(2));

// Convert the water areas  to vectors.

var vectors = maskedComposite.reduceToVectors({
  geometry: studyArea,
  crs: maskedComposite.projection(),
  scale: 30,
  geometryType: 'polygon',
  eightConnected: false,
  labelProperty: 'water'
});

**//everything works up to here**

// Compute the intersection, for each feature in the feature collection.

var polyIntersect = polygons.map(function(feature){
  var intersection = vectors.intersection(feature, ee.ErrorMargin(1));

  return feature.set({'Intersect': intersection.area().divide(1000 * 1000)});
});

The error is get is this:

  vectors.intersection is not a function


texts:
I'm using arcpy in ArcGIS 10.0. My code is supposed to test the intersection between all layer in a geodatabase by group of 2, and if so, erase one feature of each couple by the other depending on a reliability field. But I have an issue with stopping the listing of the list and I get the error "list index out of range".
Here is the way I do the job by couple of layer :

import arcpy, os
arcpy.env.workspace = r'Z:\Documents\SIG\tests\agregation_auto\erase.gdb'
fcList = arcpy.ListFeatureClasses()
outFolder = r"Z:\Documents\SIG\tests\agregation_auto"
count = 0 #help select the a feature class
cnt = 1 #help select the b feature class
tList = len(fcList) #Count the number of elements in the list
for fc in fcList:
    if arcpy.Exists("temp"):
            desca = arcpy.Describe("temp")
            descb = arcpy.Describe(fcList[cnt])
            namea = desca.baseName # Get the name of the a feature to name the out_poly
            nameb = descb.baseName # Get the name of the b feature to name the out_poly
            arcpy.MakeFeatureLayer_management(os.path.join(arcpy.env.workspace, temp), "fca")
            arcpy.MakeFeatureLayer_management(os.path.join(arcpy.env.workspace, fcList[cnt]), "fcb")
            arcpy.SelectLayerByAttribute_management("fca","NEW_SELECTION")
            arcpy.SelectLayerByLocation_management("fcb","INTERSECT","fca")

    else:
            desca = arcpy.Describe(fcList[count])
            descb = arcpy.Describe(fcList[cnt])
            namea = desca.baseName # Get the name of the a feature to name the out_poly
            nameb = descb.baseName # Get the name of the b feature to name the out_poly
            arcpy.MakeFeatureLayer_management(os.path.join(arcpy.env.workspace, fcList[count]), "fca")
            arcpy.MakeFeatureLayer_management(os.path.join(arcpy.env.workspace, fcList[cnt]), "fcb")
            arcpy.SelectLayerByAttribute_management("fca","NEW_SELECTION")
            arcpy.SelectLayerByLocation_management("fcb","INTERSECT","fca")

    if arcpy.Describe("fcb").FIDSet: #Check for selection
            rowa = arcpy.SearchCursor("fca")
            rowb = arcpy.SearchCursor("fcb")
    for row in rowa:
            fiabia = row.fiabilité #get the int value of reliability (all entities of a layer have the same)
    for rows in rowb:
            fiabib = rows.fiabilité
    if fiabia > fiabib:
            out_poly = os.path.join(outFolder, nameb + "_er_" + namea + str(count) + "_" + str(cnt))
            tmp = arcpy.Erase_analysis("fcb","fca", out_poly)
    if fiabia < fiabib:
            out_poly = os.path.join(outFolder, namea + "_er_" + nameb + str(count) + "_" + str(cnt))
            tmp = arcpy.Erase_analysis("fcb","fca", out_poly)

    if count == tList - 1:
            break
    elif cnt == tList:
            count = count + 1
            cnt = count + 1
    else:
            cnt = cnt + 1

del rowa, rowb, row, rows, desca, descb, namea, nameb, fc, fcList
arcpy.SelectLayerByAttribute_management("fca", "CLEAR_SELECTION")
arcpy.Delete_management("fca")
arcpy.Delete_management("fcb")

To help understanding the above, imagine the following list :

list = [0,1,2,3,4]

The loop will do the job for 0 with 1 first, then for 0 with 2, 0 with 3, 0 with 4.Then, 1 with 2, 2 with three, 3 with 4 and so on until count = 3 and cnt = 4 where I want to stop the process to avoid the out of range list.

Any idea ?


texts:
Currently I am trying to show ski map on my mobile application written on flutter/dart.
I found http://www.opensnowmap.org/ site that show lifts and pistes all around the world.

I tried the link below as it is mentioned in https://stackoverflow.com/questions/52920570/openskimap-tile-not-loading/53246539#53246539.
However
http://www.opensnowmap.org/pistes/{z}/{x}/{y}.png seems not working. Is there anyone knows the solution or using opensnowmap service currently.


texts: Calculate offline map download size for a square km for each zoom level?

texts:
I am working on estimation of how much will I have to download to make maps available offine at different zoom levels. What I am looking for is something like below.

zoomLevel,sizeInKM,downloadInGB
1,1,0.065
2,1,0.5

I have read different articles from OpenStreetMaps, Google Maps API and Bing Maps. References below, none of them talk about how to relate size to kilometers.

What ratio scales do Google Maps zoom levels correspond to?

https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system

https://wiki.openstreetmap.org/wiki/Zoom_levels

https://stackoverflow.com/questions/3238611/how-can-i-get-tile-count-tile-x-tile-y-details-without-specifying-zoom-level

If someone has experience with maps, can you show me a direction to get some download size estimates for 1 km square block on a map at different zoom levels for offline viewing.


texts: Poor Landsat 5 coverage in Google Earth Engine

texts:
I am analyzing Landsat data around Lagos, Nigeria going back to 1990 which includes Landsat 8, 7, and 5. I am using Google Earth Engine's code editor to access and clean the images. I am trying to get yearly composites and have been successful for Landsat 7 and 8. But I am finding incredibly spotty coverage for Landsat 5. To illustrate, the code below (Google Earth Engine code) compares the size of the resulting image collections for Landsat 7 and Landsat 5. For both Tier 1 and Tier 2 Landsat 5 has drastically fewer images. I believe both LS-5 and LS-7 circle roughly every 2 weeks so I don't understand the difference in data availability.

I am new to Earth Engine and satellite data.

// Get Landsat 5 and 7 over region of interest and print Collection size
var pt = ee.Geometry.Point(3.657968670903074, 6.691009458317496);
var ls7Collection_T1 = ee.ImageCollection("LANDSAT/LE07/C01/T1").filterBounds(pt);
var ls5Collection_T1 = ee.ImageCollection("LANDSAT/LT05/C01/T1").filterBounds(pt);
var ls7Collection_T2 = ee.ImageCollection("LANDSAT/LE07/C01/T2").filterBounds(pt);
var ls5Collection_T2 = ee.ImageCollection("LANDSAT/LT05/C01/T2").filterBounds(pt);
print("LS 5 (tier 1) collection size is: ", ls5Collection_T1.size());
print("LS 7 (tier 1) collection size is: ", ls7Collection_T1.size());
print("LS 5 (tier 2) collection size is: ", ls5Collection_T2.size());
print("LS 7 (tier 2) collection size is: ", ls7Collection_T2.size());


texts: Identifying cities from shapefile that showcases functional urban areas (FUA) of Germany

texts: How do I identify which FUAs do certain cities belong to (ex. which FUA does Worms belong to) from the FUA shapefile I have (see image)?


texts: Enabling Spatial Analyst extension in ArcGIS Pro?

texts:
I am getting all the spatial analyst tools locked in my ArcGIS Pro. I know i have these in my license and i remember in ArcGIS Desktop there is an option to enable extension of Spatial analyst then you can use the tools. I am hoping the same behavior in ArcGIS Pro How ever i am unable to find that extension enabling option.

Is it different in ArcGIS Pro ?


texts: Overview of statistical maps/charts types

texts:
I know of a few ways to visualize statistical information on a map, like choropleth maps, prism maps or simply displaying little bar-charts or pie-charts near locations on a map.

But there must be a lot more different ways to display statistical information on a map. I can only find lists with specific subsets, but no clear overview of all commonly used methods.

Does an overview exist of all commonly used ways to map data to geographic location?


texts:
Linux noob here. I keep getting "Unable to create repository" when trying to add the repo url on the qgis download page to YaST:
http://download.opensuse.org/repositories/Application:/Geo/<version>/

I've tried replacing <version> with a few things with no luck:

1.8
1.8.0
12.3
qgis-1.8
qgis-1.8.0

My search has not come up with any similar cases so far. Anyone know a working repo for installing qgis on openSUSE 12.3?


texts: QGIS 3 - ID column added as numbers with zeros after decimal

texts:
I added a CSV file to create a point layer, each row/point designated in the original CSV file with a number ID. I then exported/saved the layer as a shapefile. The attribute table of the new shapefile shows the ID field as a number with many zeros after the decimal point.
How can I get an integer number as an ID field without any zeros after the decimal point?


texts:
With the save strategy I am posting the geojson to a php script where it is merged and reloaded when the map is loaded.

How do I add properties attributes to the geojson that is posted?  Like a label,color, comment etc.

Posted GeoJson:

{"type" : "FeatureCollection",
        "features" : [{"type":"Feature",
                      "properties" : {"attr_a":"TEST PROPERTY"},
                      "geometry" : {
                                 "type" : "Point",
                                  "coordinates" : [-4.1808968764,49.2150111528]
                                  }
                   }]
}

Code snippet....

 var saveStrategy = new OpenLayers.Strategy.Save();
     saveStrategy.events.on({
        'success': function(event) {
             alert('Changes saved!');
        },
        'fail': function(event) {
             alert('Error! Changes not saved');
        },
        scope: this
    });

     vlayer = new OpenLayers.Layer.Vector( "Editable" , {
              style: { externalGraphic: 'red-pin.png', graphicWidth: 21, graphicHeight: 25, graphicYOffset: -24  },
              projection: wgs84,
              strategies: [ new OpenLayers.Strategy.Fixed(), saveStrategy],
              protocol: new OpenLayers.Protocol.HTTP({url: "./run.php", format: new OpenLayers.Format.GeoJSON({ignoreExtraDims: true }) })
              });


texts: Creating polygons from adjacent points using GeoPandas

texts:
I have a GeoPandas dataframe gdf that looks like the following. Here the link to the data as .csv
   ur   geometry
0   1   POINT (12.29632 42.04710)
1   1   POINT (12.30629 42.04710)
2   1   POINT (12.31625 42.04710)
3   1   POINT (12.32621 42.04710)
4   1   POINT (12.33617 42.04710)

where ur=0 or ur=1. Here the plot:

I would like to create a GeoPandas dataframe of polygons connecting all the adjacent points with the same value.


texts: Symbology Collector app with related tables

texts:
I’m trying to make a collector layer with related tables. The symbology of feature class must be someting like:  if {relatedtable.waarnemingen}date + 30 = Current_date() green dot, else red dot.

I found this video on google https://www.youtube.com/watch?v=AzNJTb5E_Mk where a guy explains exactly  what I need, but he doesn’t show how.

I created a feature class(peilbuizen) with point features.
It looks like this:

OBJECTID
List item
PeilbuisID   short
GlobalID
Status   text

I also created a table(waarneming) where I store my monthly data.
It looks like this:

OBJECTID
Date date
lenght   dubble
PeilbuisID   short

Relationship class looks like this:

Name: REL1
Origin object class: Peilbuizen
Destination object class: Waarneming
Type: Composite
Forward Path Label: Waarneming
Backward Path Label: Peilbuizen
Message propagation: Forward (origin to destination)
Cardinality: 1 - M
Has attributes: No
Origin Primary Key: PeilbuisID
Origin Foreign Key: PeilbuisID

Can someone explain to me what I must do so symbology of feature layer changes when there something changes in related table?


texts: MapBox or Google Maps Static API: Extent or bounding box of image?

texts: I'm using the MapBox or Google Maps Static API to get map images. I understand that the centre of the image is specified in terms of latitude and longitude, but is there any way to either specify or derive the extent or bounding box of the image given its centre coordinates and size?


texts: Are ArcGIS 9.3 layer files compatible with ArcGIS 10.1?

texts:
If I save layer files in ArcGIS 9.3, can they be opened and modified in ArcGIS 10.1?

When I try to open the layer file in 10.1, it does not work and gives me an error message: "the imported layer is in an invalid format."


texts: Check if a point falls within a multipolygon with Python

texts:
I have tried several examples of code using libraries such as shapefile, fiona, and ogr to attempt to check whether a point (x, y) falls within the boundaries of a multipolygon created with ArcMap (and thus in shapefile format). However none of the examples work well with multipolygons, although they do fine with regular, single polygon shapefiles. Some snippets I tried are below:
# First example using shapefile and shapely:
from shapely.geometry import Polygon, Point, MultiPolygon
import shapefile

polygon = shapefile.Reader('shapefile.shp')
polygon = polygon.shapes()
shpfilePoints = []
for shape in polygon:
    shpfilePoints = shape.points
polygon = shpfilePoints
poly = Polygon(polygon)

point = Point(x, y)
# point in polygon test
if poly.contains(point):
    print 'inside'
else:
    print 'OUT'

# Second example using ogr and shapely:
from shapely.geometry import Polygon, Point, MultiPolygon
from osgeo import ogr, gdal

driver = ogr.GetDriverByName('ESRI Shapefile')
dataset = driver.Open("shapefile.shp", 0)

layer = dataset.GetLayer()
for index in xrange(layer.GetFeatureCount()):
    feature = layer.GetFeature(index)
    geometry = feature.GetGeometryRef()

polygon = Polygon(geometry)
print 'polygon points =', polygon  # this prints 'multipoint' + all the points fine

point = Point(x, y)
# point in polygon test
if polygon.contains(point):
    print 'inside'
else:
    print 'OUT'

The first example works fine with a single polygon at a time, but when I input a point within one of the shapes in my multipolygon shapefile it returns "out" even though it does fall inside one of the many parts.
For for the second example I get an error "object of type 'Geometry' has no len()" which I assume is because the geometry field can't be read as a normal, indexed list/array.
I additionally tried to replace the actual point in polygon code as suggested here to make sure it wasn't that part of the code that didn't work. And while that link's examples work fine with simple polygon shapefiles I can't get my complex multipolygon to test properly.
So I can't think of any other way to test whether a point falls within a multipolygon shapefile via python... Maybe there are other libraries out there I'm missing?


texts: Georeferencing scanned map using ArcMap?

texts:
Using ArcMap 9.3, I want to georeference a scanned map of Sudan (Africa) as .jpg file format,coordinate points are marked on scanned map in 4 degree intervals. I am not familiar to georeferencing in ArcMap.

So looking for a detail guide line for georeferencing in ArcMap (using 4 control points) and also looking for a guide line to edit the spatial reference in base map with the suitable PCS information for the AOI.


texts: Postgres/PostGIS spatial join returning null results

texts:
I have 1.3 million points and 15 thousand polygons.

I'm trying to do a spatial join so I can find out how many points intersect with each polygon. Ultimately, I'll add up the values in some columns in the point data by each polygon.

So the point data is PCD4 and the polygon data is HCBG.
I've verified that both tables have the same SRID.
I tried this fairly simple spatial join query but the results are a null set which makes no sense!

select geoid, id
from public."PCD4"
join public."HCBG"
ON ST_Intersects(public."HCBG".geom, public."PCD4".geom)
group by id, public."PCD4".geom, geoid`

I've tried limiting the query to a single polygon but that also nulled out.
I've checked the data in QGIS and there are definitely points in the polygons and specifically in the single test polygon I tried.

If I try to do the spatial join in QGIS, it errors out.

I've tested the integrity of the polygons. They're Census Tiger files and they checked out fine.

So I'm at a loss here. I'm sure the problem is something to do with the alignment of the data, either projection or something. But I am not sure how to troubleshoot it beyond checked for the SRID.


texts: Possible to store 3D features such as dome into geospatial database?

texts:
Is it possible to store 3D features such as dome into geospatial database such as PostGIS?

I know that it can store x,y,z data, can such complex features be stored into database?


texts: Do I need to reproject a NAD83 raster (with no projection) before using it with a shapefile that has a specific NAD83 projection?

texts:
I am relatively new to using ArcMap, so I apologize for what I guess is a relatively easy question.  I working with a gridded PRISM precipitation raster (www.prism.oregonstate.edu), which has a standard NAD83 coordinate system.  It's spatial reference is listed as:

GCS_North_American_1983
WKID: 4269 Authority: EPSG

Angular Unit: Degree (0.0174532925199433)
Prime Meridian: Greenwich (0.0)
Datum: D_North_American_1983
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.0
    Semiminor Axis: 6356752.314140356
    Inverse Flattening: 298.257222101

I am trying to determine if I need to reproject this raster before I use it with a shapefile of watershed polygons that also has a NAD83 coordinate system, but is projected using:

NAD_1983_StatePlane_Virginia_North_FIPS_4501_Feet
WKID: 2283 Authority: EPSG

Projection: Lambert_Conformal_Conic
False_Easting: 11482916.66666666
False_Northing: 6561666.666666666
Central_Meridian: -78.5
Standard_Parallel_1: 38.03333333333333
Standard_Parallel_2: 39.2
Latitude_Of_Origin: 37.66666666666666
Linear Unit: Foot_US (0.3048006096012192)

Geographic Coordinate System: GCS_North_American_1983
Angular Unit: Degree (0.0174532925199433)
Prime Meridian: Greenwich (0.0)
Datum: D_North_American_1983
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.0
    Semiminor Axis: 6356752.314140356
    Inverse Flattening: 298.257222101

Part of the issue is that when I reproject the raster, using the Project Raster tool, the output raster has shifted cells. I imagine only one of these rasters (original or reprojected) is appropriate to use in our analysis. A few things have gotten me confused here:

I thought ArcMap automatically reprojected on the fly to whatever
system was specified for the data frame, at least within the same coordinate system. When I use the Project Raster tool, though, and convert the raster from GCS_North_American_1983 to NAD_1983_StatePlane_Virginia_North_FIPS_4501_Feet, it rotates the raster slightly.  I have also tried to using the Define Projection tool first on the original raster to NAD83, and the shift still occurs.
When I change the default view of the data frame from NAD_1983_StatePlane_Virginia_North_FIPS_4501_Feet to GCS_North_American_1983 (View -> Data Frame Properties -> Coordinate System) it rotates both the watersheds polygons and raster slightly.  The raster then looks the same as if I had used the Project Raster tool above.
Finally when I use the Project tool on the watershed shapefile and change its projection from NAD_1983_StatePlane_Virginia_North_FIPS_4501_Feet to GCS_North_American_1983, nothing visually changes (ArcMap apparently reprojects the shapefile on the fly).

Here is a clip of the original raster (grayscale) and reprojected raster (semi-transparent green) on the same map.  The cell size is 4 km^2, so the difference is fairly large.

https://dl.dropboxusercontent.com/u/4405912/raster.jpg


texts: Are the Canadian National Topographic System (NTS) maps available freely online?

texts:
I'd really like a seamless service of the Canadian topo maps, similar to ArcGIS Online USA Topographic Maps, http://www.arcgis.com/home/item.html?id=4ee3622f0bfd41eea55ffa83aaf31a9f

If there is no service, is there a download site?


texts: Is there a way to force ArcCatalog to use a specific tessellation scheme for a SQL Server spatial index?

texts:
If I Recalculate a spatial index from ArcCatalog, the tessellation scheme is always set to "Geometry Grid". Even when the previous index was Geometry auto grid. ArcCatalog always changes it back.

Is there a way to specify the tessellation from ArcCatalog? Alternatively, can SQL Server default to a specific tessellation scheme?

Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
ArcGIS Desktop 10.1 SP1


texts:
Pretty baffled on this one.  I am trying to mask values from arrays.  They are nan values saved in geotiff from qgis as -3.40282e+38.  Numpy array 32 bit floating point vals loaded via
ds = gdal.Open(file/to/geotiff)
arr = ds.ReadAsArray(xoff, yoff, xsize, ysize)

I read in two arrays this way: arr1 and arr2.  Then I create and mask and use it to remove nans:
mask = arr1!=np.nanmin(arr1)
temp = arr1[mask]

temp is used for calculations.  One array masked fine (out of two); my nans are filtered out.  But for some insidious reason the mask on arr2 does not remove all the nan vals?  I've tried this for fun:
mask2 = arr2>-100
temp2 = arr2[mask2]

yet temp2 still has -3.40282e+38 present.  I am not in need of copy.copy(var).  Any ideas outside of something dumb on my end?  Exacerbated but staying calm...


texts: Establishing attribute order in table using ArcPy with ArcGIS Pro?

texts:
I have the following piece of code hoping to have a table with a set of fields on a specific order:

#Removing the fields we do NOT want to show in the output
arcpy.MakeFeatureLayer_management(fc_target_output_1, 'fl_target_output_1')
fields = [f.name for f in arcpy.ListFields(fc_target_output_1)]
keep_fields = ['OBJECTID','Shape','LOCATION','LENGTH','ESTATE','DISTANCE','STATUS','CONNECTION']
i = len(keep_fields)
for j in range (i):
    aux = keep_fields[j]
    fields.remove(aux)
arcpy.DeleteField_management ('fl_target_output_1', fields)

#Sorting output by distance
fc_target_output_2 = r'D:\ArcGIS_Pro_Projects\Optimity_Alf\Optimity_Temp.gdb\target_output_2'
arcpy.Sort_management('fl_target_output_1', fc_target_output_2, [['LENGTH', 'ASCENDING']])

However, when I open 'fc_target_output_2' the attributes appear in any random order and not as I listed them in 'keep_fields'. They don't even appear in the order they initially were in 'fc_target_output_1'.

Any ideas on how to achieve what I'm after?


texts: Avoid area distortion when moving features

texts: I'm a newbie to QGIS. I have a map (vector layer) of the American states + DC with the EPSG:2163 projection, and I want to move Alaska down to southwest of California, as in many political maps. How do I do this while avoiding distortion of the Alaska feature?


texts:
I am reviewing the properties of ckan and am unsure about whether it has the ability to expose datasets stored with ckan. As I found, ckan uses pycsw for harvesting remote CSW servers. The documentation says,

  Remember, only datasets that were harvested with the Spatial
  Harvesters can currently be exposed via pycsw.

So is it right, that currently, datasets entered in ckan directly, cannot be exposed via an CSW server (the included pycsw instance) and harvested itself from remote servers?

Alternatively, is it possible to insert metadata to the included pycsw server and update/ edit it by the ckan interface?


texts:
I have a store created from oracle database in geoserver. Now after I create layer out of the store. And when I try to access the layer or try to preview the layer, I get the warning message in console as

  No primary key or unique index found for 'mylayer'

I see in oracle db, i have created the primary key and I have an index too.
Can anybody suggest, what I am doing wrong, or am I missing something to setup in geoserver?
I see the option

  Primary key metadata table

while creating datastore. Is it anything to do with warning I am getting?

Thanks


texts: QGIS 2.14.10 MS SQL Server 2008 Primary Key Issue

texts:
I've just spent the last hour wrestling with a spatial selection problem on an MS SQL Server layer in QGIS 2.14.10. The layer is a point layer and each time I click on a point every point in the layer is selected. It sounded similar to the problem described here:

issues with selection

However, I had no uniqueidentifier data type in my table. What I did have was a VarChar(16) clustered primary key called TaxOcc. Once I removed this key and added an integer clustered primary key called id my spatial table started behaving as expected in QGIS. If I click on a single point using the select tool, only that single point is selected :-). Is this a bug or a feature? Do primary keys in MSSQL Server need to be integers and called id in order for the table to work properly in QGIS? Anyway whichever, hope the above saves someone else some time :-)

Ian


texts: Modifying label string using Python label expression

texts:
I'm attempting to modify my feature labels such that the "NB", "SB", "WB", and "EB" portion of the string is removed:

E.g. "CEDAR AVE NB" --> "CEDAR AVE" or "ROBERT TRL S SB" --> "ROBERT TRL S"

The code I have so far is as follows (I am new to coding):

def FindLabel([StreetName]):
    L = [StreetName]
    L1 = L.split(" ")
    if len(L1)["NB", "SB", "WB, "EB"] in L1
        return L1[0] + " " + L1[1]
    L1 = L
    FindLabel = L

Would anyone be able to provide help? In the script, I'm looking to utilize the split method, len function and in keyword in order to break up the string into word parts, return the number of items in the string and check if the values "NB", "SB", "WB", or "EB" are present in the string, respectively.


texts: Duplicate points and bounding box in PyQGIS?

texts:
I am trying to find all points in a vector layer that do not have a duplicate point.

To do this, for each point I create a list of features that intersect its bounding box ('candidates') then check if any candidate is an exact geometry match. I've included the exact code below.

However, no matter how I tweak the code I don't end up with any duplicate points. I know for a fact there are many duplicate points (various topology checks and knowledge of dataset) so there's something wrong.

Is this an issue with using the bounding box, or another part of my code?

I'm using Python because every existing tool I've found only flags duplicates, but tool suggestions are fine too.

Working with QGIS 3.4x64 and Python 3.7 on Windows 10.

geoms = {} # { vertex id : geom }

for v in point_layer.getFeatures():
    if not v.hasGeometry():
        continue

    geoms[v.id()] = v.geometry()

index = QgsSpatialIndex()
no_dup = [] #list of vertex IDs with no duplicates
    for v_id, geometry in geoms.items():
    candidates = index.intersects(geometry.boundingBox())
    duplicates = []

    for candidate_id in candidates:
        if geometry.isGeosEqual(geoms[candidate_id]):
            duplicates.append(v_id)

    if len(duplicates) == 1: #only one point in location
        no_dup.append(v_id)

Note: I considered creating a buffer instead of using the boundary box but I have over 100k features and would prefer not to create another layer


texts: Is QGIS-OSGeo4W-2.14.2-2-Setup-x86.exe last version for XP 32 bit?

texts:
I have tried to install QGIS 2.14 LTR, but the application crashes (Error: Qgis-ltr-bin.exe :entry point was not found…. GetLogicalProcessor…. KERNEL32.dll)

QGIS-OSGeo4W-2.14.2-2-Setup-x86.exe and previous releases have about 340 MB, next releases only about 290 MB, QGIS-OSGeo4W-2.14.2-2-Setup-x86.exe is the last version, which I can use. Following versions crash. Is it related to missing files in the install packages?

Windows XP 32 bit


texts: multiple, simultaneous TileLayers in leaflet?

texts: I would like to have two tile layers in Leaflet, one a conventional set of tiles, and another composed of PNG tiles with transparency, so basically a tiled overlay layer. Is this possible? I see numerous solutions for multiple tile layers that either show one tile layer or the other, or show one and some zoom levels and one at others, but no solutions that show both tile layers at the same time.


texts: Usage of Cesium Geoserver Terrain Provider Plugin for a single tile of SRTM90 data

texts:
I'm attempting to use Cesium Geoserver Terrain Provider Plugin for terrain visualization.

I downloaded one tile from http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp address such as 42_05 region. I extracted the tiff file and introduced it to my Geoserver (version 2.4.4) as a layer. From layer preview in Geoserver, I see the region where the tile belongs and it is rendered in gray tones.

I'm trying to create terrain visualization for only 42_05 region. I dont want to create image pyramid etc. Just get elevation data in 42_05 region and terrain visualization for only 42_05 region.

After reading the steps in https://github.com/kaktus40/Cesium-GeoserverTerrainProvider, I used GeoserverTerrainProvider.js and the sample initialization code.

Unfortunately, terrain visualization is not activated and when I inspect coordinates in the tile region from Cesium, height values are either 0 or very small values such as 1e-9.

Alternatives of plugin usage (I tried all of them with no positive result)

Translated tiff file using the translator java utility (provided by the plugin) and defined it as a layer in Geoserver and then used it in Geoserver Terrain Provider Plugin.
I used the original tiff file and I installed dds/bil plugin.
I used styled xml file with the original tiff file.

What can be the reason for the above issue I described?


texts:
I'm interested in examining the average width of a polygon that represents the road surface. I also have the road centerline as a vector (which is sometimes not exactly in the center). In this example, the road-centerline is in red, and the polygon is blue:

One brute force approach I have thought of, is to buffer the line by small increments, intersect the buffer with a fishnet grid, intersect the road-polygon with a fishnet grid, calculate the intersected area for both intersection measures and to keep doing this until the error is small. This is a crude approach though, and I'm wondering if there is a more elegant solution. In addition, this would conceal the width of a large road and a small road.

I'm interested in a solution that uses ArcGIS 10, PostGIS 2.0 or QGIS software. I have seen this question and downloaded Dan Patterson's tool for ArcGIS10, but I wasn't able to calculate what I want with it.

I've just discovered the Minimum Bounding Geometry tool in ArcGIS 10 which enables me to produce the following green polygons:

This seems like a good solution for roads that follow a grid, but would not work otherwise, so I am still interested in any other suggestions.


texts:
I am using the WMS GEt Feature Info feature in Geoserver. I created an inner ftl (content.ftl), using the header and footer ftl as it is. The WMS Get Feature Info will go into a basic Openlayers popup.

Example styling that I have for the  info table created by the ftl :

table.featureInfo, table.featureInfo td, table.featureInfo th {
    border:1px solid #ddd;
    border-collapse:collapse;
    margin:0;
    padding:0;
    font-size: 90%;
    padding:.2em .1em;
}

In IE 8, the popup does not show with any styling. it seems I need to declare and use those styles in the map page itself. It works fine with other browser.

Any ideas why?


texts: Setting OSM map data to aerial view in QGIS

texts: I have just started playing around with my first GIS package, QGIS. I have successfully used Ordnance Survey Vector data to create maps but when I try importing maps from an OpenStreetMap export it always gives me a birds eye view. Any idea how I can get it to produce an Aerial view?


texts: Accessing arcpy functions from IronPython

texts:
I made a few python scripts to automatically optimize and publish my data..
Now i'm thinking about writing a .NET program to manage and run these scripts: the obvious way is invoking them in a different process from the .NET code but this seems downright ugly
I was thinking about using IronPython and migrate my scripts into .NET.
Does anyone know if it's possible to invoke arcpy functions from IronPython?
Thanks!


texts: I want to compare multiple raster layers against each other to identify changes in pixel values over time

texts: I am using LAI values to assess vegetation growth over large areas. I want to be able to identify areas that are doing well and areas that are decreasing based on the changes in pixel values. Ideally I would like to generate another raster file that shows a standard deviation value over the 50 different raster layers I have, or something along those lines.


texts: Selecting cells within polygon layer without extracting them using ArcGIS Desktop?

texts: I know how to use the tool, Spatial Analyst Tools > Extraction > Extract by mask for cells that lie within a polygon shapefile, but is there anyway to just select those cells without having to extract them?


texts: Leaflet - what to do when your maptiles don't load?

texts:
I'm using Leaflet, and using OSM's tile.openstreetmap.org tile server. However, sometimes my application does not load the maps tiles. It seems OSM's servers are having some problems sporadically, which is out of my scope of fixing. So, my question:

Is it possible to wait an X amount of time for the tile server to load the requested tiles, before trying to contact another URL for its tiles?


texts: How to connect QGIS to an Oracle DB (SDE)?

texts:
I want to access an Oracle Database (with SDE) from Qgis 2.4.

I have tried many different options from within the window Create a new Oracle Connection but I always get an error message (ORA-12514: TNS:listener does not currently know of service requested in connect descriptor or similar messages). I know however that the DB is working and listening. I know the correct host, the correct port and I have valid username / password.

The IT support here gave me 2 (independent) pieces of advice but I'm not sure how to implement them with Qgis:

"Does your client (Qgis) know about the correct tns_admin directory?"
"Make sure that LDAP is listed first: NAMES.DIRECTORY_PATH = (LDAP, TNSNAMES,ONAMES)"

Anyone has an idea?

Thanks a lot in advance!

PS: sorry if my title is not very explicit. I'm not sure how to best formulate it.

EDIT [30.09.2014]

I have moved a little bit forward and I have edited the file tnsnames.ora located under C:\OraClient11g\product\11.2.0\client_1\NETWORK\ADMIN:

name_of_my_db =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = *********)(PORT = 1568))
   )
 (CONNECT_DATA =
   (SERVICE_NAME = name_of_my_db)
 )
)

Will Qgis read this file or does it require its own copy of it? If yes, where should it be located? If no, how does it know where tnsnames.ora is stored? Should there be an entry in the registry?

By the way, my sqlnet.ora file (also located in C:\OraClient11g\product\11.2.0\client_1\NETWORK\ADMIN) looks like this:

# sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0\NETWORK\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.

################
# Filename......: sqlnet.ora
# Name..........: $Id: sqlnet.ora,v 1.3 2004/11/22 13:47:17 oracle Exp $
# Date..........: $Source: /data/repository/cvsroot/ORACLE/env_sqlnet/indus/sqlnet.ora,v $
#
################

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (LDAP,TNSNAMES,ONAMES)

SQLNET.CRYPTO_SEED = "************************"

NAMES.PREFERRED_SERVERS =
  (ADDRESS_LIST =
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1529))
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1527))
    (ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1528))
  )

NAMES.DEFAULT_DOMAIN = ************************

SQLNET.EXPIRE_TIME = 0

EDIT 2 [30.09.2014]

According to my DB Admin, I shouldn't even need the tnsnames.ora, because the connection should work through LDAP... Not sure whether or not this information brings anything relevant for my problem?


texts: Is there a way for two feature classes to share geometry and have updates in one push to the other?

texts:
I have services running for our town that represent town parcels for our interactive mapping website. Internally and for private use this parcel layer (let's call is Parcel 1) contains roll number, owner name, address,  and various other fields. We have another layer that is basically just a copy of Parcel 1 but is for public use. This layer contains all the same fields except for the owner information (Parcel 2). What I have done is basically copied Parcel 1 and deleted the unnecessary fields for Parcel 2.

When changes are made to Parcel 1, I delete Parcel 2, export/copy Parcel 1 and rename it to Parcel 2 (or simple edit the geometry and information in Parcel 2 to reflect changes in Parcel 1...essentially making the same edits twice.)

What I want to know is, is this the most efficient workflow?

What I want is for when changes are made to Parcel 1 for Parcel 2 to automatically update it's geometry and fields at the same time.

Is this possible since there is different schema?

I have replicas running on these feature classes so add/deleting a feature class proves to be quite a pain.

The comments below to create separate services with fields hidden seems to work fine. The answer for creating an additional replica for Parcels also seems feasible.  The problem I'm encountering now is that the parcel data is bad quality. We receive a lot of our information from a tax database and another source and the road names are not correct or contain different alias.  What I did was create a a copy of the parcels and renamed the roads so that a query/search by the user would yield a result. As a work around. I'm uncertain how to proceed. A replica with the street name field I created (different from Parcel1) could feasibly work so that the original street name isn't synced. However, new parcels that are added would then not be synchronized correctly.

Any thoughts on this issue?


texts: Getting Text using Inline Variable Substitution in ArcGIS Desktop ModelBuilder?

texts:
I am trying to use inline variable substitution (%Input Feature%) to use the name of an output of a Clip Tool (let's call it "(Final) Output Feature Class) as the name of the output table in the next part of the data model (let's call it "Output Table Name").

I have a workspace defined, and when I call the output of (Final) Output Feature Class using inline variable substitution, it tries to use the entire string as the input name - workspace path and all.

Is there a way to call just the last bit of the string for the table name so I am not using the whole path?

Also - I cannot bring it into Python. I am making ArcGIS specific data models for other users.


texts: Service Area Polygons Differ When Running in Desktop Vs Pro

texts: I generated some service area polygons using Desktop 10.2.1 (long story why) a couple years back using nothing but the default parameters, and then tried recreating them in Pro yesterday using (as far as I can tell) the same parameters and the same network dataset, but the polygons generated using Pro look significantly different from the ones generated in Desktop, and I'm having trouble figuring out why. I looked at one of the polygons that hit a node (which was a 4-way intersection), and then stopped, but when I measured the finishing distance from the final node, each distance was different, even though the speed limits along all the roads was the same. Maybe there is some aspect of generating service areas that I am not understanding, so I was wondering if anyone could tell me why?


texts:
I am using leafletjs. I have a list of "WGS-84" positions that look like:

LATITUDE
N45 52.1096
LONGITUDE
W125 52.4665

LATITUDE
N48 24.1051
LONGITUDE
E174 37.3832

What is the significance of the alpha-numeric start to these positions? Can they be ignored and can I just use the normal lat/lng floats that follow them?


texts: Does GPS Navigator send data to Satellite?

texts:
Does GPS Navigator send data to satellite?

Is this true about regular devises available in the market?


texts: Selecting two records and comparing to keep one with highest attribute using ArcPy?

texts:
I have a feature class with many scattered points. My goal is if there are two points within 1 meter, to identify the point with the lowest Mean value (it is a quality metric from 0 - 1) and delete it, keeping only the higher one.

I have generated a near table, joined the results, and have also joined another table with intensity values for each relevant point. It looks like this:

You'll note that there are actually 3 points in the cluster highlighted blue. Of these, I wish to keep the one with the highest Mean value (ID: 2).

The cluster highlighted yellow has two points, and I would keep ID: 5 and delete ID: 6, because ID: 5 has a higher Mean value.

The end result would look like this:

I would need to iterate through the table (thousands of records), identifying the Near_FID for each record, selecting its record as well, and comparing the Mean value. Then finally, deleting the record with the lowest Mean value.

I'm using ArcMap 10.4. I am not averse to using a Python script or even Access if need be.


texts: postgis create a new layer from the st_within query for points with another layer

texts:
I am trying to create a layer that contains all of the businesses in Los Angeles proper. I have a shapefile for the polyon of the LA boundaries (shp_laboundaries) and I have a set of points in the la region for the businesses (tmp_coords). So I want to do a query where I can find all of the points that fall within this polygon. In fact I want to create a new layer from these points.

I was having trouble getting the st_within query to reference a separate layer in postgis. I was trying a few different queries, but hopefully someone can tell me the correct form.

select * from tmp_coords where st_within(tmp_coords.st_loc, public."shp_laboundary");

or

 select * from tmp_coords where st_within(st_loc, select geom from shp_laboundary);


texts: Searching equidistant point from sets of points using ArcMap

texts:
I process lunar impact craters. At this stage each of them has about 16 points on their rim, they all have crater's ID in their attribute table (which has all points for all craters). Now I want to find equidistant point for each crater (set of points) to find their approximate center. This is for sure not best metod, but it's something I still want to finish to compare with others.

In ArcMap, is there a way, a tool, or maybe toolset to automaticaly create equidistant point from given sets of point?


texts: Creating user customizable printing app for ArcGIS Online?

texts:
I have users that want to be able to put in their own title bar, display the legend, scale bar, north arrow, add text/imagery/etc. just like ArcMap, but with the web maps instead.

Is this possible with ArcGIS Online?


texts: Cropping osm.pbf data without missing overlapping features?

texts:
for our offline maps tool we use *.osm.pbf data for input. As we often need cross border selections or just a country with some "buffer" around borders we use cropped osm data using osmctools.

Example:

osmconvert europe-latest.osm.pbf -B=CH_border_buffer10km_v2.poly --complete-ways -o=Switzerland_custom_buffer.osm.pbf

However the resulting map has some features missing:

most apparent is the missing Bodensee - compared with online OSM layer provided by Terrestris:

Can I somehow solve this so the cropped data does not remove all features overlapping the trimline?

The resulting format however has to be osm.pbf.
I found a mention of "--complete-multipolygons" parameter here, but osmctools (0.6-1 from ubuntu repository) does not offer me this.

any ideas?


texts: projection conversion from mercator to google maps format

texts:
Is this

spTransform(Finland3, CRS("+proj=longlat +ellps=WGS84 +no_defs+ellps=WGS84 +towgs84=0,0,0 "))

the right way to project a shapefile with this projection

coord. ref. : +proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0

to plot it in ggmap on top of a Google map raster?

therefore looking like

+proj=longlat +ellps=WGS84 +towgs84=0,0,0


texts:
What is a best way to access osm's maxweight tag value to be able to use it in edge router?

Basically my goal is to overwrite EdgeRouter's calcEdgeCost and check there if given edgeIdx has maxweight tag and if yes then act upon value of that tag.


texts: QGIS 3 replace set of vertices with another set of vertices, like copy/paste

texts:
I have a layer that contains polygons that should be "topologically correct" if I understand that term correctly.  The polygons should share vertices of adjacent polygons, allowing no gaps and no overlaps.
The trouble is that some were drawn manually it seems and I need to "fix" these not quite touching polygons.  See the example below, showing part of two polygons that should be sharing a border but are not.
What I would like is for the polygon containing vertices 1,2,3,4 to instead contain vertices 1,5,6,7,8,4 like the other one. This is a relatively simple example that could be fixed vertex by vertex using the "snapping" tool - adding additional vertices between 2 and 3, and snapping them to their counterparts. But some borders I would like to match up are much more complex where each may have hundreds of vertices that don't match but should, and I'd like to "snap" from a selected first point to a selected second point to replace all the vertices in one polygon to those in the other.
What I think I would like to do then is to select and "copy" in this example vertices 5, 6, 7, 8 from one polygon, then select the other polygon and select vertices 2, and 3, and "paste/replace" these two selected vertices with the vertices copied earlier.  Of course I'd be copying a much more complex larger set of vertices.
Any ideas how to do this with QGIS? Any other tools come to mind?


texts:
I am trying to add a point by using the pyqgis code below:

layer = iface.activeLayer()  # point layer
layer.startEditing()
iface.actionAddFeature().trigger()

Then the marker becomes add feature symbology to add a point. When I click the canvas it gives me the error which says "Add Feature: Wrong editing tool, cannot apply the 'capture polygon' tool on this vector layer in picture" in the picture.

If I close and re-open QGIS it works. I guess the reason is making editing processes on polygon type vector layers. After adding point again by using the code it gives that error. It seems like editing polygon stays open. But I close that by using layer.commitChanges(). How can I solve that problem?


texts: Problem with spatial reference system / shapefile projection

texts:
I am new to using QGIS and having some problems getting some shapefiles to project correctly. I am using publicly available shapefiles for New York City municipal boundaries found here:
http://www.nyc.gov/html/dcp/html/bytes/dwndistricts.shtml
(ie borough shapefile)

When I download and add the shapefile to my project, the shape is projected in an inaccurate geographic location (as in WAY off).

The extents read as: 835386,112481 : 1144283,277548

And the metadata says:

  "General: Storage type of this layer: ESRI Shapefile Source for this
  layer: /Users/Koren Manning/GIS/nybbwi_12a_av/nybbwi.shp Geometry type
  of the features in this layer: Polygon The number of features in this
  layer: 5 Editing capabilities of this layer: Add Features, Delete
  Features, Change Attribute Values, Add Attributes, Delete Attributes,
  Create Spatial Index, Fast Access to Features at ID, Change Geometries
  Extents: In layer spatial reference system units : xMin,yMin
  912287.07,116411.37 : xMax,yMax 1067382.51,273617.84 Layer Spatial Reference System:
  +proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs"

This doesn't make a lot of sense to me but it clearly seems like something is off with the spatial reference system. I tried changing the coordinate reference system to EPSG:4269 - NAD83 which is what other shapefiles I was using were in (from a different source) but this did not change the projection.

Any idea what I am doing wrong?

Any advice is appreciated.

Thank you!


texts: Shapely parallel_offset returning an empty list


texts: OpenLayers: ALL image layers are out of place on google maps v3 and OSM base layers

texts:
Summary:

I have 2 different image layers that looked fine with my old mapstraction/google maps based system. Using the same coordinates as bounds in openlayers results in a shift to the north by like 100 miles.

potentially most important is that this seems to be limited to the image layers only. For all of the vector-based layers I've looked at (vector based markers and vector based polylines), they all seem to be in the right spot when compared to the old system.
one image layer is an image of text where the original coordinates were chosen somewhat arbitrarily so the fact that it's shifted north is not a big deal (screenshot example: https://img.skitch.com/20110427-jj62ac75y8eihms3gxxfr15371.jpg)
the other image layer is weather radar and it's absolutely essential that the image overlay be in the correct place (screenshot example: http://img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg)
this happens with Google Maps v3 base layers and OpenStreetMap base layers. I have not tested other base layers
the original question below was centered around the weather radar problem because that's where I originally noticed the image overlay problem, but it would appear that whatever I'm doing wrong for the weather radar image layer is also being done wrong for the text/image overlay.

I'm new to OpenLayers, so I'm hoping I'm missing something obvious.

I'm trying to transition my maps to OpenLayers from Mapstraction (and before that it was just the plain Google Maps v3 API). I'm having issues with one of the images not aligning properly (though all other types of layers seem to work just fine).

Specifically, I'm trying to overlay a weather radar image (http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif) but it's not putting it in the correct place. I've tried using both OSM and Google Maps v3 base layers, and it always appears to be too far north.

Screenshot explanation: img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg

I originally got the coordinates through the KMZ file that you can download here: www.srh.noaa.gov/ridge/kmzgenerator.php. Click on "Lower 48 States" under the "National & regional mosaics" section to get the KMZ file. Alternatively, the KML contents are viewable here: gist.github.com/942730

I'm assuming I'm not specifying the bounds for the image layer properly:

# full code in the example links below this

proj4326 = new OpenLayers.Projection("EPSG:4326");

bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.LonLat(-127.620375523875420, 21.652538062803));
bounds.extend(new OpenLayers.LonLat(-66.517937876818, 50.406626367301044));
bounds.transform(proj4326, mapObject.getProjectionObject());
radar_overlay = new OpenLayers.Layer.Image('radar', 'http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif', bounds, new OpenLayers.Size(3400, 1600), {
  'isBaseLayer': false,
  'alwaysInRange': true
});

Full Examples:

http://jsfiddle.net/hayley/C4rue/ - (out of place) - simplified example with OL and google maps v3

beta.wickedwx.com/ - (out of place) more complete example - on this map, there's also an orange dot for the radar location at Wichita, Kansas where there's usually a blue blob (ground clutter on the radar), but the blue blob ends up being placed near Salina, Kansas (screenshot example: img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg)

http://wickedwx.com/ - working example that uses mapstraction and google maps v3


texts: Configure GDAL MSSQLSpatial Driver to export shapefile

texts:
I need to configure the GDAL MSSQLSpatial Driver to correctly export spatial data from MS SQL Server Spatial database. I am trying to export a shapefile by running this command:
ogr2ogr -f "ESRI Shapefile" "export.shp" "MSSQL:server=******;database=*****;trusted_connection=yes;" -sql "SELECT TOP 1 ID, geometry.STAsBinary() as geometry FROM streetlines" -a_srs "EPSG:3016

#1: "ERROR 1: Error initializing the metadata tables : [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'geometry_columns' in the database."

#2: "ERROR 1: GetNextRawFeature(): Corrupt data"

The command results in an empty shapefile. Please let us focus on #1 Error. I realize that ogr2ogr and GDAL MSSQLSpatial Driver uses metadatatables "geometry_columns" which is created when running ogr2ogr the first time (I did not expect the creation of the tables and the created "geometry_columns" table is empty) thus the error that the tables already exist. However the use of geometry_columns can be configured by changing default value "YES" to "NO":

MSSQLSPATIAL_USE_GEOMETRY_COLUMNS: Use/create geometry_columns metadata table in the database. Default = “YES”
https://gdal.org/drivers/vector/mssqlspatial.html

A suggestion to avoid the problem is to pass this command when running ogr2ogr:
--config MSSQLSPATIAL_USE_GEOMETRY_COLUMNS NO
(Stackexchange, Hotpepper : https://gis.stackexchange.com/a/375435)
I hesitate to use the configuration parameter because I do not know the scope of this parameter change. So my question is:
When running:

--config MSSQLSPATIAL_USE_GEOMETRY_COLUMNS NO

Is the change permanent or only for the current instance of ogr2ogr running from command line interface?
If permanent where is the configurations setting stored does it change the database or only the driver?
Will this setting affect other users and/or programs?
Any help is appriceated!


texts: Number of events within each elevation class

texts:
I'm trying to model how elevation affects fire events for an AOI, I have run my cluster analysis for the fire events and right now I'm trying to calculate how many fire events fall within each elevation class.
I have used the zonal histogram tool in ArcGIS, but I'm not sure I trust the output. Is there a better tool for which to achieve this?


texts: vb.net ArcObjects is there a function the same as "Select Features by Polygon" of ArcMap's tool

texts:
I want to know whether there is a function provided by ArcObjects (vb.net) to realize the "Select Features by Polygon" on ArcMap (shown below).

I am using VS 2012 (vb.net) and ArcObjects 10.2.2.


texts: Resolve why R is not using the full colour ramp in the package tmap

texts:
I am creating a map using tmap with a quantitative variable that I wish to use for setting the polygon colours. When I set the colour ramp using a standard RColorBrewer palette or with a custom vector of colours, it is only using half of the values in the colour ramp (but I want them all!). For example, with the "RdYlGn" palette, it is only plotting from yellow to green without any reds.

Let's take the example of the meuse dataset (I am taking the start of this example from this answer (Mapping several maps with the same colorscheme in tmap))

library(sp)
library(tmap)
library(rgeos) # for the gBuffer function in this example

data(meuse, meuse.area)

coordinates(meuse) <- ~x + y

meuse.area <- SpatialPolygons(list(Polygons(list(Polygon(meuse.area)),'1')))

proj4string(meuse)<- CRS("+init=epsg:28992")
proj4string(meuse.area)<- CRS("+init=epsg:28992")

#turn it into a spatial polygon for my purposes

meuse.poly=gBuffer(meuse, width=100, byid=TRUE)

tm_shape(meuse.poly)+
    tm_polygons("dist", title="dist",
         palette="RdYlGn", n=6)

Here's the map with this example:

But I don't get the full spectrum of colours:


texts: Can I intersect (slice) a multipatch geometry and obtain the perimeter line of the intersection as a result?

texts:
Can I intersect (slice) a multipatch geometry with a vertical polygon (or an extruded line) to obtain the perimeter line of the intersection? (or better yet a polygon)

I am creating fairly complex vertical cross sections in ArcGIS and my workflow for creating a sectional view of complex subsurface geological features is VERY time consuming.

I am thinking the "Intersect 3D Line With Multipatch" tool might somehow be utilized but it only seems to work with 3D lines and points whereas I need to extract a slice from the multipatch.


texts: Update area column after changes in QGIS

texts:
I'am using QGIS and POSTGIS, for example to automatically calculate the area of a new created polygon. I do that with following code:

CREATE OR REPLACE FUNCTION calc_area()
RETURNS trigger AS
$BODY$
BEGIN
NEW.fla_ha := st_area(NEW.geom)/10000;
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql;

CREATE TRIGGER area_calculate BEFORE INSERT OR UPDATE ON nutzungen
    FOR EACH ROW EXECUTE PROCEDURE calc_area();

Problem definition:

How do I change my trigger, so that editings at the geometry of a existing polygon (new vertex ...) will be recognized and the old area value will be overwritten.

If I use UPDATE in combination with an AFTER-TRIGGER  it updates my whole fla_ha column and not the specific row:

CREATE OR REPLACE FUNCTION "area_new"()
RETURNS trigger AS
$BODY$BEGIN
UPDATE nutzungen SET fla_ha=ST_AREA(NEW.geom)/10000;
END;$BODY$
LANGUAGE plpgsql VOLATILE

ALTER FUNCTION "area_new"()
OWNER TO postgres;