texts: How to import GPS waypoint, track info into ArcMap 10.2?

texts: I heard that ArcMap 10.2 can import waypoint and track information directly from a GPS without bridging it from MapSource or BaseCamp software. Can someone give me tutorial or link to a video that I could watch? I use a Garmin 60CSx unit.


texts: I'm taking a Geographic Informations Course, and I was wondering if I can download this program onto my Chromebook. If so, what would option of "download for" would I click?


texts: Zonal Statistics on discrete values in raster using ArcGIS for Desktop?

texts:
I am using ArcGIS 10.3 for Desktop.

I am using Corine Land Cover raster data for Southern European Countries, this data gives discrete values to particular land uses (e.g. 1 = agricultural land, 2= Urban land-use etc.). I also have a polygon layer with the outlines of each country. I can get the total number of cells within each country from zonal statistics table in Arc toolbox, however I cannot get counts for each of the values of land use within each polygon. The goal is to determine the percentage of each country which is covered by each land-use category.

Is there any way in ArcGIS that I can achieve this?


texts: Geographic transformations and ArcPy gives ERROR 000365?

texts:
I have a script that goes through all the rasters in a particular folder and then reprojects it to another coordinate system, using arcpy.

My problem is that i keep on getting the following:

  ERROR 000365: Invalid geographic transformation.

My code fails on this line

        arcpy.ProjectRaster_management(raster, in_memoryLayer, "British National Grid.prj","#", "#", transformation,"#", "#")

I have set the transformation to the following

transformation = "OSGB_1936_To_WGS_1984_7"

and have also tried

transformation = "PROJCS['British_National_Grid',GEOGCS['GCS_OSGB_1936',DATUM['D_OSGB_1936',SPHEROID['Airy_1830',6377563.396,299.3249646]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',400000.0],PARAMETER['False_Northing',-100000.0],PARAMETER['Central_Meridian',-2.0],PARAMETER['Scale_Factor',0.9996012717],PARAMETER['Latitude_Of_Origin',49.0],UNIT['Meter',1.0]]", "NEAREST", "0.516860387597052", "OSGB_1936_To_WGS_1984_7", "", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]"

I got the above from exporting a model from modelbuilder.

but i still get the error.

Here is the code for the ProjectRaster tool that is exported from ModelBuilder

arcpy.ProjectRaster_management(inputRaster, convertedRaster, "PROJCS['British_National_Grid',GEOGCS['GCS_OSGB_1936',DATUM['D_OSGB_1936',SPHEROID['Airy_1830',6377563.396,299.3249646]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',400000.0],PARAMETER['False_Northing',-100000.0],PARAMETER['Central_Meridian',-2.0],PARAMETER['Scale_Factor',0.9996012717],PARAMETER['Latitude_Of_Origin',49.0],UNIT['Meter',1.0]]", "NEAREST", "0.521227542928997", "OSGB_1936_To_WGS_1984_7", "", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]")

The above does not work when running from python, but the model itself does.

Any advice on where I'm going wrong?


texts: Exporting large feature class to text file using ArcGIS Desktop?

texts:
I have a relatively large result file from my network analysis in ArcGIS 10.5. Data represents 100 closest neighbors for ~1.5 mio locations. The dataset is stored in a file geodatabase and it contains 'no geography' since I specified NO_LINES option in MakeODCostMatrixLayer_na tool so I treat it as a table.

I would like to move this data out of GIS for further processing in Stata (and or R). Since Stata is not GIS.. and I also wanted to avoid shapefile for data of this size I thought first about using txt or csv file as an intermediate way.

Learning from previous solutions, I tried three solutions:

Exporting via GUI in ArcCatalog
Exporting via (64-bit) Python script with 'Export Feature Attribute to ASCII' (Spatial Statistics toolbox)
Exporting via Python script with 'Table To Table' (Conversion toolbox)
Exporting via Python script with 'Copy rows' (Data Management toolbox)
Exporting via Python script with a cursor loop (as suggested by Caleb1987 here)

Oddly enough, all these solutions give me a resulting file with 30 mio observations (exactly the same number) instead of 150 mio.

What can be causing a problem like that? Are there any better solutions for exporting files of this size?

Note: all scripts were tested with smaller datasets and everything worked smoothly so I am pretty confident there are no mistakes there.

Update: I managed to test one more solution via ogr2ogr. Using command line to connect to database and export to CSV:

ogr2ogr -f "CSV" "path\output.csv" "path\database.gdb" "feature_class"

This time I get to export 47mio records and the tool fails with many error messages similar to:

ERROR 1: Error occurred in filegdbtable.cpp at line 1284


texts: Where can I find GDAL bindings for Python 3.3?

texts: I have been using GDAL 1.9.x on Python 2.7 and took the bindings from here. Is there a place to get GDAL bindings for Python 3.3 or is GDAL not officially supported in Python 3.3 yet?


texts: Why does my ArcGIS License Manager have a Repair option?

texts: This minor problem with my ArcGIS 10.4 license manager was bugging me - why was there a Repair option, and why didn't Repair actually work?


texts: Using ArcPy to determine ArcMap document version?

texts:
Is there a way with ArcPy to identify the version of a Map Document (MXD).  I am working on a solution to inventory our MXD's and would like to know if a document is 8.1, 9.2, 10.0, etc.

I am currently using ArcGIS 10.0, but if there is an update in 10.1 that does not exist in 10.0, I would appreciate hearing that, too.

I see there is a previous question of How can you find ArcGIS version programatically?, but it references all ArcObjects solutions (which I suppose I could call from python, but I would prefer not to).


texts: How to avoid start/end points of line modification with ol.interaction.Modify

texts:
To modify line geometry on OpenLayers(3-5), we use ol.interaction.Modify. What I want to do is, enable modify any points on line, except start / end points.

But just using ol.interaction.Modify normally, we can't prevent modifying start / end points. How to prevent it?


texts: difference between st_equals and equal sign

texts:
I have strange thing happening in postgresql DB. I would like to understand what is the major difference between using st_equals and using the equals (=) sign ex :

SELECT * FROM x WHERE st_equals(the_geom, st_astext('POINT(962952.534 6469066.353)'));

and

SELECT * FROM x WHERE the_geom=st_astext('POINT(962952.534 6469066.353)');

An this code will not be the same as

SELECT * FROM x where st_geohash(st_transform(the_geom, 4326))=st_geohash(st_astext('POINT(962952.534 6469066.353)'));

and not even the same as

SELECT * FROM x WHERE st_astext(the_geom)=st_astext('POINT(962952.534 6469066.353)');

I would like to understand why the result of these request differ

EDIT: so this question was mark as duplicate, I didn't found this post about st_equals and equal sign at the time. About converting to text with st_astext I was thinking about losing precision may cause the difference. But about st_geohash ?


texts: How can I convert lots of ASCII files (.xyz format) into shapefiles by iterator in the Modelbuilder of Arcgis 10?

texts:
I have a plethora of xyz format files and I want to convert them into shapefiles separately and it is really time-consuming to do this conversion one by one.

I tried to create a model in ModelBuilder to read them from an input folder and does the conversion into shapefiles and then put them into the output folder with the same input name or use a wildcard to choose some of them to convert.

However, the files that I'm trying to convert are
XYZ foramt (e.g. file.xyz) ASCII files. Anyway, I used the following model to convert the files in the folder and what it really does is just converting the first file and then stops. I also ticked on the Recursive but it only converts the first file and stops.

Can anyone help with that?


texts: I know this question has been asked before but none of the solutions seem to be working for me.  Every-time I reopen a print composer map nothing shows up.  I have the map on render so that's not the problem and I played with CRS setting but nothing changed.  I have to recreate the map everytime I reopen the print composer which is annoying.


texts: Tilemill (Carto) code for styling multiple features from a single layer

texts:
How can I more efficiently write this piece of code which aims to style two features in my streets layer (major roads and major road ramps) the exact same way.

#tor_centreline [FCODE=201200] {
      line-width: 0.5;
      line-color: lightgray;
   }

#tor_centreline [FCODE=201201] {
      line-width: 0.5;
      line-color: lightgray;
   }

When I input the code as...

#tor_centreline [FCODE=201200],[FCODE=201201] {

... I break my map because I believe the second [FCODE=""] is not linked to the #tor_centreline... such that it searches all of my layers for [FCODE=""] and when it finds a layer with no "FCODE" attribute field I receive an error.


texts: File geodatabase not visible through ArcCatalog

texts:
I get the error "There was an error exporting the layer. Invalid function arguments. FDO error: -2147024894 [GDB_SystemCatalog]" when trying to export data from one of my feature classes in my geodatabase in ArcMap:

Additionally, I can no longer see my feature datasets in ArcCatalog as the gdb icon has become a folder icon. The gdb folder appears to be empty although I can still see files in it through windows explorer and I can see the data in the attribute tables through my mxd.

This also means I can't import any more data to the database.

Has anyone seen this type of problem before?


texts:
I want to center and recenter the map loaded on QGIS using constantly changing (x,Y) Point. How should I do this using some code?

My GPS device will write (x,y) to a text file. From there I get (x,y) and plot two points at a time over a map on QGIS using below Code.

    QUrl url =  QUrl::fromLocalFile("/home/mit/Desktop/Bagfiles/file1.txt");
    url.addQueryItem("delimiter",",");
    url.addQueryItem("xField", "x");
    url.addQueryItem("yField", "y");
    url.addQueryItem("crs","epsg:4723");
    while (true)
    {
    emit drawVectorLayer(QString::fromAscii( url.toEncoded() ), "layer", "delimitedtext");
   usleep(10000000);
    }

Now I want to center the map based on these values.


texts: Couldn't load SIP module (QGIS doesn't load Python)

texts:
I recently installed QGIS 2.4, but Python does not load. I am running on a Windows 64 bit machine.

I receive the error message "Couldn't load SIP module Python support will be disabled".

Traceback (most recent call last):
  File "", line 1, in
ImportError: DLL load failed: %1 is not a valid Win32 application.

I have another installation of Python at C:/Python27. It is the 32-bit version.

When I remove C:/Python27 folder, QGIS works fine, so there is some linkage between the new QGIS installation and the C:/Python27 python interpreter. I can't permanently delete C:/Python because I need it for other applications, so I am wondering if there are any suggestion as to how to fix this.


texts: Leaflet Icon not pointing directly on mouse position

texts:
I have a project where I need to add a custom marker when the user clicks on the map. I have created my own SVG in order to show this custom marker. The problem I am facing is that the marker doesn't show correctly where the mouse has clicked.
The marker is positioned with the left top border on the mouse position. But I need the bottom of the pin to be positioned where the mouse has clicked.
 var svg = `<svg width="19px" height="29px" viewBox="0 0 19 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>Combined Shape</title>
    <desc>Created with Sketch.</desc>
    <g id="Onboarding" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="2.6-Charging-rate" transform="translate(-728.000000, -436.000000)" fill="#FFFFFF">
            <g id="Group-14" transform="translate(728.000000, 436.000000)">
                <path d="M9.5,0 C14.7467051,0 19,4.32791409 19,9.66666667 C19,15.0054192 11.4233864,29 9.5,29 C7.57661364,29 0,15.0054192 0,9.66666667 C0,4.32791409 4.25329488,0 9.5,0 Z M9.5,5 C7.01471863,5 5,7.01471863 5,9.5 C5,11.9852814 7.01471863,14 9.5,14 C11.9852814,14 14,11.9852814 14,9.5 C14,7.01471863 11.9852814,5 9.5,5 Z" id="Combined-Shape"></path>
            </g>
        </g>
    </g>
</svg>`;

var iconUrl = 'data:image/svg+xml;base64,' + btoa(svg);
var icon = L.icon({
  iconUrl: iconUrl
});
this.marker = new L.Marker([e.latlng.lat, e.latlng.lng], {
  icon: icon
}).addTo(this.map);


texts: how to disable duplicate items in the legend for ArcGIS JavaScript API

texts:
I have a problem with duplicate items in the legend panel!

Can anyone help me?
This is my feature Layer with popup info:

// Feature Layer
        var msFeatureLayer = new esri.layers.FeatureLayer("url",{
            mode: esri.layers.FeatureLayer.MODE_SELECTION,
            outFields: ["*"],
            infoTemplate:new esri.InfoTemplate({
                title:"infos",
                content:"Code:${Code}
"
            }),
            displayOnPan:true,
            visible:true,
            opacity:1.0
        });

And here i adding the layer to the map and to the legend:

legendLayers.push({layer:msFeatureLayer,title:'Ms'});
        map.addLayers([msFeatureLayer]);

        // control when add a Layer to the map
        dojo.connect(map,'onLayersAddResult',function(results){
            // Activate all Features from a Feature Layer
            showFromFeatureLayer(msFeatureLayer,"1=1");

            // Legend init
            new esri.dijit.Legend({
                map:map,
                layerInfos:legendLayers
            },"legendDiv").startup();

            // Add Checkboxes with label
            dojo.forEach(legendLayers, function(layer){
                var checkBox = new dijit.form.CheckBox({
                    name: "checkBox" + layer.layer.id,
                    value: layer.layer.id,
                    checked: layer.layer.visible,
                    onChange: function(evt) {
            var clayer = map.getLayer(this.value);clayer.setVisibility(!clayer.visible);                            this.checked = clayer.visible;
                    }
                });
                dojo.place(checkBox.domNode,dojo.byId("toggle"),"after");
                dojo.place("
",dojo.create('label',{'for':checkBox.name, innerHTML:layer.title},checkBox.domNode,"after"),"after");
            });
        });


texts: SCP training input error message in semi-automatic classification

texts:
I have been doing some land classifications and everything was working fine, until it wasn't. I keep getting the same error message when I try to calculate the signatures from the ROI creation:

[Information 3]: Select SCP training input; input not loaded

I do get a warning earlier when I try create a bandset, not sure if it is related:
[Warning 13] Unable to load the virtual raster. Please create it manually

I am working on a MAC Sierra, and I have tried uninstalling the plugins and the program (QGIS 2.18) neither of which worked.

I cannot create any relevant tags...


texts: Retrieve the elevation from a point cloud with lastools?

texts: I have a general question about how can I get the elevation (z) data from a pointcloud (las) along a trajectory. I have a shape file with x, y coordinates and I have the related .las files. And I am using lastools for the point cloud.


texts:
Possible Duplicate:
  How can I connect to a PostGIS database from ArcMap 9.3 and 10.0?

I've installed postGIS 1.5.3, and would like to connect it from ArcGIS Destkop v10.

How to do it?


texts: Authorization Expiration message from ArcGIS for Desktop after much less than expected one year?

texts:
I have used ArcGIS (student edition with license) less than a year (in fact I only used it a month and a half) and I got an Authorization Expiration message.I did not obtain the code from the website, I just got it from my instructor for my summer class.

What should I do?


texts: kriging of compositional data (grain size)

texts:
I have posted this already in the GEONet Forum but without any suggestions, now I am hoping for some feedback here:

I have a problem concerning interpolation of compositional data of grain sizes. I need to interpolate the content of each component (clay, silt, sand in percent) to a raster. There are compositional variables — the values are connected by definition. In the case of the three texture fractions, a value of any variable equals 100 less sum of the other two.

As I am reading into this topic I get into more and more problems. For kriging there compositional data do not meet the constrains of stationarity and known mean value. On the other hand my results do not satisfy the constant sum and nonnegativity constrains of the data.

  Walvoort and de Gruijter (2001) for example, already developed a
  compositional solution for ordinary kriging that will enforce
  estimated values to sum to unity at all locations. (Walvoort, D. J.
  J., de Gruijter, J. J., 2001. Compositional Kriging: A Spatial
  Interpolation Method forCompositional Data. Mathematical Geology 33
  (8): 951–966)

I would like to use ArcGIS and its geostatistical capacities - what would be method of choice for such a interpolation? (There has been developed an R package for such cases: http://www.inside-r.org/packages/cran/compositions/docs/compOKriging - but I am not into this program yet to be able to generate meaningful results quickly).


texts:
I have multiple .tiff + .tfw files in EPSG:3067, which I need to reproject to EPSG:3878. I tried to do it with FME, and succeeded, kind of. The geotiffs are placed well, but some weird white area appears between the grid (see image attached) when I add the orthophotos to ArcMap 10.4. I used CsmapReprojector, "ignore heights" was selected and interpolation type was Bicubic and Cell Size was "Preserve Cells". I also defined source and destination coordinates manually to 3067 and 3878.

So what did I do wrong while 3878 reprojection looks like this:

While it should look like this:


texts: Installing GDAL Python bindings on Windows

texts:
This has been addressed before (Installing GDAL with Python on windows?), but I wanted to bring the question up again,

to see if anybody has come up with a better method in the last 5
years, and
to specify that I am looking for a solution that does not require
utilizing a specific shell, which the OSGEO4W installation seems to
require.

Can anybody recommend a certain installation or procedure for installing GDAL Python bindings on Windows 7 or above?


texts: In QGIS, is it possible to save or export a vector layer that has SVG markers as it's points?

texts:
Using QGIS, I have created some points in a vector layer. I'm using SVG markers for them. I'd like to export or save this vector layer along with the SVG symbols for further use in a web application.
Is this possible?


texts: arcpy.ListDatasets will not read CAD files as datasets

texts:
I am essentially running this script but for my own data.  The problem I am having is that the ListDatasets command is not recognizing the CAD .dwg files as datasets (as it should). It returns a 'None' after the arcpy.ListDatasets.

Can anyone tell me why this is?

(modules loaded earlier in script, print statements added for debugging purposes)

    arcpy.env.workspace = ("C:\\SY\\projects\\CGI\\test\\script_test\\CAD\\"+ FC)
    print arcpy.env.workspace
    arcpy.env.overwriteOutput = True
    vTab = arcpy.ValueTable()
    arcpy.ListDatasets("W*.dwg")
    print arcpy.ListDatasets("W*.dwg")
    for fd in arcpy.ListDatasets("W*.dwg"):
        print 'Adding: ', fd
        layername = fd + "_Layer"
        arcpy.MakeFeatureLayer_management(fd + "/Polyline", layername, "\"Layer\" = 'C-DD-ALIGN' ")
        vTab.addRow(layername)
    arcpy.Merge_management(vTab, r"C:\SY\projects\CGI\test\script_test\sratch.gdb\test")

And here are the results I get

    C:\SY\projects\CGI\test\script_test\CAD\W_040
    >>> None
    >>> ArcPy ERRORS:

     Done


texts:
I have created a series of custom tools using Arcobjects (VB.NET) that reside in a toolbar.  Each launches a windows form, takes some parameters and then performs its task.

Is it possible to hook into these via ModelBuilder?  The idea is to allow the user to leverage the iteration capabilities in model builder to vary one of the parameters and run iterative, 'hands-free' testing.


texts:
I am trying to calculate NDWI for a PlanetScope image scene. I currently have 2 products: one is the "3B_AnalyticMS_SR.tif" and the other is the "3B_AnalyticMS.tif" product. I believe the former is the surface reflectance, and the latter is the TOA radiance.

My problem is that I tried to calculate NDWI using the surface reflectance product, only to get NDWI values all below 0.3, but I know there should be values above 0.3 since there's water. I'm not sure what I'm doing wrong.

Snippets of the two imagery products can be found here.

To calculate the NDWI, I took the "3B_AnalyticMS_SR.tif" product and used the ArcGIS Pro band arithmetic function to calculate the NDWI equation (B2-B4)/(B2+B4). This has worked previously for me in calculating NDWI, so I am convinced my issue is with the data I am using. I have found documentation saying the SR product is surface reflectance, but I also found information detailing that it is scaled radiance as well.... I am a novice so any help would be appreciated!


texts: Understanding semivariogram model in ArcGIS; difference between Binned points and Average points?

texts:
I am sorry if I am unaware of some very basic ideas of semivariogram. I am trying to understand the difference between binned points and averaged points. In this [document] (http://desktop.arcgis.com/en/arcmap/latest/extensions/geostatistical-analyst/fitting-a-model-to-the-empirical-semivariogram.htm)! it says

  Binned values are shown as red dots, and are generated by grouping
  (binning) empirical semivariogram/covariance points together using
  square cells that are one lag wide. Average points are shown as blue
  crosses, and are generated by binning empirical
  semivariogram/covariance points that fall within angular sectors.

I am not sure what it means by:

  fall within angular sectors.

Can you clarify this?


texts: Can't get the web OpenLayers plugins to work because of Mac 'Python error'

texts:
I'm trying to get a relatively small section of Google satellite/ Google Earth as a layer on QGIS on my Mac. When I go to 'web' and the 'OpenLayers' plugin it just comes up with Python error.

I've already installed Python. I would try uninstalling it and reinstalling it but I can't figure out how. What do I do?


texts: GeoMedia WebMap with WFS 1.1.0 Filter Examples?

texts:
I'm having problems forming a GET query for WebMap spatial data using WFS 1.1.0.  My query looks like this:

http://USGVDCALIX2/WFS/Request.aspx?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&MAXFEATURES=500&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><BBOX><PropertyName>Geometry</PropertyName><Box srsName="EPSG:4326" xmlns="http://www.opengis.net/gml"><Envelope srsName="EPSG:4326"><lowerCorner>-72.742129821777 43.944567565918</lowerCorner><upperCorner>72.545288391113 44.148836975098</upperCorner></Envelope></Box></BBOX></Filter>&TYPENAME=Counties

But the result is:

<ExceptionReport xmlns="http://www.opengis.net/ows" version="1.1.0"><Exception exceptionCode="GWMWFS.GeometryUtility" locator="GWMWFS.GeometryUtility"><ExceptionText>Unsupported geometry type.</ExceptionText></Exception></ExceptionReport>

According to this GeoMedia WebMap Professional 6.1 is WFS 1.1.0 compliant.  And according to this my query looks valid.

So does this error suggest that WebMap is unable to do a BBOX query against a polygon?  Should the query be formed differently?  Links to WebMap WFS 1.1.0 filter examples would be welcome!


texts:
I have a problem two layers, parcel and polygon, when I do create new building along side parcel it produces a gaps between parcel and building along the side, how can I clean this gab or how to avoid it.
thank you.


texts: Calculating distance between latitude and longitude points using python

texts:
I have a database of 2000 points, which is in CSV format containing latitude and longitude. I want to find the distance between all these points, and then show these points in a map by using pyQGIS; I have seen one example using Fiona but I want to do this in pyQGIS.

I have used following code:

def offset(iterable):
    prev = None
    for elem in iterable:
        yield prev, elem
        prev = elem

import csv
import math

def haversine(lon1, lat1, lon2, lat2):
    """
    Calculate the great circle distance between two points
    on the earth (specified in decimal degrees).
    Source: http://gis.stackexchange.com/a/56589/15183
    """
    # convert decimal degrees to radians
    lon1, lat1, lon2, lat2 = map(math.radians, [lon1, lat1, lon2, lat2])
    # haversine formula
    dlon = lon2 - lon1
    dlat = lat2 - lat1
    a = math.sin(dlat/2)**2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon/2)**2
    c = 2 * math.asin(math.sqrt(a))
    km = 6367 * c
    return km

    with open('1.csv', 'rb') as f1:
    reader1 = csv.reader(f1)
    header1 = reader1.next()
    with open('2.csv', 'rb') as f2:
        reader2 = csv.reader(f2)
        header2 = reader2.next()
        for row1 in offset(header1):
            for row2 in offset(header2):
                floats1 = map(float, row1[1:])
                floats2 = map(float, row2[1:])
                print(floats1)
                print(floats2)
                print haversine(floats1[1],floats1[0],floats2[1],floats2[0])

Showing error:

Traceback (most recent call last):
  File "<input>", line 13, in <module>
IndexError: list index out of range

My .csv file contains following data with about 2000 data pointt:

ID  LAT         LONG
1   12.953578   77.592453
2   12.953511   77.592445
3   12.953145   77.593147
4   12.951835   77.594612


texts: How to set output parameter to a zip file in a custom geoprocessing function tool?

texts:
I'm trying to write a custom geoprocessing function tool in ArcObjects that I can then expose as a service on ArcServer.  The output parameter will be a zip file that contains a filegeodatabase.  I have marked the parameter as a required and attempted to set some of the default properties of the GPDataFile class, but when I run my try task, no matter what I type into the "Output Export File" input box I get a message saying that it is required.

Does anybody have any samples on how to use and set the properties of the GPDataFile class to be used as an output parameter?

IGPDataFile gRDL = new GPDataFileClass();
gRDL.DataType = "zip";
gRDL.DatasetName = "TableName";

IGPParameterEdit3 inputParameter = new GPParameterClass();
inputParameter.DataType = new GPDataFileTypeClass();

// Default Value object
inputParameter.Value = gRDL as IGPValue;

// Set Parameter properties
inputParameter.Direction = esriGPParameterDirection.esriGPParameterDirectionOutput;
inputParameter.DisplayName = "Output Export File";
inputParameter.Name = "out_export_file";
inputParameter.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;
return inputParameter;


texts: Import Error: PyQt4 disabled by IPython, incompatible QT binding

texts:
I'm running QGIS 2.14 and trying to learn how to develop python standalone scripts.  Currently I am using Canopy's (v 2.1.3.3542) distribution of Python 2.7.  My development is on a Mac (OS 10.13.1) and I have set my PYTHONPATH to /Applications/Qgis.app/Contents/Resources/python. When I type in

from qgis.core import *

I get the following error trace:

ImportErrorTraceback (most recent call last)`
<ipython-input-8-f6129d8bb24b> in <module>()`
----> 1 from qgis.core import *

/Applications/QGis.app/Contents/Resources/python/qgis/__init__.py in <module>()
     34     pass
     35
---> 36 from qgis.core import QgsFeature, QgsGeometry
     37
     38

/Applications/QGis.app/Contents/Resources/python/qgis/core/__init__.py in <module>()
     33 import string
     34 from qgis._core import *
---> 35 from PyQt4.QtCore import QCoreApplication
     36
     37

/Users/babsii/Library/Enthought/Canopy/edm/envs/User/lib/python2.7/site-packages/IPython/external/qt_loaders.py in load_module(self, fullname)
     54     Importing %s disabled by IPython, which has
     55     already imported an Incompatible QT Binding: %s
---> 56     """ % (fullname, loaded_api()))
     57
     58 ID = ImportDenier()

ImportError:
   Importing PyQt4 disabled by IPython, which has
   already imported an Incompatible QT Binding: pyside

I see if I run a non-Enthought/Canopy distribution, I don't have this issue.  Is there a way to still use the Enthought/Canopy distribution?


texts: Storing Multiple Features of FeatureCollection in PostGIS geography field

texts:
I am working on GO Echo project and we connect to a PostgreSQL database running PostGIS.
I am getting the following json into my rest api
  {
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "geometry":{
            "type":"Polygon",
            "coordinates":[
               [
                  [
                     -122.47812398582933,
                     37.79327313211862
                  ],
                  [
                     -122.45659724682807,
                     37.79251379803499
                  ],
                  [
                     -122.47566171795367,
                     37.78461000754145
                  ],
                  [
                     -122.47812398582933,
                     37.79327313211862
                  ]
               ]
            ]
         },
         "properties":null
      },
      {
         "type":"Feature",
         "geometry":{
            "type":"Polygon",
            "coordinates":[
               [
                  [
                     -122.435644500556,
                     37.78945677677799
                  ],
                  [
                     -122.40663372785089,
                     37.786988387557116
                  ],
                  [
                     -122.4258779069805,
                     37.779960074721366
                  ],
                  [
                     -122.435644500556,
                     37.78945677677799
                  ]
               ]
            ]
         },
         "properties":null
      }
   ]
}

If I try to store 1 feature in the db as follows - it works fine
gj, err := area.GeoJSON.Features[0].Geometry.MarshalJSON()
    query := sq.
        Insert("areas").
        Columns("id", "geog").
        Values(sq.Expr("DEFAULT"), sq.Expr("ST_SetSRID(ST_GeomFromGeoJSON(?),4326)", string(gj))).
        Suffix("RETURNING id").
        RunWith(dbCxn).
        PlaceholderFormat(sq.Dollar)

    query.QueryRow().Scan(
        &area.ID,
    )

However I am struggling to find a way to store all the features when more than 1 feature is submitted in the request.
I tried changing gj to this line but that will not save
gj, err := area.GeoJSON.MarshalJSON()

What is the correct approach to follow here?


texts: Selecting all points of polygon as single feature using Google Earth Engine


texts: Displaying SimpleMarkerSymbol in a button

texts:
I'm making a button that the user can click and it will bring up the symbol selection window. I'm trying to make it such that after the user has made a selection, the symbol that they select is also displayed inside the button.

Is this possible?


texts: Reproduce a raster with same cell size but different no of columns and rows

texts:
I have a DEM raster of 200m resolution, the no of columns and rows are  2458 and 2845, I want to reproduce this raster in a way that the cell size remains the same i.e. 200,200 but the no of columns and rows should be below 36 (thats the requirement of my software), I have tried using the aggregate tool but it reduces the no of columns and rows but increases the cell size up to 2000.

Can anyone suggest me a tool to achieve this sort of conversion in ArcGIS  10.1?


texts: Is it possible to make a field required in a QGIS Edit Form?


texts: ArcPy script error - NoneType object has no attribute X

texts:
I'm familiarising myself with using scripting in ArcMap 10.2 and as part of this I'm using the following to extract vertices from some polygons.

...
... import arcpy
... from arcpy import env
... env.workspace = "C:/WORKING"
... fc = "Dist_Footprint.shp"
... cursor = arcpy.da.SearchCursor(fc, ["OID@", "SHAPE@"])
... for row in cursor:
...     print("Feature {0}: ".format(row[0]))
...     for point in row[1].getPart(0):
...         print ("{0}, {1}".format(point.X,point.Y))

It chugs through pulling out co-ordinates ok until I get the following error message.

Runtime error
Traceback (most recent call last):
  File "<string>", line 11, in <module>
AttributeError: 'NoneType' object has no attribute 'X'

I've had a look at a few previous questions to try to get some answers eg. https://stackoverflow.com/questions/19946947/tkinter-nonetype-object-has-no-attribute-pack-still-works. These flag that there is a variable whose value is None, and the script is trying to do None.X(), or NoneType means that the data source could not be opened.

1) The script does not finish the first polygon. I have displayed the Python-generated co-ordinates in ArcMap and know which polygon it is. Also have run the geometry check on the polygon by itself. No apparent issues. ArcGIS still says no issues with main file. I have checked with QGIS which says there are some issues but NOT related to the polygon flagged by Python. In QGIS I get 4 invalid geometry errors along the lines of "segment 0 of ring 0 of polygon 0 intersect 0 of ring 0 of polygon 2 at X, Y location" related to other polygons.

2) I have run the script on a previous version of the problem file and it gets to Feature 16 before falling over. Running the original script on some simple polygons works fine so looks like the script is ok. Back to the drawing board with the original file (not sure where to go as the check geometry tool says it's ok).

Anybody suggest what other tools I can use to work out where the problem is?


texts: Joining attributes of lines with same coordinates in QGIS

texts:
I try to join attributes between two different line layers.
The first line layer (data source) is given. The second line layer is  consisting of filtered lines from first layer, created by python code.
I want to have the same attributes in filtered lines as in basic layer. I was trying to use NNJoin plugin, but unfortunately it is giving me wrong data. The example below.
My question is: How to join the attributes properly and why this plugin is giving me the uncorrect results?
I am using QGIS 2.14.3 as well as Python.
Left side shows proper attribute. Right side shows bad matching of attributes with NNJoin


texts:
I was required to download my countries road data from OpenStreet Maps for a project I'm currently working on. For this I used the OSMnx Library. However, as my RAM was insufficient to download the entire country's data at once I decided to download the data district-wise by writing the following function on python.

# Defining Map Extraction Function
def map_extract(district):
    import osmnx as ox # importing OSMnx Library
    G = ox.graph_from_place(district, network_type='walk') # Extracting the district street network graph
    G_projected = ox.project_graph(G)

ox.save_load.save_graph_shapefile(G_projected, filename=district, folder=None, encoding='utf-8') # Saving the street network graph as an ESRI Shapefile

After downloading the shapefiles and loading them in QGIS I realized that the road data on the district boundaries were missing.

Any suggestion as to how I may do this while preserving boundary data will be helpful


texts: Merging polygon with two (or more) adjacent polygons in ArcGIS Desktop?

texts:
I have for example this:

I want to create this:

Basically I want to cut the polygon on the left side in half and merge one half with the upper right polygon and the other half with the lower right polygon.

It should be cut with a line that is the closest path from where the three polygons share a vertex to the outer border of the left polygon.

Manually cutting and merging won't do due to the amount of features that need this kind of merging. I'm using ArcGIS 10 with the advanced license.


texts: Modifying layer name in the layout legend with PyQGIS 3

texts:
I would like to update the legend item in my layout with other names.
I tried the following code, which returns no error but layers name remain the same.
project = QgsProject.instance()
layout = QgsPrintLayout(project)
layout.initializeDefaults()

layersToAdd = [puit, puit_m, amas, home, fosse, eau_l, eau_p, pdf] # each layer is defined with mapLayersByName
Names = ['Puit', 'Puit municipal', 'Amas', 'Maison', 'Fossé', 'Cours d\'eau', 'Surface d\'eau', 'Champs']
legend = QgsLayoutItemLegend(layout)
legend.setAutoUpdateModel(False)
root = QgsLayerTree()
tree=legend.model().rootGroup()
i = 0
for layer in layersToAdd:
    #add layer objects to the layer tree
    root.addLayer(layer)
    tree.children()[i].setName(Names[i])
    i += 1
legend.updateLegend()
legend.model().setRootGroup(root)
layout.addLayoutItem(legend)


texts: Should a QGIS plugin access the DB tables directly or through QgsVectorLayer?

texts:
I have developed a QGIS python plugin that heavily deals with many Postgresql tables. It joins the data from these tables, and allows viewing this data, adding, updating, and deleting.
In my plugin I am accessing the tables as QgsVectorLayer using:
layer1 = QgsProject.instance().mapLayersByName('layer1_name')

Of course I had to add all my tables as vector layers to the QGIS project first.
As I mentioned I am doing some joins between the tables, but I am doing this manually; for example if I have a Customers table that has a one-to-many relationship to Bills table, then in order to display the bills of some given customerIds I loop over all these customerIds, one by one, filter the Bills layer by the customerId and get the returned features from the Bills layer. This is just and example, but in reality I am doing that between many tables.
My problem is the performance of my plugin is very bad; it takes too long time to load/add/update the data.
My question is: is my approach correct? or should I access the DB tables directly (e.g using psycopg2), and create joins using a normal JOIN SQL query?


texts: Managing script folders in Google Earth Engine?

texts:
I am new at GEE and I just created a folder named Tutorials to save my first scripts. Like that:

  users/GEEDataJosep/Tutorials

Right now I am using the acquired knowledge to work with my projects and I am only able to save that scripts to that 'Tutorials' folder.

Is there any way to manage that folders and create a new one for real projects?


texts: Dates and parentheses in sql query in arcpy

texts:
I am trying to select records within a specified date range from a file geodatabase feature class using an sql query but am having a hard time getting the syntax correct. I have tried numerous ways but at this point am getting no records returned. The last couple of versions of the query I have tried are as follows:

whereClause = """'{0}' > '{1}' AND '{0}' < '{2}'""".format(arcpy.AddFieldDelimiters(fcMaster, "date"), '2016-10-02 02:30:00', '2016-10-05 02:30:00')

whereClause = """'{0}' BETWEEN '{1}' AND '{2}'""".format(arcpy.AddFieldDelimiters(fcMaster, "date"), 'date 2016-10-02 02:30:00', 'date 2016-10-05 00:02:30')


texts: Satellite image stretch with python: skimage, numpy

texts:
I am trying to perform a simple contrast stretch with python skimage on the image opened with gdal as array of type float32. I first calculate the percentile with:

p2, p98 = np.percentile(arrayF, (P1, P2))

and then try to perform the stretch with:

img_rescale = exposure.rescale_intensity(arrayF, in_range=(p2, p98))

The returned image written to .tiff with GDAL contains only 'ones' and nodata.
The cause of the problem might be in data range. For this arrayF it is between 0,0352989 and 1,03559. The script Works fine when stretching the array with values 0 - 255.


texts:
I am product testing and would like a sample ArcSDE server to connect to for testing.

Does anyone know of ones that are still out there available?


texts: Performance difference on ST_DWithin between tables with similar size

texts:
I am performing a spatial join between the left table (at_test) with about 1000 rows and two right tables (sociodemo_filt and pb_poi_geog) with about 5M rows each.
I am working with geographies, and each table are indexed on this geography column.
I observe a difference in performance of a factor 40 on the following query:

SELECT
    l.jdecode
FROM
    at_test as l left join
    (select the_geog from left_table) as s
on   ST_DWITHIN(l.the_geog, s.the_geog, 1000)
GROUP BY
        l.jdecode

When looking at the results of analyze explain I just notice a slight difference on Index Scan. The pb_poi_geog (the table for which the query takes much longer) has much more rows in the index scan (please see screenshots below). Why is that? And more importantly how can I achieve the same performance than for the table sociodemo_filt?

Query plan for sociodemo_filt (fast query)

Query plan for pb_poi_geog (slow query)


texts: Built a query for polygon Shapefile in R

texts:
I use the package maptools to read in Shapefiles in R. I would like to know if there is a function that can built up a query/subset to select only some Polygons based on a specific attribute in the a.t. (for example one state out of a shapefile with all states in one country). And, can I save this subset as a spatial object to do further analyses in R?
Best


texts: Running shortest path analysis for DEM-derived streams and pour points?

texts:
I have a .shp for streams and another for pour points. Those features were extracted from a DEM by using the Hydrology package from the Spatial Analyst Tools of ArcGIS 10.

I want to know the distance between every pour point along the flow path network. What procedure should I use?


texts: How to access png tiles loaded in the browser

texts:
I've a local map server that renders mbtiles file in the browser and I'm trying to access the source files generated by it and loaded on the document.

So far I've been able to get my hands on the respective HTMLcollection with the document.querySelector and document.getElementsByClassName() methods:

var collection =
  document.querySelector(".featured")
  .getElementsByClassName("leaflet-tile");

console.log(collection);

I get the following log on Firebug:

0 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
1 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
2 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
3 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
4 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
5 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
6 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
7 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
8 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
9 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
10 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
11 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
12 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1540.png
13 img.leaflet-tile.leaflet-tile-loaded ./tiles/b...1541.png
length 14
__proto__ HTMLCollection { item=item(),  namedItem=namedItem()}

I tried everything I could remember to get hold of the paths for the png files. For instance:

var array = [];

for (var i = 0; i < collection.length; i++) {
    array.push([
        collection[i]
]);
    console.log(collection[i]);
}

console.log("lenght of collection is: " + collection.length);
console.dir("array is: " + array);

On my console I get the following:

lenght of collection is: 0
array is: undefined

A lenght of zero and nothing on my array. It's obvious that I'm doing something wrong on my iteration, but I cannot figure it out. What am I missing here?


texts: Previewing table in ArcGIS Pro without adding to map?

texts:
In ArcMap I often preview a table by using the Catalog window to right-click it, which opens the Item Description window and enables me to go to the Preview tab.

Is there an equivalent workflow (i.e. one that does not require me to add the table to a map) in ArcGIS Pro to do this?

From what I can see in ArcGIS Pro 1.3.1 the closest thing seems to be using the Project pane to right-click the table but then I have to "Add to Current Map", "Add to New Map" or "Add to New Scene" before I can use the Contents pane to right-click and Open it.

There is an ArcGIS Idea to Add Stand Alone Data Catalog Like ArcCatalog to ArcGIS Pro which I am reserving my vote on at the moment.  I am hoping for something more like Preview from ArcMap's Item Description in its Catalog window.


texts: Fast way to extract bounding boxes from OSM PBF data…

texts:
Is there an efficient way to convert a set of node/relations in a PBF file, to the bounding boxes for each polygon, without going through a conversion to another GIS format?
Right now, my pipeline consists of:

Extract nodes/relations of interest (with osmium)
Convert to gpkg (costly)
Load with geopandas (costly for large files)
Extract bounding box for each polygon and save new file

Is there by any chance a program that could work directly with PBF?
Context: I am trying to supplement existing landusage data with building data, in order to then run quick estimates on land use, for any arbitrary region… But do not need the precision (and ensuing size/speed hit) of having exact building polygons, so would instead like to extract only bounding boxes and use that.


texts:
I'm new to GIS and when I was looking in my data directory I saw .prj-file.

What is that and how is it useful?


texts:
I have a shapefile with table with area code (field areacode).

How can I export with ArcPy each unique area code so I get a SHP file for each one?

It takes too long to select the layer and query each area code and then export manually to SHP file.


texts:
I am having trouble importing stratigraphy data from a CSV file.

The CSV files can be found at the following link:
https://www.dropbox.com/sh/txrrcpbf6cpzh52/AAC8jk4DGP7dZYfBBpj2s1B7a?dl=0

When loaded into QGIS as a CSV import the stratigraphy table recognizes all the columns except development and comment.

I receive the following Python error when I start the import:

  TypeError: float() argument must be a string or a number

There are no midvatten error warnings.

I have managed to successfully import the obs_points data but having no joy with this. The only thing that works is importing the data manually into an attribute table (not ideal).

Perhaps it is something to do with the columns in the CSV?


texts: Extending geometry of one MultiLine shapefile alongside the geometry of another MultiLine shapefile in Qgis 3.16.5

texts:
I'm trying to extend segments of one polyline shapefile from the intersecting point wit another multiline feature alongside the vertices of this secon line feature. For this I'm using the nod tool, by clicking each vertix point individualy. Is there a better and faster solution to this?
Here is a YouTube link to me explaining my problem: https://www.youtube.com/watch?v=8KLG4BCOcDY


texts:
We are a small non-profit. We use a fairly complex MS Access application to track everything.

We would very much like to geocode addresses in our application and display the results on a map. In other words, we would like to input an address and have it display on a map. We would need to use the GIS data provided by our municipality. They use ArcGIS and the MXD files contain a fair amount of ancillary data for each point.

We have access to ArcGIS 9.x. But I am unable to get the map control working in our Access application, and apparently Esri is eliminating that control anyway. I tried the following already:

Google Maps static API. Works pretty well, but I have no way of geocoding against the local municipal data.
MapWinGIS makes great maps based on ArcGIS file, but I have no way to geocode against the local data, as far as I can tell.
Export MXD to KML. Works OK, but no labels/other ancillary data.
Export points in ArcGIS and import to Access table. Sloppy, doesn't bode well for future updates to the GIS data provided by the municipality, and have no way of dealing with intersections.

I would be willing to import the ArcGIS data into a different GIS product, if it would help (we could presumably just import new versions of the data in the same way.)


texts: real-time weather forecast raster for Europe

texts:
I am trying to find a numeric weather forecast map (air pressure, temperature, snowfall, precipitation..) that I could display in my web map client. For the client I'm currently using OpenLayers with the 'web mercator' projection.

I searched for "numeric weather forecast models" and found the GFS (global forecast system) and ECMWF. There are also some websites like: http://www.weatheronline.co.uk/cgi-bin/expertcharts?LANG=en&MENU=0000000000&CONT=euro&MODELL=gfs&MODELLTYP=1&BASE=-&VAR=prec&HH=3&ZOOM=0&ARCHIV=0&RES=0&WMO=&PERIOD=
Here the weather forecast raster map is available as a .gif image and no info about the projection is provided, so I can't use it directly in the OpenLayers map client.

I also found some weather forecast WMS services for USA, but nothing for Europe.

Do you know about any free data source where the weather forecast map (ideally GFS or ECMWF model) available in a more GIS-compatible format? I would prefer the WMS but I also could use other formats (NetCDF, GeoTiff, ASCII grid..) and re-publish them with MapServer or GeoServer as a WMS.

Edit:

When I ask the question "where to find a WMS for my topic"  It seems a good idea to do a search at http://spatineo.com. I typed in some keywords (GFS, ECMWF, weather forecast) and I found some interesting WMS services with weather forecast data. Spatineo.com also shows if the service is up and if the data access is free or restricted.


texts: Finding percent landcover types with points or polylines using ArcMap

texts:
I am using ArcMap 10.1. I had an orthophoto of an old study site. I traced two polygon shapefiles from this photo- one of "fields" and one of "forest". I made a point shapefile of the sampling points, and a polyline shapefile of all possible paths between the sample points. If a butterfly were to fly from one sample point to another (assuming linear flight along the polylines), I am looking to determine:

what percent of that flight distance was through field?
what percent of that flight distance was through forest?
how many times that individual had to cross a forest/field edge?

I haven't used GIS since my intro class many years ago, and I can't even figure out the correct vocabulary to search for the answer myself.


texts: How to find "Ignore shapefile encoding declaration" in QGIS 3.10.7

texts:
When I tried to change data source encoding of a DXF file in QGIS, the field is grayed out and stuck to UTF-8.
Then I found this solution. But there's no Ignore shape file encoding declaration checkbox in the place described.
How should I find this option in version 3.10.7?


texts: How make a fast background map using GeoServer?

texts:
I've got a layer with a lot of polygons. These polygons features data which I'm trying to present on my GIS viewer as a background map. Using GeoServer, making a WMS and presetting it on my viewer. But since there are a lot of polygons in the layer, things tend to load quite slowly.

Naturally this can be explained by the speed of the server. But, since I've no direct impact on the speed of the server, is there a way to make this layer faster using GeoServer?

In other words, is a WMS faster than a WMTS or TMS? Is there a other way to make a fast background map without increasing the speed of the server?

Ps. The source of the layer is a table in an PostGis db.


texts: QGIS 3: How to access additional SVG symbols

texts:
I want to create a map with a complex style and loaded a couple of additional SVG-libraries on my disk to the folder /usr/share/qgis/svg/ (I am on a Linux machine, running QGIS 3.10.1).

I have changed the SVG path in the options accordingly (see below) and even added another path to a certain subfolder, but still I can not find any of the SVG's in the styles menu to chose from.

I checked the forum history and didn't find anything on that problem appart from this post: QGIS3: how to load SVG symbols

Apparently this user had the same problem, but it wasn't really solved for him either.


texts:
I need to transform Sentinel 2 L1C imagery to preprocessed Level 2A data.
Ideally this should happen in R, as the remaining processing stack is already done in R.
Are there ready preprocessing solutions similar to Sen2Cor?

I already found the RStoolbox, but it states to be intended for Landsat imagery. The same goes for satellite.

Is athmospheric correction, cloud detection and other preprocessing specific to each satellite platform, or can I still apply the functions from these packages to Sentinel 2 data?


texts: Populate an empty raster with values from intersecting vector layers

texts:
I'm looking to populate a large, empty Unsigned 8-bit raster with integer values 1 to 10. The value depends on the spatial relationship between a given raster cell and a variety of vector layers (points/lines/polygons) stored in PostGIS. I also have the vectors in shapefile and File GeoDatabase formats. Various fields and attributes within the vector layers need to be taken into account too.

Example: IF raster cell is 50m away from polygon A AND polygon A name = 'Alpha', THEN assign value of 3 to that raster cell. And repeat for all cells etc....

Bearing in mind the empty raster is 5x5m and covers the entire area of Great Britain (so billions of cells), and that the vector layers (30-40 or so) can contains 1000s of features each, what is the best way to populate the raster with values?

Raster details: -ot Byte -of GTiff -tr 5 5 -a_nodata 255

Example of the process I'm looking to repeat:

Note how this isn't simply a case of rasterizing vector layers, it's about the spatial relationship between multiple layers as well. See how the red dots, although small, actually affect a greater area proportionally than say, the blue polygon.


texts:
I  want to publish my .shp file but I am facing one uxpected error.

  could not connect to server: Connection refused (0x0000274D/10061)    Is
  the server running on host "db.qgiscloud.com" (136.243.87.197) and
  accepting     TCP/IP connections on port 5432?

  Traceback (most recent call last):   File
  "C:/Users/srap/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudplugindialog.py",
  line 695, in update_local_layers
      self.update_local_data_sources(local_layers,  local_raster_layers)   File
  "C:/Users/srap/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudplugindialog.py",
  line 737, in update_local_data_sources
      self.update_data_sources_table_names()   File "C:/Users/srap/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudplugindialog.py",
  line 884, in update_data_sources_table_names
      schema_list = self.fetch_schemas(self.ui.cbUploadDatabase.currentText())   File
  "C:/Users/srap/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudplugindialog.py",
  line 1058, in fetch_schemas
      conn = self.db_connections.db(db).psycopg_connection()   File "C:/Users/srap/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\db_connection_cfg.py",
  line 165, in psycopg_connection
      port=self.port   File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\psycopg2__init__.py",
  line 130, in connect
      conn = _connect(dsn, connection_factory=connection_factory, **kwasync) psycopg2.OperationalError: could not connect to server: Connection refused (0x0000274D/10061)  Is the server running on host
  "db.qgiscloud.com" (136.243.87.197) and accepting     TCP/IP connections
  on port 5432?

can anyone help me to interpret this error?


texts:
While using the Vector->Data Management Tools->Join Attributes by Location process, and following this great tutorial on spatial joins. (http://www.qgistutorials.com/de/docs/performing_spatial_joins.html) I tried to create the sum of pumping rates from all the well (points) located within a feature (grid polygons). See image:

After using the Join attributes by Location feature, I can generate the grid cells with the "sum". The cells are in the correct locations

However, this sum is completely wrong. for most of the cells created, the sum is zero, and in those cells where it is not (6 out of 170) the number generated seems completely random. I repeated with with other functions like mean, max, etc. and still get nonsensical values. Are there requirements for the "receiving" layer?

What could be the source of this error? And how can I solve it within QGIS?


texts: The picture is getting cut when I put my ASC file of altitude variable

texts: I am trying to project my ASC file of altitude variable on QGIS. But its picture is getting cut and a visual cuts and bruises are seen in the picture. Can you please tell me why is it happening?


texts: Transform GeoRSS from WGS84 to UTM 33N with ogr2ogr

texts:
Is this really not supported or do I have missed something in my code? If it is not possible with ogr2ogr, do you know of any other open source methods to reproject from GeoRSS to GeoRSS or from shp to GeoRSS?

srcfile=D:/GIS_DataBase/QGIS_Projects/BIK-Stm/BIK_STAINACH_new.xml
destfile=D:/GIS_DataBase/QGIS_Projects/BIK-Stm/BIK_STAINACH_UTM.xml

ogr2ogr -f "GeoRSS" $destfile -t_srs "EPSG:25833" $srcfile

echo check result:
ogrinfo -al $destfile

$ sh reproject.sh
ERROR 6: For a non GML dialect, only WGS84 SRS is supported
ERROR 1: Terminating translation prematurely after failed
translation of layer georss (use -skipfailures to skip errors)
...


texts: Handling hundreds of raster tiles in ArcGIS 10

texts:
I have 650 individual raster tiles (MrSID format) representing aerial imagery of a county. Each one is approx. 72 MB in size. As with a lot of aerial imagery, I use this as a base image for other layers, e.g. parcels, roads, subdivisions, etc, for planning purposes.

What is the best way to store/use these for such a purpose? I attempted to create a raster dataset within a personal geodatabase (ArcGIS Basic 10.2), but it was taking an incredibly long time so I cancelled the process. Perhaps my settings could be tweaked to speed up the process? This raster is for my own personal use, not as an image service over a server.


texts: Specify target elevation with r.viewshed in QGIS processing toolbox?

texts:
How do I specify the target-height in r.viewshed when using the operator through QGIS's processing toolbox? It doesn't seem to be available.

Who should I contact to adjust the interface such that the target-height option could be added to the r.viewshed dialogue box? Is that something that I can do myself?

In the mean-time, is the viewshed analysis plugin the only other option? It seems to routinely give me memory errors and crash, so I'd prefer to stay away from it.


texts: How to modify values in a raster that are smaller OR larger than two thresholds

texts:
In ArcGIS 10.1 (advanced license), I have a raster dataset representing the wind speed (in knots). I want to be able to set the wind speed value to a specific value (say, for the sake of argument, a very low value like 0.1) only for those cells with a value smaller than (say) 3 and larger than 10. My best guess is to use a Conditional statement in RASTER CALCULATOR, but I am not familiar with that.
I have tried something like:
    Con(("raster" <  3) | ("raster"  >  10), 0.1, "raster")
but it seems to not work.
Is that syntax right, or I am missing something?


texts: Choosing IDW vs Kriging Interpolation for DEM creation?

texts:
I'm trying to create a DEM using point data spaced very regularly about 10m apart. The area I am interpolating is an educational facility with many flat parking lots and football fields but still has some fairly steep hills that will often plateau to a parking lot. Due to these known plateaus, I have ruled out the Splining method; However, I'm still not sure between using IDW and Kriging methods. I can't see much of a difference after trying both of them and still haven't made my decision after a little research.

Anyone got some words of wisdom to clear this up for me?


texts: Why are stations in Japan rendered as a mix of red, yellow and orange in Google Maps?

texts:
When you go by a large train station in Japan in Google Maps, you can see that it, along with its surroundings, is often heavily colored (see this example, another example).

I would like to know whether this is more of a national convention, something specific to Google Maps or simply something done by the transport authority?


texts: ST_Intersects returns "incomplete" results

texts:
I've created a PostGIS database of bus stops and train stations (from the gtfs file of two transit authority -- CITLA is the bus and AMT_Trains is... well, the train).

I've created a 200 meters buffer around each train station and tried to select each bus stop that intersects those buffers :

CREATE TABLE citla.stop_stations AS
    SELECT citla.stops.stop_id AS cit_stop_id, amt_trains.stops.stop_id AS amt_stop_id, citla.stops.the_geom AS the_geom
    FROM amt_trains.stops, citla.stops
    WHERE ST_Intersects(amt_trains.stops.the_geom, citla.stops.the_geom);

In this screenshot,

we see that the buffers (the grey circles) are correct (I'm telling you, they are at the right place... I've just removed the train stations symbol for clarity).

The red dots are bus stops. The bigger blue dots are intersecting point (results from a spatial selection in QGIS). The single yellow dot is the PostGIS query result. It's just a sample, but only 6 of the supposed bus stops are selected.

I tried with

WHERE ST_Contains(amt_trains.stops.the_geom, citla.stops.the_geom);

but I have the exact same results.

I'm new to PostGIS and I'm stuck. Any ideas?

THANKS!!


texts: Splitting picture taken with regular digital camera into real spectral RGB channels?

texts:
I have no idea how the sensors inside a camera work. I know I can take jpeg and separate the R, G and B channels but I have no idea whether these channels are the real red, blue and green in visible spectrum of light.

Why do I ask this:

Working with remote sensing data (i.e. Landsat 8 data) I can composite bands 2,3 and 4 (blue, green and red respectively) into a visible image. I can operate bands 4,5 into a NDVI index, I can do lots of combinations, image classifications, etc. I know there are many corrections to perform (DN to radiance, reflectance, atmospheric, etc.) but this is another topic.

So imagine I have one regular camera and one camera that captures only NIR (or some IR wavelength), could I separate the RGB values of the first camera and calculate the NDVI index (or others) with the NIR camera? Does this make any sense?


texts: How to get a composition name in Qgis python console?

texts:
In Qgis python console:
I want to populate a list with compositions names, like in Composer Manager, but I can't figure out how to get the names (titles).

So far:

composerlist = self.iface.activeComposers()

And I get a list of QgsComposerView objects.

Now I want something like that:

for item in composerlist:
    print item.title()

Thank you.


texts: Cannot get GEOS support working in Python 3.7 with GDAL 2.4.4

texts:
I seem unable to get GEOS support for GDAL 2.4.4 to work in Python on my Ubuntu 20.04 machine.
I've done the following:

Installed libgeos-dev on my system
Downloaded and extracted gdal-2.4.4.tar.gz
./configure --with-proj --with-python=$(which python) --with-geos=yes
make && sudo make install (The output indicated GEOS support: yes after installation)
In the swig/python directory, did a pip install .
Put the site-packages for osgeo and gdal install location on both my PATH and PYTHONPATH

When I go into my python shell, I try to use Centroid, but get an error.
from osgeo import ogr
point = """{"type":"Point","coordinates":[-90.02001032734194,35.127405562848075]}"""
geom = ogr.CreateGeometryFromJson(point)
geom.Centroid()
ERROR 6: GEOS support not enabled.

I can import gdal and ogr fine, they are located where I expect with the versions I expect, but for some reason it does not have GEOS support.
gdalinfo --version is indeed 2.4.4 and the install is where I expect.
Tried installing pygdal==2.4.4.6, but it did not help.
System info:
GDAL version: 2.4.4
OS: Ubuntu 20.04
Python: 3.7.10

What have I done wrong or what more can I check?


texts: ERROR 000732: Cannot clip IDW product to boundary file with Python script

texts:
I am writing a Python script to try to clip a raster generated by Idw_3d interpolation, but it's throwing the infamous 000732 error. I've looked at my file path, and it does exist there. I've opened it up with ArcMap, and it's there. However, I still get the error saying:
 ERROR 000732: Input Features: Dataset precipNew does not exist or is not supported

Note: I'm using IDLE for my IDE.

Here is my code:

import arcpy
from arcpy import env

#Not the actual workspace, it has been changed for this example
env.workspace = "C:\\Documents\\WeatherData.shp"
env.overwriteOutput = True
arcpy.CheckOutExtension("3d")

#arcpy.ListFeatureClasses() indicates that all of the data is present that I need to work with.

#Declare local variables
precipPoints = "PrecipMontana2014"

#Make feature class for the points to be interpolated
arcpy.MakeFeatureLayer_management(points, "points_lyr")

#IDW
arcpy.Idw_3d(in_point_features ="points_lyr", z_field = "RASTERVALU", out_raster = "precipNew")

####Everything works fine until this point, when I try to clip it####

#MontanaBoundary is the boundary I want to clip the IDW raster to

arcpy.Clip_analysis(in-features = "precipNew", clip_features = "MontanaBoundary", out_feature_class = "output1")

The error then throws after this line.


texts: Change Which FeatureClass a RelationshipClass Points at

texts: When you use ArcGIS' Project tool it creates a new featureclass.  This is awesome, unless the featureclass you projected had been related to twenty-some tables.  All of those relationships still point to the original featureclass, but not the new one, as described in this ESRI article.  So, does anyone know if there is a good way to point an existing relationship class at a different featureclass without deleting the relationship class?


texts: QGIS - Python to Add folder location to Browser - Favorites

texts:
I am struggling to get something to work, which would seem to be an easy thing to do, but cannot quite make my understanding of the python docs work in practice.

What I would like to do, is run some python to add some folders to the favorites area in the browser within QGIS. This is to get round an environemental constraint of not being able to save a profile i.e. quickly add a python script to setup the favorites each time log on.

This is what I have tried thus far:

url = "U:\Tyres"
qgis.gui.QgsBrowserDockWidget(addFavoriteDirectory, uri)

...

  Traceback (most recent call last):   File
  "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
      exec(code, self.locals)   File "", line 1, in    File "", line 3, in  NameError: name
  'addFavoriteDirectory' is not defined

AND

url = "U:\Tyres"
qgis.gui.QgsBrowserDockWidget(addFavorite, uri)

...

  Traceback (most recent call last):   File
  "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
      exec(code, self.locals)   File "", line 1, in    File "", line 3, in  NameError: name 'addFavorite' is
  not defined

Should I be calling the addFavorite code differently? This is within the Python console and script area of same.


texts: QGIS - find sections of district boundaries that overlap with city/county boundaries from shapefiles

texts:
I am working on a project where I need to find, for each US congressional district, how much of the congressional district's perimeter overlaps with a city or county boundary. Since the boundaries are unlikely to overlap exactly, I also preferably want to be able to specify a tolerance - So, for instance, boundaries might be considered overlapping as long as they're within 50 meters of each other. Is there any way to accomplish this in QGIS?

I'm using US Census TIGER data, which provides separate shapefiles for congressional districts, city boundaries, and country boundaries.


texts: Android Tablet camera does not focus when using QFIELD

texts:
I am using a Lenovo TB-X704L tablet, Android 7.1.1 with the latest QFIELD app installed. I prepared in QGIS 3.4 a tree survey project with a GPKG point layer, packed it for QFIELD and transferred the data to the tablet. The project opens just fine in QFIELD, with all the edit functions available. The layer table has a field called 'image' in which QFIELD puts the name of the photo I wish to take of the tree. When I click the camera button to take a picture, the camera only focusses very close by. Everything further then 1 meter away is out of focus. When I use the native camera function, the program crashes (which does not surprise me as this function is unstable on recent Android versions). The camera itself is ok, when I take a picture outside QFIELD, all is fine.

If this sounds familiar to anyone, what can I do?


texts: What is the formula to convert WGS84 coordinates to EPSG 2163?

texts: I'm looking for the formula which converts WGS84 coordinates to EPSG:2163. I know that QGIS can do the calculations. but I need the exact formula?


texts: Using R to subtract polygon area of one shapefile from another?

texts:
I'm looking to produce a map from two separate maps in R. My Maps files are as follows:

ftp://ftp.cpc.ncep.noaa.gov/GIS/us_tempprcpfcst/610prcp_20140822.zip #Map1
ftp://ftp.cpc.ncep.noaa.gov/GIS/us_tempprcpfcst/610prcp_20140812.zip #Map2

These are 6-10 day weather Precip maps from NOAA.

I would like to create a map with the area showing, being only the difference of the two maps. So Map1 - Map2 = Map3.   Also, I would like it to show the relative strength of the change for the above or below normal moisture. Which can be seen in the "Prob,N,13,11" & "Cat,C,254" files of the dbf file.

Without success I have tried:
converting to PolySet and then using joinPolys with the Operation="DIFF".
Also:
using readOGR, checking for gIsValid, and then trying to use gDifference.

When I run the second one I get this error:

  Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, "rgeos_difference"):
  TopologyException: no outgoing dirEdge found at -168.86604844949545 63.300706978948405

I am sorry if it seems like such a simple question of taking the difference between two maps but I have been stuck on this question for a number of days now.


texts: ArcSDE 10.2: How to enable and create Geodatabase in Oracle without ArcGIS Desktop

texts:
Since there is no Post Installation Wizard anymore in ArcSDE 10.2 - how can i enable und create a geodatabase in oracle without ArcGIS Desktop? We have only an EDN description for ArcGIS Server/SDE, but no desktop license.

Is there any documentation about it?

Any help is appreciated!!


texts: Is Python/ArcPy capable of delimiting strings with commas into different fields, and running a calculation based on those separate columns

texts:
Using ArcGIS ArcMap 10.6:
I have a text field in an attribute table that has comma separated values (example: 12,24, 64, 87,29). For this example, I will name this field VALUES. Please note that VALUES includes data collected from field work so the spacing between commas will be varied.
My current workflow is as followed:

Export the ID and VALUES fields in the attribute table into a .csv file using Table to Table in ArcMap 10.6
Open the .csv in Excel and run the 'text to columns' function under the Data ribbon
Separate the VALUES field into multiple columns based on commas
Run the calculation:
Copy Column I values and ID columns into a new .csv file
Save and close the new .csv file and join the shapefile to the new .csv file based on ID
Export the newly joined shapefile into a new file and delete the duplicate ID field in the new shapefile

I am wondering if there is a way to automate this Python/ArcPy so I can create a custom script tool to do this without leaving the ArcGIS environment.
Is there a way to separate values in a text field based on commas into different columns, run the above calculation, and have the values from that calculation entered in a new field named VALUES_CALCULATED?


texts:
EDIT: What I forgot to mention when I first had this question is that I was trying to do these calculations on a layer which had joins, BUT where the join was on data that was added from an Excel file.  ArcGIS does not seem to like data from Excel files.

I am trying to use the arcpy.CalculateField_management function and running into some trouble.

I have a shapefile called district_plans, and to this shapefile I have joined a table of data (the table of data is named kdp).  I want to change a field in district_plans to the data in one of the columns of kdp.

Trying the following

arcpy.CalculateField_management("district_plans","district_plans.drawplan", "!kdp$.plan_4!","PYTHON")

yields the following error message

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in
<module>   File "c:\program files x86)\arcgis\desktop10.2\arcpy\arcpy\management.py",
line 3183, in CalculateField     raise e ExecuteError: Failed to execute. Parameters
are not valid. ERROR 000728: Field district_plans.drawplan does not exist within
table Failed to execute (CalculateField).

Trying the following

arcpy.CalculateField_management("district_plans","drawplan", "!kdp$.plan_4!","PYTHON")

yields the following error message

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in
<module>   File "c:\program files x86)\arcgis\desktop10.2\arcpy\arcpy\management.py",
line 3183, in CalculateField     raise e ExecuteError: ERROR 999999: Error executing
function. Failed to execute (CalculateField).

The following variations all yield errors:

arcpy.CalculateField_management("district_plans","district_plans.drawplan", "!plan_4!","PYTHON")

arcpy.CalculateField_management("district_plans","drawplan", "!plan_4!","PYTHON")

I am able to manually perform the field calculation using the field calculator on the drawplan column in the attribute table of district_plans, so I am not sure why the Python version does not work.


texts: Generate sequential Unique ID that is a string from current max Unique ID

texts:
I am very new to python, and I need some help. I am trying to write a script that will find the current highest Unique ID in the 'FACILITYID' field from our 'Meter' layer. Then, it will need to write the next highest value to each row with the value 'Null' in the FACILITYID field. For example, the 'FACILITYID' is a string field formatted like 'MET34869'. Is there a way to do this without making a new field with just the numbers?

This is the code I have so far:

import arcpy

fc = "Database Connections\gio.SPW.sde\SPW.DBO.WaterDistribution\SPW.DBO.wServiceConnection"
field = ['FACILITYID']

# Select max value.
max_value = arcpy.SelectLayerByAttribute_management("Meters", "NEW_SELECTION", "\"FACILITYID\" In (SELECT MAX(\"FACILITYID\") FROM wServiceConnection)")

with arcpy.da.UpdateCursor(fc, field) as cursor:
    for row in cursor:
        if row[0] <= max_value:
            row[0] = row[0]
            cursor.next()
        elif row[0] == None:
# need to figure out how to calculate next highest value when FACILITYID is a string
            row[0] = max_value + 1
            cursor.updateRow(row)
            cursor.next()

print "Task Completed"

I am using ArcGIS 10.2.2.


texts: How to add XAML Resources to App.XAML for an ArcGIS Pro SDK Add-In?

texts:
I am in the process of creating a .NET add-in for ArcGIS Pro SDK.
I have working code in a WPF application that I want to include in my add-in.
The issue is that there is no there is no App.xaml for an ArcGIS Pro add-in file to define my application level resources. ex: (shortened for visibility):
<ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack:,,,/MaterialDesignThemes.Wpf;" /> </ResourceDictionary.MergedDictionaries>
I've read this but it seemed more complex than necessary for my needs.
How can I add application resources to the ArcGIS Pro Plugin without the presence of the App.xaml?


texts: Transferring flows (connections + values) between polygons

texts:
In QGIS there are two shapefiles representing the moving data between cells and one additional layer, see image below

  Moving data defined by:

Polygon "LayerA" (transparent squares with red outline). Besides it also relates to circles representing the movements within cells, visualized on the position of "LayerA" geocentroids.

Polyline layer "Flows" (yellow/grey arrows), convey values via connections between geocentroids of "LayerA" features

  Target layer:

Polygon "LayerB" (light lilac features with dark grey outline).

Additionally, I have already transferred "FLUX" and movement values within cells from "LayerA" into "LayerB" polygons, see my previous question: Inherited values between polygons in QGIS?. It was done using the % of $area calculation.

There might be a meaningful solution/approach of transferring/transmitting/transforming flow  connections represented by "Flows" and its values from relations of "LayerA" into relations of "LayerB".

How can I achieve those connections as polylines?

Additionally, new flows will inherit a similar style to "Flows".

By the request, I can provide a sample of the data.

Flows will exist not between features of "LayerA", but between features of "LayerB". The main aim is to achieve the attribute "FLUX" (i.e. from/to) for connections between"LayerB" possible as table/Origin-Destination Matrix.

There are some requirements/criteria that should be adhered:

1. There are no flow connections between features' parts (selected in yellow) in the same cell

2. There are no connections between the same feature even its parts are in different cells

3. Connections exist between parts of features "LayerB" (based on "Union" output) if they are entirely within two distinct "LayerA" cell features

4. New "FLUX"-value that is conveying, will be calculated as shown on the image below.

For instance, there is a connection between two cells I and II, where "FLUX" is 100. Assuming other values, the "NEW_FLUX" between A' and B'' will be around 1.5625. 100 is only a single example.

References:

Inherited values between polygons in QGIS?
Adjusting flow map styles in QGIS 2
Calculate proportional area of polygon within another layer's polygon
Free and Open Source GIS Ramblings | Movement data in GIS: issues & ideas
Preserving geometry with Virtual Layer in QGIS 2


texts: How can I conduct Geographically Weighted Principal Component Analysis using ArcGIS, Python and SPSS/R?

texts:
I am after a description/methodology for conducting a Geographically Weighted Principal Components Analysis (GWPCA). I am happy using Python for any portion of this and I imagine SPSS or R being used to run the PCA on the geographically weighted variables.

My dataset is composed of roughly 30 independent variables that are measured throughout ~550 census tracts (vector geometry).

I know this is a loaded question. But, as I search and search, there does not seem to be any solutions out there. What I have come across are mathematical equations that explain the fundamental composition of GWPCA (and GWR). What I am after is more applied in a sense, that I am looking for what major steps I need to accomplish to get from raw data to the GWPCA results.

I would like to expand on the first part with this edit due to the comments received below.

To address Paul...

I am basing my interest in GWPCA off of the following paper:

Lloyd, C. D., (2010). Analysing population characteristics using geographically weighted principal components analysis: A case study of Northern Ireland in 2001. Computers, Environment and Urban Systems, 34(5), p.389-399.

For those who do not have access to the literature, I have attached screenshots of the particular sections which explain the mathematics below:

And to address whuber...

Without going into detail (confidentiality), we are attempting to reduce the 30 variables, which we believe are all very good indicators (albeit globally), to the set of components with eigenvalues greater than 1. By computing the geographically weighted components, we attempt to understand the local variances explained by these components.

I think our primary goal will be to proof the concept of GWPCA, that is, show the spatially explicit nature of our data and that we cannot consider all independent variables to be explanatory on a global scale. Rather, the local scale (neighbourhoods) that each component will identify will aid us in understanding the multi-dimensional nature of our data (how variables can be combined with one another to explain a certain neighbourhoods in our study area).

We hope to map the percentage of variance accounted for by each component (separately), to understand the extent of the neighbourhood explained by the component in question (aid us in understanding local spatiality of our components). Perhaps some other mapping examples but none come to mind at the moment.

Additionally:

The mathematics behind the GWPCA is beyond what I understand given my background in geographic analysis and social statistics. The application of the maths is most important, that is, what do I plug in to these variables/formulas.


texts: Save IAGSServerConnection connection properties on MXD

texts:
I added some server layer from a server connection to mxd. I want to save connection in MXD to don't missed connection from layer when i reopened my MXD.
I had bellow code to connect a server connection.

 private void ConnectToArcGISServer(string serverUrl)
        {
        var agsconnection = OpenConnection(serverUrl,txtUser.Text,txtPass.Text);
        IAGSEnumServerObjectName obj = agsconnection.ServerObjectNames;

        IAGSServerObjectName name = obj.Next();
        while (name != null)
        {
            if (name.Type == "ImageServer" || name.Type == "MapServer")
            {
                _serviceList.Add(name.Name, name);
                ListViewItem newItem = new ListViewItem(name.Name);
                newItem.ImageKey = name.Type;
                lswServiceList.Items.Add(newItem);

        if name.Type== "MapServer")
                    {
                        IAGSServerObjectName osName = (IAGSServerObjectName)name;
                        IName pName = (IName)osName;
                        IMapServer mapServer = (IMapServer)pName.Open();
                        IMapServerLayer mapserverlayer = new MapServerLayerClass();
                        mapserverlayer.ServerConnect(osName, mapServer.DefaultMapName);
                        ClsGeneral.CurrentMapControl.Map.AddLayer((ILayer)mapserverlayer);
                    }
                    else if name.Type== "ImageServer")
                    {
                        IAGSServerObjectName osName = (IAGSServerObjectName)name;

                        IName pName = (IName)osName;
                        ImageServerLayer imageserverlayer = new ImageServerLayerClass();

                        IDataLayer layer = (IDataLayer)imageserverlayer;
                        layer.DataSourceName = pName;

                        ClsGeneral.CurrentMapControl.Map.AddLayer(imageserverlayer);
                    }
            }
        }

    }
private static IAGSServerConnection OpenConnection(string svcUrl,string user,string pass)
        {
            //create a property set to hold connection properties
            var connectionProps = new PropertySet() as IPropertySet;
            //specify the URL for the server
            connectionProps.SetProperty("URL", svcUrl);
            if (user!="" && pass!="")
            {
                connectionProps.SetProperty("USER", user);
                connectionProps.SetProperty("PASSWORD", pass);
            }
            //create a new ArcGIS Server connection factory
            var connectionFactory = (IAGSServerConnectionFactory2)new AGSServerConnectionFactory();

            IAGSServerConnection gisServer = connectionFactory.Open(connectionProps, 0);

            System.Runtime.InteropServices.Marshal.FinalReleaseComObject(connectionFactory);
            return gisServer;
        }


texts: Radiometric calibration NDVI values in Excel

texts: I´m doing NDVI analysis, but i forgot to do Radiometric calibrations in QGIS. So the NDVI values in my excel table are in DNs. Can I do this calibration directly in excel?


texts: Using ST_Segmentize to PostgreSQL table of segments?

texts:
I have a PostgreSQL table with straight lines (segments) that I need to subdivide in further segments so that none of them is more than 50 metres long. I am new using PostGIS (and SQL) and I'm struggling quite a bit to understand 'ST_xxxx' commands in general. The examples I see in the documentation are way too simple. Like the following one:

SELECT ST_AsText(ST_Segmentize(
ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 32))'),5)
);

How can I apply ST_Segmentize (and later on ST_AsText) to the geometry of my table of segments? I can obviously obtain all the geometries of the segments with a simple query (SELECT geom from public.segments). But then, how should I insert the result of this query into the code shown above?

Something like this does not work:

SELECT ST_AsText(ST_Segmentize(
ST_GeomFromText(SELECT geom from public.segments),50)
);


texts: Convert xy coordinates to latitude & longitude

texts: Is there an easy way to convert coordinates (TM65) to latitude/longitude using ArcMap (version 10.3.1)?


texts: FGDB Domains - Exporting the full stack to OGC Format

texts: I want to convert a FGDB into an OGC Data format that: keeps domains and subdomains , keeps data types and is portable. Is this possible at all?Some answers below refer to geopackage, but I havent been able to automatically export domain/subdomain codes to the attribute table. I am after making an OGC version of a fully maintained FGDB, where some fields would have a dropdown menu with some codes, other fields would have a character limitation/type limitation, etc.


texts: Converting tags in OpenStreetMap (OSM) files to attribution in shapefiles?

texts:
I've downloaded the street data from OpenStreetMap (OSM). I'm looking for speed limit attribution and OSM seems to be the only source for my jurisdiction (Ontario, Canada). The problem is, the speed is stored as a 'tag' and when I download the .osm file and convert it to .shp using geoconverter, it stores all the tags into a single attribute. For example, the field "other_tags" wil contain: "hgv"=>"no","lanes"=>"3","maxspeed"=>"50","old_ref"=>"48","oneway"=>"yes","surface"=>"asphalt"

I just want maxspeed and maybe lanes

I have next to no programming skills. With that in mind, does anyone know how I can do this?


texts: Edit a feature/graphic's location using Edit toolbar (javascript 3.20 api)

texts:
I've loaded a feature layer into a web map (using javascript api 3.20).
I'm trying to use the following to edit an existing points location (by dragging it to a new location) in a feature layer that I have loaded. I'm trying to use:

$(document).on('click', '#movebtn', GeomEdit);

function GeomEdit() {
    var editpoint = new Edit(map);
    editpoint.activate(Edit.MOVE, <graphic>).
}

This function fires when I click a button WITHIN the infowindow (#movebtn) of the point I clicked.

I am unsure of what I need to put into the graphic parameter to make this work?

What are the requirements?


texts: QGIS Raster Georeferencer adds black padding to corners of adjusted black and white TIFF image

texts: After georeferencing a black and white TIFF image, the QGIS Raster Georeferencer fills the corners with black pixels, creating black elongated triangles along the edges of the new image. I could not find anything in the Georeferencer settings to force these filler pixels to be while. I want to set all white pixels transparent when importing the image into QGIS, so eliminating the black corners is preferred. I tried editing the georeferenced TIFF image but it loses the reference data on saving. I tried the GeoTIFF tools (listgeo.exe and geotifcp.exe) but writing the data back to the TIFF image using geotifcp.exe gives a warning "LZW compression is not available to due to Unisys patent enforcement." It would be ideal if QGIS can be set to force the padding colour to white otherwise I am happy to try any other tools, methods or instructions how to achieve what I want.


texts: Does parcel fabric have topology built in?

texts:
I am a little confused on parcel fabric. Does parcel fabric have a topology built in already? OR are you supposed to create a topology for your parcel fabric?

Just a little background is that I have a parcel fabric that I already created that I have been drawing parcels in from scratch.

Basically I am asking do I have to create a topology (if yes HOW) or will the parcel fabric make sure the parcels have no overlaps/spaces, etc


texts: Getting all field names from feature class of file geoatabase using C#?

texts:
I want to get all fieldnames of feature class and then read data in each field. I have used table.fieldDef, table.fieldinformation but i am unable to get fieldnames if featureclass.

My code which i have tried so far is as follows:

Table table = geodatabase.OpenTable("sw_Manhole");
// Iterate through the results, populating the results vector.
foreach (Row row in table.Search("*", "", RowInstance.Recycle))
    {
        count++;
        city currentCity = new city();
        PointShapeBuffer geometry = row.GetGeometry();
        Esri.FileGDB.Point point = geometry.point;
        currentCity.xCoord = point.x;
        currentCity.yCoord = point.y;
    }

I have also tried row.fieldDef and row.fieldinformation but i am not getting names of field.


texts: IExtension.Startup() not launching when ArcMap starts?

texts:
I have an ArcGIS 10 extension that will not launch .Startup() when ArcMap loads. I can get it to hit when I go to Customize->Extensions and un-check/re-check the extension name.

Is there a setting that I need to configure in order to have this fire when Arc is launched?


texts: Preparing GIP record for PGRouting for QGIS?

texts:
I have the GIP data set (https://www.data.gv.at/katalog/dataset/3fefc838-791d-4dde-975b-a4131a54e7c5) and would like to use it in QGIS with PGRouting.

Does anyone have an idea how I need to prepare the record?


texts:
I have a simple KML file witch I get with ogr2ogr where all placemark are 2D polygon like this one :

<Placemark>
  <Style>
    <LineStyle>
       <color>ff0000ff</color>
    </LineStyle>
    <PolyStyle>
       <fill>0</fill>
    </PolyStyle>
  </Style>
  <ExtendedData>
    <SchemaData schemaUrl="#BATI">
      <SimpleData name="HAUTEUR">5</SimpleData>
    </SchemaData>
  </ExtendedData>
  <Polygon>
    <altitudeMode>relativeToGround</altitudeMode>
    <outerBoundaryIs>
      <LinearRing>
        <altitudeMode>relativeToGround</altitudeMode>
        <coordinates>
          5.210274804171726,45.193994541274471,0 5.210273193448314,45.193992448578285,0 5.210244307501982,45.194002928913058,0 5.210153551080012,45.193930862320109,0 5.209984563035429,45.194038696922476,0 5.210076592373608,45.194110738456011,0 5.210146416870383,45.194072424624984,0 5.210176223631215,45.194092352007594,0 5.210274804171726,45.193994541274471,0
        </coordinates>
      </LinearRing>
    </outerBoundaryIs>
  </Polygon>
</Placemark>

I would like to convert all of them to polygon with extrusion. The value of z coordinates is defined by the value of "HAUTEUR" extended data. Here it's 5 meters:

<Placemark>
  <Style>
    <LineStyle>
      <color>ff0000ff</color>
    </LineStyle>
    <PolyStyle>
      <fill>0</fill>
    </PolyStyle>
  </Style>
  <ExtendedData>
    <SchemaData schemaUrl="#BATI">
      <SimpleData name="HAUTEUR">5</SimpleData>
    </SchemaData>
  </ExtendedData>
  <Polygon>
    <extrude>1</extrude>
    <altitudeMode>relativeToGround</altitudeMode>
    <outerBoundaryIs>
      <LinearRing>
        <altitudeMode>relativeToGround</altitudeMode>
        <coordinates>
           5.210274804171726,45.19399454127447,5 5.210273193448314,45.19399244857829,5 5.210244307501982,45.19400292891305,5 5.210153551080012,45.19393086232011,5 5.209984563035429,45.19403869692248,55.210076592373608,45.194110738456,5 5.210146416870383,45.19407242462499,5 5.210176223631215,45.19409235200759,5 5.210274804171726,45.19399454127447,5
         </coordinates>
       </LinearRing>
     </outerBoundaryIs>
   </Polygon>
</Placemark>

I thought that a XSL Stylesheet is the best and the easiest way to process the conversion but I can't figure how to start.
Has someone ever managed it?


texts: Exporting layer to PostgreSQL / Inserts per Transaction

texts:
I am exporting layers to a PostgreSQL 11 database with PostGIS extension. The export itself is taking a while for big datasets (let's say 50.000 points).
As I see in the pgadmin dashboard there are only tuples with a size of 200 features pushed to the database per transaction:

How can I increase the transaction size in QGIS in a way which enables me to send let's say 1000 or even more inserts per transaction?
I have another Python based input script which pushes about 1800 features per transaction.


texts: ArcGIS Runtime: Loading multiple shapefiles into a single ShapefileFeatureTable

texts: If the shapefile is too big (above 2GB) and I have split it into 2 shapefiles, how do I load that 2 files into ArcGIS Runtime via ShapefileFeatureTable, or something equivalent?


texts: Intersect (analysis) of polygons generating empty output

texts:
I have previously asked a question on determining the area of polygons with another polygon boundary.

Determining the area of each polygon within a polygon boundary?

I came to the conculsion that using an intersect function was the most feasible option in determing the area of polygons within the 1000m boundary.
Whenever I run an intersect with all the polygon shapefiles (there is about 40) within the Polygon boundary it generates an empty output.

I have set the coordinate system for each shapefile and the data frame to the same one.
I'm using ArcGIS 10.1 with an ArcInfo license.

What would be the cause of this empty output generated?

WARNING 000117: warning empty output generated.


texts: QGIS using the heatmapplugin from the console

texts:
I have to make a lot of heatmaps from csv's. Therefore I'm making a python script to run in the console.

So far I can load csv's and save them as shapefiles. To get to the heatmapplugin I'm using the following code:

rasterMenu = qgis.utils.iface.rasterMenu()
for rasterMenuItem in rasterMenu.actions():
    if 'Heatmap' in rasterMenuItem.text():
    heatmapMenu = rasterMenuItem

    for heatmapMenuItem in heatmapMenu.menu().actions():
        print heatmapMenuItem
        if 'Heatmap' in heatmapMenuItem.text():
            heatmapMenuItem.trigger()

Now I'm stuck. Does somebody know how to select the heatmap menu and enter the correct variables from the console?