texts: How can I use MOBAC atlases in GIS Software (e.g., QGis, uDig)

texts:
How can I use the output from MOBAC (Mobile Atlas Creator) as background layer in open source desktop GIS software (e.g., QGis or uDig, TileMill etc.)?

My goal:
To put my question into context: I want to use my downloaded map tiles as background raster map. On top of this, I want to add GPX tracks to create a map with mountain bike routes.

My tiles:
I have a set of tiles downloaded using MOBAC. The tiles are in PNG format, each having a size of 256x256px. The projection is GlobalMercator (as in Google Maps). The naming scheme is $(z)_$(x)_$(y).png. I only have z (zoom level) 14. I can access the tiles through a local web server using a URL such as http://localhost/~username/MyMaps/14_8622_5722.png

The problem:
I can't find a way to feed output from MOBAC into GIS software.

Previous efforts:

I have successfully created an OpenLayers web map as follows:

var name = 'Test Layer';
var url = "/~username/MyMaps/${z}_${x}_${y}.png";
var options = {
  type: 'png',
  sphericalMercator: true,
  isBaseLayer: false,
  minZoomLevel: 14
};
var layer = new OpenLayers.Layer.XYZ(name, url, options);

I have tried to directly add the image tiles as a layer in QGis. But the tiles are not georeferenced.
I have exported the tiles to MbTiles format using Mobac. But - surprising to me - not even TileMill seems to be able to load the .mbtiles file as background layer.
I have served the .mbtiles file using TileStream but could not access the TileStream server using QGis or uDig.
I have tried adding the tiles as GeoServer store using the Image Mosaic plugin, but I could not get it to work.

...Can you provide hints and help as to which route to take? I.e., which MOBAC export format should I use so to be able to import the map data into GIS software?


texts: Can two versions of GRASS be installed in a computer and still run independently?

texts: GRASS 6.4.0 is currently installed in my computer. The script that I am trying to run is present in 6.4.1. It is stated in my previous post. If I installed 6.4.1, will my 6.4.0 still run? I don't want to risk uninstalling 6.4.0 since my project is currently linked to it.


texts:
I want to do Query : SELECT ST_AsText(ST_MakePoint(-7.83753572095, 110.354612964)) ;

my python code =

import psycopg2

conn = psycopg2.connect(dbname = 'gis02', host= '127.0.0.1', user = 'gis2user',password= '123456')
cur = conn.cursor()

pointA={}
pointA['lat']=-7.83753572095
pointA['lon']=110.354612964

myquery = 'SELECT ST_AsText(ST_MakePoint(%s, %s)) ;'
pointA['geom']= cur.execute(myquery %(pointA['lat'], pointA['lon'])).fetchone()

The result is :

AttributeError: 'NoneType' object has no attribute 'fetchone'

when I do it directly in psql console I got :

POINT(-7.83753572095 110.354612964)

How to call Postgis's functions using psycopg2 ?


texts: Convert from 16 bit unsigned GeoTIFF to 8 bit for Mapbox with QGIS

texts:
I get the following error when uploading my GeoTIFF to Mapbox:

  Only 8 bit TIFFs are supported

My GeoTIFFs are 16 bit unsigned.

I need to convert them to 8 bit.

I've been georeferencing images in ArcMap and exporting them, then they somehow become 16 bit unsigned.

I'd prefer a solution in QGIS, but if ArcMap has an easier solution, that's okay.

So you can help me make sure it works, here's a temporary link to my GeoTIFF:

https://drive.google.com/uc?export=download&id=1k5GGqrYofShdXjI2LzFWH3BeFpNsuOQy


texts: Changing coordinates of points in the Attribute Table in QGIS

texts:
I have a shapefile. Within the shapefile, there are approximately 500 points.

I want to change the coordinates of these points in the Attribute Table. But there is no coordinate column in Attribute Table.

Is there an easy way to change the coordinates?


texts:
I was looking for a version 10 update of the ArcSketch (free) add-on/extension.

  ArcSketch allows you to sketch
  features quickly, easily, and
  intuitively without having to plan
  ahead or deal with much ArcGIS
  overhead. Afterward, the sketched
  features can be converted into
  standard features and shared with
  others.

  ArcSketch allows you to create and
  edit sketches without having to
  specify the layer each time. You can
  generate symbols that specify the
  creation of feature classes and
  attributes with defined structure.

Looking at the download options, it only lists 9.1-9.3 versions.  According to the faq's, appears that the functionality has been rolled into "future versions".  Is it hiding somewhere is 10?

  ArcSketch is no longer a supported
  product. Its functionality is being
  incorporated into a future release of
  the core ArcGIS Software.

If this does not exist in v10, does anyone know of alternatives (either ESRI or other software) that allows users to be able to quickly digitize and symbolize data without having to be an expert in the GIS software.  I hope to allow managers or operators to create GIS data quickly in a emergency response scenario, without being a GIS person.


texts: Does anyone know how the 'Blocking' label style in QGIS 2.16 works? I've got a polygon boundary layer and would like to keep any labels from overlapping the outline. I've turned blocking on for the polygon, but none of the labels seem to change.


texts:
I'm trying to add Corine land cover data to a shiny leaflet map. However, I'm struggling to decipher the WMS XML data so that I can include the appropriate server URL and layer. The WMS information can be found here and here.
I've included and MRE below of what I thought the correct details should be to display Corine 2018 landcover data but I just get a grey leaflet map.
If unable to provide a straight up solution to this question, can someone help me to interpret the XML data so that I can do this in future for other WMS providers?
library(shiny)
library(leaflet)

ui <- fluidPage(

    # Application title
    titlePanel("Map"),

    sidebarLayout(
        sidebarPanel(),

        mainPanel(
            leafletOutput("map")
        )
    )
)

server <- function(input, output) {

    output$map<-renderLeaflet({
       leaflet() %>%
            addWMSTiles( "https://image.discomap.eea.europa.eu/arcgis/services/Corine/CLC2018_WM/MapServer/WmsServer", layers = "1",
                         options = WMSTileOptions(format = "image/png", transparent = T)) %>%
            setView(lng = -1.8, lat = 52.0, zoom = 5)

    })

}

# Run the application
shinyApp(ui = ui, server = server)


texts:
I have been working with geopackages at a company where we have all our data sync in a drive. The thing is that when I save a project, QGIS creates an extra geopackage with the same name as the original + compute name.
Why does this happens?
How can I be sure that all the changes are in the original geopackage?


texts: How do I convert a Geometry column to length in SQL server 2012, and then to SUM the total?

texts:
I'm not very proficient with SQL, and this is the best I can come up with so far. I need to find a way to measure the length for each row by converting the geometry column. I then need to Calculate the Sum of this column to miles.

I only have access to SQL Server 2012.

DECLARE @g geometry;
SET @g = geometry::STLineFromText('LINESTRING(0 0, 2 2, 1 0)', 4326);
SELECT SUM((@g.STLength())) AS Total_Length
FROM [TABLE NAME];


texts: Finding statistics on software development within GIS industry?

texts:
I am trying to find some information, specifically poll results on platforms and languages used for GIS software solutions. I remember taking one but I cannot find the poll to see the results, it may have even been an Esri poll for all I know.

Can anybody point me to any of those results who may know where they had been squirreled away to?


texts:
I am looking for more information on how to display ArcGIS Online/Portal Web Maps inside my existing application that uses OpenLayers to display maps.

Im looking for something simple as the following sample that was created using the ArcGIS JavaScript API => https://developers.arcgis.com/javascript/latest/sample-code/webmap-basic/

But since my application was already created using OpenLayers, I will need to have it to load the ArcGIS Online webmaps.


texts: GRASS Gis v 6.4.4. KeyError: 'version' when start

texts:
When I try to start the GRASS it gives me the following error

GRASS 6.4.4 (Hellas):~ > ERROR: MAPSET Hellas - permission denied
Traceback (most recent call last):
File "/opt/grass64/etc/wxpython/wxgui.py", line 140, in <module>
  sys.exit(main())
File "/opt/grass64/etc/wxpython/wxgui.py", line 133, in main
  app = GMApp(workspaceFile)
File "/opt/grass64/etc/wxpython/wxgui.py", line 45, in __init__
  wx.App.__init__(self, False)
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8628, in __init__
 self._BootstrapApp()
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
 return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/opt/grass64/etc/wxpython/wxgui.py", line 79, in OnInit
 workspace = self.workspaceFile)
File "/opt/grass64/etc/wxpython/lmgr/frame.py", line 83, in __init__
 self.baseTitle = _("GRASS GIS %s Layer Manager") % grass.version()['version']
KeyError: 'version'

My operating system is Manjaro linux.

What cause this problem and how can this fixed?


texts: Find closest lat long to an input lat long (SQL Server 2008)

texts:
I have a point cloud in my database (SQL Server 2008 spatial). That is about 6 million records. There are 3 columns: id, value, geom. What is the optimal way of getting the 'value' at input lat long??

I am new to spatial queries in SQL Server 2008. Can someone post a simple example of finding the point in geom column, matching or closest from the input lat long?


texts: How to set the same size between GeoServer and Leaflet?

texts:
The right Map is a layer from GeoServer (I set the CRS as 4326) in the left is the result of the Leaflet code (here a linked the GeoServer layer to publish in the leaflet map), as you can see in the map, on the red dot, the size is not the same. How can I resize both?

The Leaflet code is:

<!DOCTYPE HTML>

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

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


texts: Comparing geometry of two features to get changes using ArcObjects and c#?

texts:
I would like to compare the geometry between two feature, Already I selected the two feature. How do I start the comparison?

depend on the image below I need to write code to compare this two features and get the difference (blue colour is different) and save the difference in a new feature class,

ITopologicalOperator2 pTopOpOld = oldFeature.ShapeCopy as ITopologicalOperator2;
ITopologicalOperator2 pTopOpNew = newFeature.ShapeCopy as ITopologicalOperator2;

IGeometry differenceGeometry = pTopOpOld.Difference(newFeature.Shape);

pTopOpOld = differenceGeometry as ITopologicalOperator2;
pTopOpOld.IsKnownSimple_2 = false;
pTopOpOld.Simplify();
newFeature.Shape = pTopOpOld as IGeometry;
newFeature.Store();


texts: QGIS 3: Categorised symbology with value driven alpha transparency

texts:
I'm looking for a bit of guidance on how to use categorised symbology with QGIS, and data driven alpha. Ie, I want to be able to specify a colour ramp on one columns values, and the transparency of the polygon based on another columns values.
I've found this post which somewhat describes how it might be possible by using the following code snippet, and assumes there is a column named "transparency" whose value is between 0 and 1.
set_color_part(@value, 'alpha', ( 1 - "transparency" ) * 255 )

Now, the question I have, is I have a column called MyClassification by which I want to categorize. There's perhaps 300 unique values, so I don't wish to do this by hand. Rather, I'd like to set a color ramp, indicate that column, hit classify, and have QGIS put in the colours. What I can't seem to work out is how I can use that expression in the expression builder to use transparency from the transparency column, and still use MyClassification with a classified colour ramp.
Any ideas?


texts: Transforming Visio polygon to shapefile?

texts:
I am a complete newb at this stuff and don't know what I don't know. I may use incorrect language.

Essentially, I want to convert the shapes in a Microsoft Visio diagram into a shapefile. I pretty much want the diagram to BECOME a shapefile.

I have a csv file which describes 10-15 arbitrary polygons from that Visio diagram:

ShapeNo ShapeName PointNo   X    Y
1       My Square   2       37  155
1       My Square   4       116 155
1       My Square   6       116 234
1       My Square   8       37  234
1       My Square   10      37  155

Polygons are going to be squares, rectangles, with the occasional circle/oval. I'll generate the file above with a script which exports each point of each shape in the diagram. Part and parcel of the X/Y info is the relation of each shape to the others.

I'm hoping QGIS can take this information and essentially create a shapefile for me based on some arbitrary lat/lon "center".

Can this be done? If so, a push in the right direction (articles, keywords, walk-throughs) would be really appreciated.


texts: Speed up reprojecting large raster (38 GB) in QGIS

texts:
I'm fairly new to QGIS and Python but nevertheless want to reproject a 38GB-DEM to a custom CRS. (The output file is supposed to be 55GB large - don't know why, but if I don't have >55GB of free disk space it won't start.)
If I use the GUI of QGIS 3.4 , I can only check the progress by right-clicking the new file and checking the size every now and then. Problem is, it slowly increases by 500MB to 1GB but then completely stops for 10-20 Minutes before increasing again. Any idea why that could be?

I've tried the Python way using the gdal code from the GUI:

gdalwarp -t_srs "+proj=aea +lat_1=25 +lat_2=50 +lat_0=37 +lon_0=87 +x_0=0 +y_0=0
+datum=WGS84 +units=m +no_defs"
-r bilinear -of GTiff E:/Data/03_DEM/ALOS/HMA_alos-jaxa.tif
E:/Data/03_DEM/ALOS/HMA_alos-jaxa_reproj.tif

That didn't even start:

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 63, in runsource
    code = self.compile(source, filename, symbol)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\codeop.py", line 168, in __call__
    return _maybe_compile(self.compiler, source, filename, symbol)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\codeop.py", line 99, in _maybe_compile
    raise err1
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\codeop.py", line 87, in _maybe_compile
    code1 = compiler(source + "\n", filename, symbol)
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\codeop.py", line 133, in __call__
    codeob = compile(source, filename, symbol, self.flags, 1)
  File "<input>", line 1
    gdalwarp -t_srs "+proj=aea +lat_1=25 +lat_2=50 +lat_0=37 +lon_0=87 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -r bilinear -of GTiff E:/Data/03_DEM/ALOS/HMA_alos-jaxa.tif E:/Data/03_DEM/ALOS/HMA_alos-jaxa_reproj.tif
                                                                                ^
SyntaxError: invalid syntax

I've read that gdalwarp does not use all CPU-cores, so maybe I could implement something like the code below, but first I would have to get gdalwarp started from the console...

gdalwarp -t_srs "+proj=aea +lat_1=25 +lat_2=50 +lat_0=37 +lon_0=87 +x_0=0 +y_0=0
+datum=WGS84 +units=m +no_defs"
-r bilinear -of GTiff E:/Data/03_DEM/ALOS/HMA_alos-jaxa.tif
E:/Data/03_DEM/ALOS/HMA_alos-jaxa_reproj.tif
-multi -co NUM_THREADS=ALL_CPUS -wo NUM_THREADS=ALL_CPUS
-oo NUM_THREADS=ALL_CPUS -doo NUM_THREADS=ALL_CPUS

What are these errors? Is there another way to speed up the process? I have to do this a few times and it would be very unfortunate if it always took several days to finish...


texts:
I've been building legends for my javascript websites that use 9.3.1 services.  I know there's the ESRI legend tool for older services but I don't feel that it does a good job of producing legend images for raster layers, especially continuous raster layers.  It also drops things like the symbol headings.  Ideally I'd like to be able to automatically mimick the look of the ArcMap TOC.

I've been trying to build some ArcObjects code to create a Legend to attach to the Page Layout and then export that to an image, but I can't seem to be able to find the code necessary to export the image after I build the legend.

the following code is the basic crux of what I've tried so far:

    void OpenMXDViaMapDocument(string path)
    {

        IMapDocument pMapDocument = new MapDocumentClass();

        if (pMapDocument.get_IsMapDocument(path))
        {
            pMapDocument.Open(path, null);
            IMap pMap;

            IPageLayout layout = pMapDocument.PageLayout;

            for (int i = 0; i <= pMapDocument.MapCount - 1; i++)
            {
                pMap = pMapDocument.get_Map(i);
                UID pId = new UID();
                pId.Value ="esriCarto.Legend";
                IMapSurround surround = pMap.CreateMapSurround(pId, null);
                ILegend iLegend = (ILegend)surround;
                int p = iLegend.ItemCount;

                iLegend.AutoVisibility = false;

                System.Drawing.Bitmap myBitmap = new Bitmap(500,500);
                IntPtr ptr = myBitmap.GetHbitmap();

                ESRI.ArcGIS.Display.SimpleDisplayClass sdc = new ESRI.ArcGIS.Display.SimpleDisplayClass();

                for (int y = 0; y < p; y++)
                {
                    ILegendItem iLegendItem = iLegend.get_Item(y);
                    LegendFormat legendFormat = new LegendFormat();
                    legendFormat.ShowTitle = true;

                    iLegendItem.CreateGraphics(sdc,legendFormat);
                    IEnumElement enumEles = iLegendItem.Graphics;
                    enumEles.Reset();
                    IGraphicElement ige = (IGraphicElement)enumEles.Next();
                    while (ige != null)
                    {
                        FileStreamClass fs_class = new FileStreamClass();
                        richTextBox1.Text = richTextBox1.Text + "#"+y+" - Graphic Element Type " + identifyGraphicElementType(ige) +"\n";
                        if (identifyGraphicElementType(ige).Equals("BmpPictureElement"))
                        {
            //All of them are apparently BmpPictureElements
                            BmpPictureElement bmpE;
                            //Java version has bmpE.save(IStream) ?
                            fs_class.SaveToFile("C:\\utils\\newImages\\{0}_{1}.bmp");
                        }
                        ige = (IGraphicElement)enumEles.Next();
                    }
                }

            }

        }
    }

I would also like to generate an image for each map layer showing the title, symbol heading if any and the symbol.  How can I do this?


texts: Interpolating vertically in ArcGIS 3D Analyst?

texts:
I am working on mapping pollutant concentrations in a pond from point-sampled data. There are 50 sampling locations in the pond (randomly dispersed), and at each location there are three sampling events (=150 total); one at the surface, one in the middle, one at the bottom.

I have created a TIN extent based on depth of pond, and now I would like to "fill" the pond by interpolating volumes of pollutant concentrations from the 150 sample points.

I am trying to do this by applying a spline interpolation through the three sampling events at each of the 50 locations, in order to produce 50 interpolated lines. From there i could apply kriging for each pixel down through the pond profile (although this way does ignore important spatial correlation).

I am stuck at the spline interpolation of the lines.

Is there a way to interpolate between points when the X,Y coordinates are all the same, but the Z coordinate changes?

In other words, how does one do vertical interpolation in 3D analyst?


texts: Does Leaflet has option for scale dependent layers?

texts: Is it possible to show layers with Leaflet depending on scaling? For example not show counties until zoom level reaches 10.


texts:
I am a not so newbie user of QGIS but have no knowledge of Python.

I have a large dataset of points. Each point has attributes, one of which is a group it belongs to. It is expected that the points in each group form a compact form. But from initial analysis I've found that some groups have points very far away from the main "point cloud".

I'm trying to find a way to flag these outlier points to later delete or disconsider them from my analysis. I do have a theoretical approach but don't know if there is some plugin or script that i could use.

My reasoning goes like this. If for each group I calculate the sum of distances of each point to every other point in the group the outliers will have a much greater sum than an average point in the "point cloud". I can then use some measure of standard deviation to set my threshold level to flag points as outliers.

Question is. How do I make this sum? Considering I have a dataset of millions of points and thousands of groups?


texts: getting data into geoserver from two columns to form a point

texts:
I have a problem on how I am able to retrieve a geometry data from postgres using geoserver. I am new to this. The latitude and longitude are on separate columns. So I'm trying to figure this out by concatenating this two columns at the same time converting their format with this SQL view like this.

SELECT *, ST_AsEWKB(ST_GeomFromText('POINT ('||latitude||' '||longitude||')',4326)) as geom FROM mytable

where latitude and longitude are columns in my database.

Now my the problem is that I can't see the points. Is there another way to make this solve?


texts: What is the python command line syntax of "Generate Wizard" in ET GeoWizards in ArcGIS?

texts:
I have the text file formatted as follows

ID,Z
1,4.000
366472.538,6353290.852
366477.538,6353289.003
END
ID,Z
2,4.000
366892.538,6353534.939
366894.951,6353537.289
366897.538,6353540.591
366898.814,6353542.289
END

The text file is used to create contour polylines by using "ET GeoWizards->Generate(Import/Export)". Because there are heaps of text files and it will involve a lot of repetitive manual work. I am trying to use the Arcpy to automate the process. However, there is no command line syntax for "Generate(Import/Export)" in arcpy.ET toolbox. I also searched http://www.ian-ko.com/ET_GeoWizards/UserGuide/et_geowizards_userguide.htm.

I prefer to use an existing command line syntax to automate the work.


texts: Exporting X,Y coordinates relative to reference point with QGIS

texts:
I have a number of points (grey points in attached picture) around a reference point (red point in picture).
I need to export X,Y data corresponding to the horizontal and vertical distance in meters of these points from the reference point. I.e. X,Y coordinates relative to the reference point.
Is there a way of doing this directly through QGIS 3.16?


texts: Arcpy Network analyst - Perform OD Matrix Cost in loop

texts:
I want to perform OD Matrix Cost in loop for each locations group inside a feature class.

As output, I want a lines feature class per group.

import arcpy

arcpy.env.overwriteOutput = True

def execute():
    network_dataset = arcpy.GetParameter(0)
    impedenace_attribute = arcpy.GetParameter(1)
    locations_fc = arcpy.GetParameter(2)
    sort_field = arcpy.GetParameter(3)
    group_by_field = arcpy.GetParameter(4)
    output_workspace = arcpy.GetParameter(5)
    arcpy.env.workspace = output_workspace
    calculate_OD(network_dataset, impedenace_attribute, locations_fc, group_by_field, sort_field, output_workspace)

def calculate_OD(network_dataset, impedenace_attribute, locations_fc, group_by_field, sort_field, output_workspace):
    group_by_list = sorted(set((row[0] for row in arcpy.da.SearchCursor(locations_fc, group_by_field))))

    OD_Layer = arcpy.MakeODCostMatrixLayer_na(network_dataset, "OD_Matrix_Layer", impedenace_attribute)
    OD_Layer = OD_Layer.getOutput(0)

    for group in group_by_list:
        expression = u"{} = '{}'".format(group_by_field, group)
        group_layer = arcpy.MakeFeatureLayer_management(locations_fc, "locations_{}".format(group), where_clause=expression)
        group_fc = arcpy.CopyFeatures_management(group_layer, "OD_locations_{}".format(group))

        subLayerNames = arcpy.na.GetNAClassNames(OD_Layer)

        originsLayerName = subLayerNames["Origins"]
        arcpy.na.AddLocations(OD_Layer, originsLayerName, group_fc, sort_field=sort_field, append="CLEAR")

        destinationLayerName = subLayerNames["Destinations"]
        arcpy.na.AddLocations(OD_Layer, destinationLayerName, group_fc, sort_field=sort_field, append="CLEAR")

        arcpy.na.Solve(OD_Layer,"HALT")

        #save output in feature class (this generate the error below)
        arcpy.CopyFeatures_management(OD_Layer, "OD_output_{}".format(group))

execute()

However, I have a problem when copying the ODLines sublayer to a new feature class.

  ExecuteError: Failed to execute. Parameters are not valid. ERROR
  000840: The value is not a Feature Layer. ERROR 000840: The value is
  not a Raster Catalog Layer.


texts: Why sDNA error is out of memory? Can it run in 64-bit?

texts: I use sDNA to prepare road network, but as in the pic, the error is out of memory, what can I do with it? And I notice that sDNA is running in 32-bit mode, can it run in 64-bit?


texts: Definition Query on a Dynamic Mapping Service?

texts:
Will a definition query hinder performance of a dynamic mapping service or will it speed up performance?

Using ArcDesktop 10.3.1 and ArcServer 10.3.1


texts:
In the below function the GlobalMap.unByKey(popupKey); call makes error with most recent OL (no more unByKey on ol.Map objects).
I wonder how I could change this line.
Should I also change the way the listener is added ?

    var popupKey = '';
    var managePopup = function(value){
        if(value === 'off'){
            overlay.hide();
            GlobalMap.removeOverlay(overlay);
            GlobalMap.unByKey(popupKey);
        }else if(value === 'on'){
            interact.manageActiveInteraction();
            GlobalMap.addOverlay(overlay);
            popupKey = GlobalMap.on('singleclick', function(evt){initiatePopup(evt);});
        }
    };


texts: ProjNet. Coordinate reference system transformation deviation

texts:
I have a project with C# that contains a CEFSharp viewer showing a webpage with a map that I've created.I'm trying to add a marker in the map sending the parameters from C# to a function in the webpage javascript.

The problem appears when I try to transform the coordinates of the marker with the ProjNet library in C#. I have followed this post to make the transformation and the code works, but for the Y coordinate, I get a deviation always.

The original coordinates are in EPSG:25831 CRS.

x = 589721.77, y = 44221978.1

And I want them in EPSG:3857, according to epsg.io the coordinates in EPSG:3857 should be:

x = 450868.62, y = 4857687.93

and that is correct for me, but when I do it through the ProjNet library I get an incorrect Y coordinate, the coordinates I get are:

x = 450868.61766004807, y = 4830249.5985677531

so the transformation for the X is correct but for the Y is not. I've tried different coordinates and always the same deviation. the code I use is the same from the post I've mentioned, is as it follows:

        double[] xy = { this.x, this.y };

        var cf = new CoordinateSystemFactory();
        var f = new CoordinateTransformationFactory();
        string wkt25831 = "PROJCS[\"ETRS89 / UTM zone 31N\", GEOGCS[\"ETRS89\", DATUM[\"D_ETRS_1989\", SPHEROID[\"GRS_1980\", 6378137, 298.257222101]], PRIMEM[\"Greenwich\", 0], UNIT[\"Degree\", 0.017453292519943295]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]";
        string wkt3857 = "PROJCS[\"WGS 84 / World Mercator\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3395\"]]";

        var sys25831 = cf.CreateFromWkt(wkt25831);
        var sys3857 = cf.CreateFromWkt(wkt3857);

        var transformTo3857 = f.CreateFromCoordinateSystems(sys25831, sys3857);

        double[] ret = transformTo3857.MathTransform.Transform(xy);

        this.x = ret[0];
        this.y = ret[1];

Any idea why I'm getting this deviation?
Maybe something with the WKT for the EPSG:3857 is wrong?


texts: How to load an (updating) point layer from Access?

texts:
I have a database table linked to the QGIS project which contains X,Y & Z coordinate information, which I can display in the Map View window of the project, after having used the “Points Layer from table” Geoalgorthim which creates a shp file that I can apply the required  “Style” to and everything looks great. But routinely i.e. on a daily basis I need to add further points to the DB table and for this new information to be displayed without having to go through the process of apply the geoalgorithm and changing the style on a daily basis.

In ArcGIS, I was able to do this using in going down the XY Events process.

This is the acript I tried to use to retireve the data from an MS Access table (table- DPGDATA, database - SESIMIC Geodatabase.mdb

pts = processing.runalg("qgis:pointslayerfromtable", "H:\GEOPHYSICAL PROJECTS\SEISMIC Geodatabase.mdb|layername=DPGDATA", "Eastings", "Northings","EPSG:4236", None)
processing.load(pts['OUTPUT'])

FURTHER QUERIES
What is the script is required to give the Output layer a meaningful name.
What script is required to load a predefined qml file to an individual layer.
Lastly, I will need to routinely delete the old Output layer What is the script required to do this?


texts: Changing ArcSDE connections number without SDE command toolkit?

texts: In arcgis 10.2 is there any way to change the config properties and specifically the max connections of the sde without having to install and use the sde commands?


texts:
I have a point (lat/lng) and a collection of geofences (polygons / circles / rectangles)

Simply put, I want to know if the point is inside ANY of the geofences, it's not important which one.

I know how to solve this comparing the point against each geofence, the problem is that I'm drawing a heat map with +750000 points that needs to be checked against 800 geofences.

Needless to say, the brute-force approach of comparing each point against each geofence will not cut it.

I was thinking along the lines of drawing all the geofences in a plane (something like a raster but based on X / Y coordinates) and then see if the point touches a painted area, but looks like a long shot and I'm not math oriented enough to write ray-tracing algorithms.

All of this is beign done in SQL Server 2008 R2, no GIS library, just int (point / circle / rect) and varbinary for the polygons

How can I solve this?


texts: How to cluster KML features in OpenLayers

texts:
Is it possible to cluster KML features in OpenLayers, and are there any samples?

I can find separate samples for clusters and KML but nothing which handles both together.


texts: Iterate many raster and many shapefiles in python using the zonal statisitics as table tool

texts:
I am pretty new to coding.

I have to execute zonal statistics on many shapefiles (~20) for many rasters (~300). Essentially, the first shapefile is used to process all zonal statistics for all rasters and merge it to one table. This is then repeated for the second shapefile  and so on. The code also creates two new fields (year and date) and populates them from the raster name. The rasters are .tif file formats.

I keep running into error 000865: Parameters are not valid. Input value raster does not exist. Failed to execute (ZonalStatisticsAsTable).

My code so far looks like:

# Import system modules
import arcpy, sys, os, string, glob
print "imported modules"

# Check out licenses
arcpy.CheckOutExtension("spatial")
# Overwrite
arcpy.env.overwriteOutput = True

def zonal_SWE(rasters, shapes):
    arcpy.env.workspace = rasters
    rasterlist = arcpy.ListRasters()
    arcpy.env.workspace = shapes
    shplist = arcpy.ListFeatureClasses()
    for raster in rasterlist:
        for i in shplist:
            out_tbl = tbl + "\\" + raster + "_ZStats"
            print 'Zonal Statistics based on SWE : ' + raster[9:13]
            # Preform zonal statistics on the polygon file within the variable 'znlyr'
            z = arcpy.gp.ZonalStatisticsAsTable_sa(i, InZnValFld, raster, out_tbl, "DATA", "MIN_MAX_MEAN")
            # Create a new field to add the filename information
            arcpy.AddField_management(z, fieldname1, "DOUBLE")
            # Create a new field to add the filename information
            arcpy.AddField_management(z, fieldname2, "DOUBLE")
            # Add the Year value from the filename to the new field
            arcpy.CalculateField_management(z, fieldname1,raster[9:13])
            # Add the Month value from the filename to the new field
            arcpy.CalculateField_management(z, fieldname2,raster[13:15])
            arcpy.Append_management(z, Template, "","","")

#----------------variables--------------
znshp = r"C:\Users\Documents\Projects\shapefile_folder"
grd = r"C:\Users\Documents\Projects\raster_folder"
tbl = r"C:\Users\Documents\Projects\Table_folder"
InZnValFld = "OBJECTID"
fieldname1= "Year"
fieldname2= "Month"
Template = r"C:\Users\Documents\Projects\Tables\Template.dbf"

#---------------------------------------
print "starting zonal SWE"
zonal_SWE(grd, znshp)
print "done"


texts: How to add attributes in proportion to intersecting area from another layer

texts:
I am new to using QGIS. I have two polygon layers:

Voronoi of Access Points
Census block maps with population

I want to get number of people covered by each Access Point (Assuming uniform distribution of people within the blocks).
I have tried two different approaches, both failing to get me the correct answer.

Use join by location...sum of people covered by APs is 3x of people
in the area.
Multiple step approach

Calculate area of each block
Intersect block layer with voronoi, to clip blocks on AP boundary
Recalculate the area of clipped block layer
Calculated proportional population based on new clipped area and original area
Use join by location....sum of people covered by APs is 2x of people in the area.

In Join by location, I am using summary option for sum of all intersecting features.

In Mapinfo I am able to use proportional sum to get the number of people under each AP's coverage. I'll really appreciate if someone can point me in the right direction.

Thanks,
Manish


texts:
Is there a free simple way to serve / host the .html files the awesome Qgis2threejs plug-in produces?

I have tried using Google Drive as shown here and here without success. Also had same results using One Drive.
I tried putting the 2 folders (dat-gui and threejs) and the html file in Google Drive (and One Drive) but can't seem to make it recognize the html... it just opens them in a text editor format like so.

Would like to be able to view them anywhere with web access like this one.

Would a weebly or other free web site / blog be able to do this?
QGIS Server?


texts:
Is it possible to use the print function of leaflet with cartojs v.4?

i'm not able to use all this plugins
https://leafletjs.com/plugins.html#printexport

The print button works but can i use also all other plugins of leaflet?

for example i'm tryng to use ruler plugin (https://github.com/gokertanrisever/leaflet-ruler) but i've
Uncaught TypeError:
L.control.ruler is not a function


texts: Creating multi-row toolbar in ArcGIS Engine?

texts:
I am using ArcGIS Engine 10.1 and Visual Studio 2010

I created a MapControl App,
(New Project>Visual C#> ArcGIS>Extending ArcObjects > MapControl Application)

and added a toolbar
(In MainForm and right-click on ToolbarControl > Properties  > Open Items Tab > Add > Add some commands to toolbar).

The Problem is items won't fit in a single toolbar and I can't manage to create a multi-row toolbar. In addition Items wont scroll at run time.

So is there any solution to make an ArcGIS Engine multi-row toolbar?


texts:
I am trying to get zonal statistics for a set of geographical units for several years and I would like to get the output in one dbf table, where the rows mark the geographical units and each column is the mean for a different year. The input for each year is in a different raster.

When I am running the code below, I get "NameError: name 'raster' is not defined". I don't understand why raster is not defined?

import arcpy, os

destination_path=r'\\Mac\Home\Desktop\arc_stuff'
shapefile=r'\\Mac\Home\Desktop\arc_stuff\tribe_country_split_merge_join.shp'

arcpy.env.workspace=r'\\Mac\Home\Desktop\arc_stuff'

rasters = arcpy.ListRasters("lights_*.tif")

final_dbf = os.path.join(destination_path, raster + "database.dbf")
firstDone = False;

for raster in rasters:
  destination_raster = os.path.join(destination_path, raster + ".dbf")
  print destination_raster
  print raster
  arcpy.gp.ZonalStatisticsAsTable_sa(shapefile, "FID", raster,destination_raster,"DATA","MEAN")

  if not firstDone:
    firstDone = True;
    arcpy.gp.ZonalStatisticsAsTable_sa(shapefile, "FID", raster,final_dbf,"DATA","MEAN")

  else:
  arcpy.JoinField_management(final_dbf, "FID", destination_raster, "FID", ["MEAN"])

Error message in full:
Runtime error
Traceback (most recent call last):
  File "", line 8, in
NameError: name 'raster' is not defined


texts: Opening SNODAS Data (other than precipitation products) in ArcMap

texts:
I've downloaded SNODAS data from NSIDC (here). After uncompromising the files I can only open the first two products (both precipitation data) in ArcMap. I can open the others with SAGA, but I want to process ~3500 of them using an ArcPy script.

Has anyone else encountered this issue with SNODAS data?


texts: Where can I find the repository for XYTools plugin? I have tried several repositories and got messages that it was permanently removed!


texts: Draping floating layers on elevation surface in ArcGlobe not working

texts:
I've been trying to drape floating layers in a globe document onto a new elevation surface programmatically, but haven't had much luck. The big picture is as follows:

1) Assign globe document to my application's GlobeControl

2) Add an elevation layer to the globe

3) Loop through all floating layers, and re-drape on that elevation surface.

I found several ESRI developer articles on the various pieces, but haven't had success putting them together. Here's the code:

ADD ELEVATION LAYER TO GLOBE (works OK):

 IGlobe theGlobe = axGlobeControl1.Globe;
 IRasterLayer mergedElevLyr = new RasterLayerClass();
 mergedElevLyr.CreateFromFilePath("C:\\temp\\Alpacas\\DTED\\MergedElev_111711.img");
 mergedElevLyr.Visible = false;
 theGlobe.AddLayerType((ILayer)mergedElevLyr, esriGlobeLayerType.esriGlobeLayerTypeElevation, false);

RE-DRAPE FLOATING LAYERS (doesn't seem to work):

 IGlobeDisplay theGlobeDisp = theGlobe.GlobeDisplay;
 IGlobeDisplayLayers theGlobeDispLyrs = (IGlobeDisplayLayers)theGlobeDisp;

IGlobeLayerProperties globeLayerPropertiesCls = new GlobeLayerPropertiesClass();
 globeLayerPropertiesCls.Type = esriGlobeDataType.esriGlobeDataElevation;

ILayerExtensions layerExtension = (ILayerExtensions)mergedElevLyr;
 layerExtension.AddExtension(globeLayerPropertiesCls);

IGlobeLayerProperties pGlobeLyrProps = null;
 IGlobeHeightProperties pGlobeHtProps = null;

// Find and loop through floating layers (works OK)
 IEnumLayer floatingLayers = theGlobe.get_GlobeLayers(null, false, false, true);
 ILayer theFloatingLayer = floatingLayers.Next();
 while (theFloatingLayer != null)
 {
 pGlobeLyrProps = theGlobeDispLyrs.FindGlobeProperties(theFloatingLayer);
 pGlobeHtProps = pGlobeLyrProps.HeightProperties;

pGlobeHtProps.BaseLayer = mergedElevLyr;
 pGlobeHtProps.BaseOption = esriGlobeLayerBaseOption.esriGlobeLayerBaseLayer;
 pGlobeHtProps.Apply(theGlobe, theFloatingLayer);
 theGlobe.GlobeDisplay.RefreshViewers();

theFloatingLayer = floatingLayers.Next();
 pGlobeLyrProps = null;
 pGlobeHtProps = null;
 }

For the re-draping, I'm doing what I found in the following articles:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000019z000000
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004900000003000000

If I go into ArcGlobe, add the elevation layer, and then do the re-draping everything seems to be OK. However, when doing it in my application, I don't see any change in the view after the re-draping.

If anyone can offer any suggestions, I'd really appreciate it. Thanks!


texts: ArcGIS vector tile layer label gets underneath satellite image after pan or zoom esri-leaflet-plugin

texts:
I am trying to render on a leaflet map an ArcGIS vector layer and a satellite image layer using the [Esri Leaflet Vector Tile plugin][1]. The issue is that when I add those two layers the labels of the vector layer disapear underneath the satellite image after we pan or zoom in the map.
For reference I am trying to load this vector tile layer https://www.arcgis.com/home/webmap/viewer.html?webmap=28f49811a6974659988fd279de5ce39f on top of the world imagery map.
Code exampe:
<!DOCTYPE html>

  <meta charset=utf-8 />
  <title>Esri Vector Layer</title>
  <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />

  <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css"/>

  <link rel="stylesheet" href="https://unpkg.com/mapbox-gl/dist/mapbox-gl.css"/>


texts: How to make line id's on continuous order

texts:
I have a problem with numbering the line segments.

I need to make line segment id's that have letters according to polygon areas (got letters for line segments already) and number according to segment's order starting from 1 in each letter areas. Result should be AAA1, AAA2, AAAn, BBB1, BBB2.. etc. By getting the $id or @row_number the QGIS program counts all segments (even though I need to count the selected in right order).

For example in this part the numbering should continue after 28 as 29, not 82 like it now goes. Not numbered segments should get numbers 1..n running in order.

I wouldn't mind if there is a way to automate the whole process. There are several letter areas to do the job.

I have an opportunity to use Arcmap also if needed.


texts: PyQGIS how to construct QgsSpatialIndex with FlagStoreFeatureGeometries flag?

texts:
In the PyQGIS documentation for QgsSpatialIndex.nearestNeighbor (https://qgis.org/pyqgis/master/core/QgsSpatialIndex.html#qgis.core.QgsSpatialIndex.nearestNeighbor)

we see the following (!) Warning:

  If this QgsSpatialIndex object was not constructed with the FlagStoreFeatureGeometries flag, then the nearest neighbor test is performed based on the feature bounding boxes ONLY, so for non-point geometry features this method is not guaranteed to return the actual closest neighbors.

Neither in the cookbook (https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#using-spatial-index) nor somewhere else on the web I could find an example on the question

How to construct a QgsSpatialIndex with the FlagStoreFeatureGeometries flag in PyQGIS?

(related: Why does QgsSpatialIndex.nearestNeighbor(point, 1) sometimes return 2 lines?)


texts: How can I change an individual symbol on my map without changing all the other symbols? I can't click on an specific point to specify the picture.


texts: INTERLIS - Catalogue items duplicated on --import

texts:
Problem
With every import (ili2db --import option) of xtf data having a data model with Catalogue data (enumeration values) the Catalogue items are also imported and thus the enumeration values are duplicated. The option --createBasketCol is used because update (ili2db --update option) etc. is planned later. Omitting this option is therefore not a solution.
Test
Test data: The ASTRA model RoadTrafficAccidentLocation is used to explain the problem.
Generate the master database:

Create the master database: ili2gpkg --schemaimport --dbfile ./GIS/Data/RoadTrafficAccidentLocation_master.gpkg --createBasketCol --createEnumTabs RoadTrafficAccidentLocation_V2.ili.
Import the Catalogue data: ili2gpkg --import --importBid --dbfile ./GIS/Data/RoadTrafficAccidentLocation_master.gpkg RoadTrafficAccidentLocation_Catalogs_V2.xml.

Data collection (survey1):

Create the survey1 database RoadTrafficAccidentLocation_survey1.gpkg with QGIS Model Baker (option Source = Interlis (use GeoPackage)).
Import of the Catalogue data, equal as with the master database: ili2gpkg --import --importBid --dbfile ./GIS/Data/RoadTrafficAccidentLocation_survey1.gpkg RoadTrafficAccidentLocation_Catalogs_V2.xml.
The recorded data must be assigned to a basket (field T_Basket). Therefore generate data records within the tables T_ILI2DB_DATASET and T_ILI2DB_BASEKT:

insert into T_ILI2DB_DATASET (datasetName) values ('RoadTrafficAccidentLocation_V2.RoadTrafficAccident');.
insert into [T_ILI2DB_BASKET] ([dataset], [topic], [T_Ili_Tid], [attachmentKey], [domains]) values ((select T_Id from T_ILI2DB_DATASET where datasetName = 'RoadTrafficAccidentLocation_V2.RoadTrafficAccident'), 'RoadTrafficAccidentLocation_V2.RoadTrafficAccident', 'fb34beac-1d2b-4466-9a25-f83809d0fe35', 'RoadTrafficAccidentLocation_V2.RoadTrafficAccident', NULL);.

Record fictitious data with QGIS.

Import data from survey1 to master:

Export from RoadTrafficAccidentLocation_survey1.gpkg: ili2gpkg --export --baskets fb34beac-1d2b-4466-9a25-f83809d0fe35;b01 --dbfile ./GIS/Data/RoadTrafficAccidentLocation_survey1.gpkg RoadTrafficAccidentLocation_survey1.xtf *)
Import to master: ili2gpkg --import --importBid --baskets fb34beac-1d2b-4466-9a25-f83809d0fe35;b01 --dbfile ./GIS/Data/RoadTrafficAccidentLocation_master.gpkg RoadTrafficAccidentLocation_survey1.xtf.

*) Without including the basket b01 of the Catalogue data, error messages occur: Error: unknown referenced object RoadTrafficAccidentLocation_V2.RoadTrafficAccidentCatalogs.AccidentSeverityCategory TID 25 referenced from RoadTrafficAccidentLocation_V2.RoadTrafficAccident.Road-traffic-ec483-4ccident.
Problem duplicated catalog data in master:

Question: How can it be avoided that the Catalogue data is (respectively must be) included with each import into the master database and thus is duplicated?


texts: Selecting object(s) by mouse using ArcGIS Engine?

texts:
I've got a standalone program using ArcGIS Engine, showing a map on the screen like this:

AxMapControl _mapControl;
AxToolbarControl _toolbarControl;

// in constructor:
_mapControl = new AxMapControl();
_toolbarControl = new AxToolbarControl();

// in loading:
_toolbarControl.SetBuddyControl(_mapControl);
_toolbarControl.AddItem("esriControls.ControlsSelectTool");
_mapControl.LoadMxFile(@"C:\Users\me\Documents\TestProject.mxd");

The ControlsSelectTool shows up in the tool, but it does not select anything on the map when I click or drag a rectangle. I probably are missing some basic problem here.

Should I use some other way to select objects in a layer or am I just missing some detail here?


texts: Data of attribute table is not showing on ArcMap

texts:
I have downloaded a point shapefile and when I can add this in my ArcMap 10.4. But the problem is when I try to open the attribute table it says this message and end up with bank rows.

It shows the number of features in the below but the table is empty.  How to solve it or the data is missing?


texts:
I am new to Android (just brought a Nexus 7) and I am trying to get QGIS onto it but I can not find any installation instructions.  I have found http://android.qgis.org/download/qgis-installer.apk and when I click on the link I get the warning that "such files may damage my computer", I click "continue" and there is a brief popup "downloading..." and that is it.  Nothing else happens.

I have only ever installed apps from the "play store" in the past.

I am still coming to grips with computers that don't have a command line shell ;)

Russell


texts: Accessing advanced metadata formats from ArcGIS REST API?

texts:
Esri allows us to choose the style of the metadata we would like to use:

Those styles allow you to add more specific metadata e.g. more description about a specific field like this:

the problem is, that this extra metadata is not accessible from the REST API, as you can see in the picture below:

the "extra" fields are nowhere to be found


texts: Can ArcGIS and OSGeo4W share the same python install?

texts: I don't like unnecessary duplication. Is it possible to install python only once and have both ArcGIS and OSGeo4W using it?


texts: How to convert a finished project in QGIS to PDF

texts: I have finished my project and need to convert it into a PDF file. How can I do it?


texts:
I have 2 coordinates (Longitude and Latitude) and a distance from them to a third coordinate.
How is it possible to calculate the longitude and latitude (probably 2 possibilities) of the third coordinate?

I have found these 2 answers:
Calculating intersection of two Circles?
How do I find the intersections of 2 circles on earths surface?

But did not understand them as I have finished my geometric lessons long ago :)
I would be glad if someone could simplify it for me so I can find the third coordinate in an easy way.

Thanks!


texts: Spatial grids over a shapefile or spatialpolygonsdataframe

texts:
I want to create a grid of 4 by 4km and then place it on a shapefile that I converted to a raster. The final product is a plot of my study area and my set of coordinates inside this created grids on the raster layer.

# create a grid of 4*4 km on map
Nam <- rgdal::readOGR(dsn = "Province_Data", layer="Namibia")
plot(Nam)

# create an empty raster
grid <- raster(extent(Nam))

# choose its resolution (4 by4 km)
res(grid) <- 4

# give the grid the projections
proj4string(grid) <- proj4string(Nam)

# transform this raster into a polygon and there is a grid now
gridpoly <- rasterToPolygons(grid)

#this rastertopolygon always gave me error saying r encountered fatal problem and needs to close and r needs to restart

What could the problem be?


texts: Extract land cover data from Google Earth?

texts:
I have latitude-longitude coordinates for a certain region with me. Is it possible that when I enter this data in Google Earth, I can somehow extract the land cover class associated with each coordinate?

Or how can I access the land cover data (if GE already has it online)?

I am new to Google Earth.


texts: Removing Null title/string from infoWindow of CartoDB?

texts:
I am new to using CartoDB.

My issue stems from having multiple data columns displayed in the infowindow when clicked. In this case I don't want "null" or the title if null, to appear in the infowindow - I just want the data that isn't null to appear.


texts: Setting coordinate systems in gvSIG: Is the workflow similar to QGIS?

texts:
I am still learning how to use coordinate systems and projections, but I hope this basic question will be easy to answer. My goal is to be able to use either QGIS or gvSIG to create a simple county map of Illinois using the base data shapefiles available from the Illinois Natural Resources Geospatial Data Clearinghouse.

I believe I need to use a state plane coordinate system such as NAD83/Illinois (East) or NAD83/Illinois (West) so that the state will look like this:

... but not this:

In QGIS, I assume that best way to get the desired look is by first setting the application's CRS Preferences and the Project Properties CRS to NAD83/Illinois (West) [EPSG code 26972], with "On the Fly" selected, then adding the shapefile. Leaving the "On the fly" option unselected causes problems. Changing the Preferences or Project CRS after adding the shape layer also causes problems.

Are my basic steps and assumptions correct?

If those basic steps are correct, why do the same steps not work in gvSIG? (The Illinois shape is displayed as the undesired "wide" version no matter what I do.)

Added later to illustrate comment on gvSIG:

Here are the dialogs I see after adding the layer:

In case this is relevant, here's the empty Transformations list in gvSIG:


texts: Fastest way to convert big raster to polyline using R or Python?

texts:
I have a big raster file (129600 by 64800 pixel) with global water bodies (1 bit values 0 and 1) and try to extract ocean and inland water shorelines.

I've tried with ArcGIS and QGIS to convert from raster to polyline, but it takes ages.

Does anybody know a better/faster way (Python or R) or a better tool for this task?

Update

R: rasterToContour might be fast and precise but if you have a very large dataset like mine (8,398,080,000 pixels) you need either a very big amount of RAM (more than 16GB) or you force R to do more processing on the hard drive and it will also take ages.
Python/GDAL: gdal_poligonize creates polygons instead of polylines

Update 2

R rasterToContour: rasterToContour does not deliver the wanted results. Compared to ArcGIS (raster to polygon followed by feature to line) it does not extract the exact pixel outline, as shown in the examples below.

rasterToContour result

ArcGIS result

UPDATE 3

Python/GDAL: I've run gdal_polygonize from command line against ArcGIS on a test dataset and the results were extremely clear:

gdal: 49 seconds
ArcGIS: 1.84 seconds


texts: How to avoid unexpected values in border of slope raster in QGIS

texts:
I have a DEM like

After calculating slope with QGIS, it's showing the following result

So, how can I remove the unexpected value at the edge of this DEM? Which is showing almost 90 degree values.


texts: Create a point on a line after a specific distance from startpoint

texts:
I'm trying to create a point on a line after 10 meters from the beginning of the line. In postgis it is possible to create a point on a certain fraction of total length of linestring (st_line_interpolate_point), but in this case I can't specify the distance of the point.

I don't know if it possible to do something like that, because line could be shorter than the distance that i set to place the point.

Any suggestions?


texts: How to copy values from one attribute column to another with Python/QGIS?

texts:
I have one shapefile with two columns and I want  to copy the values from column 'A' to column 'B' (in the same shapefile).

I need to do this with a script, because at the end I want to iterate through all shapefiles in one folder. But first, the step described above would help a lot!

It has to be easy as I'm a beginner.

I am using QGIS 2.18.21.


texts: Parsing text in feature class attachments

texts:
Is there any way to parse text in feature class attachments using ArcGIS Desktop?

I have a feature class with ~60,000 features, all of which have an associated .pdf file.  I would like to query the text in these reports spatially.

I guess I could output the text in the .pdf's to a db, but ideally the search would just parse the .pdf files.


texts: More Efficient Conditional Statements - ArcGIS Field Calculator

texts:
I am new to Python and have successfully created the following statement that writes a change period value (01 or 02) based on the municipality and date fields. I am wondering if anyone could point towards a more efficient way to do this, perhaps reducing to only the first if and elif statements since the criteria to be included under "01" or "02" are the same for kitchener, cambridge, and waterloo?

pre-code:

def ifBlock(munic, time):
    if (munic == 'kitchener' and time == "2003" or munic == 'kitchener' and time == "2004" or munic == 'kitchener' and time == "2005" or munic == 'kitchener' and time == "2006"):
        return "01"
    elif (munic == 'kitchener' and time == "2007" or munic == 'kitchener' and time == "2008" or munic == 'kitchener' and time == "2009" or munic == 'kitchener' and time == "2010"):
        return "02"
    elif (munic == 'cambridge' and time == "2003" or munic == 'cambridge' and time == "2004" or munic == 'cambridge' and time == "2005" or munic == 'cambridge' and time == "2006"):
        return "01"
    elif (munic == 'cambridge' and time == "2007" or munic == 'cambridge' and time == "2008" or munic == 'cambridge' and time == "2009" or munic == 'cambridge' and time == "2010"):
        return "02"
    elif (munic == 'waterloo' and time == "2003" or munic == 'waterloo' and time == "2004" or munic == 'waterloo' and time == "2005" or munic == 'waterloo' and time == "2006"):
        return "01"
    elif (munic == 'waterloo' and time == "2007" or munic == 'waterloo' and time == "2008" or munic == 'waterloo' and time == "2009" or munic == 'waterloo' and time == "2010"):
        return "02"
    else:
        return "other"

Code:

ifBlock(!MUNIC!, !TIME!)


texts: Landsat mask shadows due to rugged topography in Earth Engine

texts:
I am working to produce a snow duration map in GEE, but since the area of interest is mountainous I am having trouble with north-facing slopes.
I've learned that a solution exists for Sentinel in this answer: https://gis.stackexchange.com/a/305159/147843

Is there an equivalent for Landsat?


texts: Identify polygons that perfectly overlap with a set of polygons in another shapefile

texts:
I have two shapefiles with thousands of polygons representing the same administrative units at two points in time.  In many cases, the polygons from the two shapefiles overlap perfectly; in other cases, they have changed slightly.  I am using intersect to calculate the percent of overlap between polygon X in shapefile 1 and polygon X in shapefile 2.

I am trying to figure out how to deal with a special case, in which a polygon has been split neatly into 2 or more parts.  The images below illustrate: the original polygon (on the left) has been split into three parts (on the right) but its outside borders have not changed at all.

I would like to do two things:

Identify these cases in ArcMap 10.4.
Record the attributes (FID, etc) of the polygons from image 2 that, combined, comprise the full area of the polygon from image 1.

Since I have many thousands of polygons, doing this manually will not work.  I am hoping there is some elegant solution to this problem that I am not aware of.  I am most interested in cases where the combination of 2+ polygons in one shapefile completely cover the area of 1 polygon in the other shapefile, down to some arbitrarily small tolerance level.


texts: Rotation symbol in ArcGIS online not always available?

texts:
I'm currently making an application with Survey123 and ArcGIS online. This application uses the survey to add ratings on 9 subjects. The added points are loaded into an webmap in ArcGIS Online which should show them like this:

I made this flower shaped figure by adding my own symbols into the webmap and give each subject a different angle, so each dot represents a subjects rating.

I created the survey and the shape in different steps. I wanted to combine the points (wfs) of the survey with the created symbol but in the point file of the survey the Rotate symbol (degree) function is not available any more. I noticed that on some layers this function does work and on some it doesn't. Does anyone knows what could be the reason for this?


texts: RuntimeError opening rasterio array in GDAL

texts:
I've opened a GeoTiff with rasterio:

import rasterio
with rasterio.open('Africa.tif') as src:
    transform = src.meta['transform']
    array = src.read(1)

array([[203, 203, 203, ...,   0,   0,   0],
       [203, 203, 203, ...,   0,   0,   0],
       [203, 203, 203, ...,   0,   0,   0],
       ...,
       [  0,   0,   0, ...,   0,   0,   0],
       [  0,   0,   0, ...,   0,   0,   0],
       [  0,   0,   0, ...,   0,   0,   0]], dtype=uint8)

Then I want to open this array data in GDAL:

gdal.Open(array,GA_ReadOnly)

but I get the following error:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-65-ac65027e8ea3> in <module>()
----> 1 gdal.Open(array,GA_ReadOnly)

RuntimeError: not a string

However, opening the original Tiff in GDAL works fine:

gdal.Open('Africa.tif')

<osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x152e91450> >

I'm following the computations here: http://nbviewer.ipython.org/github/perrygeo/python-raster-stats/blob/master/docs/notebooks/Integrating%20with%20GeoPandas%20and%20Numpy.ipynb

but I want to do some masking of the input array before running the zonal computations on it (otherwise it's not necessary to open the image in rasterio at all).

Here is the link to the Tiff file I'm using, in case that's the issue:
https://drive.google.com/file/d/0B7dNXVF349Jsbm5mQUt5c3JCSDA/view?usp=sharing


texts: Understanding Viewshed Analysis in ArcGIS Desktop?

texts:
I am trying to understand viewshed analysis in ArcGIS 10.1.

After you add fields such as RADIUS1, AZIMUTH1 to your observer vector attribute table, does it automatically calculate visible/non-visible areas within the specified radius and azimuth? Or do you have to use a different tool?

What I really need to find out is the areas visible from each monument location (including whether the monuments themselves are visible to each other, if they are close), in such a case what would be the best way to approach this?

Also, is it necessary to always convert xy coordinates of sites (already added as File Geodatabase Feature Class) to Observer points using observer points tool? I am only asking because for some areas, I have more than 16 monuments and I think you can only have a max of 16 observation points.


texts:
When I click on area, GeoNetwork show the next problem: "No matching records found".

In geoserver, the information if it is shown.

What is the problem?


texts:
I combined two plugins: Leaflet search and cluster. But I want search points and automatically move to a location and view its popup.  But it is not working, I can search, move to location but there's no automatic popup.

var markers = L.markerClusterGroup();

var geoJsonLayer = L.geoJson(data, {
    onEachFeature: function (feature, layer, marker) {
        layer.bindPopup( "ID vzorku "    + feature.properties.catalogNumber +
"
 nadmořská výška "+ feature.properties.elevation + " m n.m."+
"
 průměrná roční teplota "+feature.properties.t_year +"°C"+
"
  roční úhrn srážek    "+feature.properties.preci2 +" mm " );
    }
});
markers.addLayer(geoJsonLayer);

map.addLayer(markers);

//vytvoření panelu pro vyhledávání
var searchControl = new L.Control.Search({
    layer: markers,
    propertyName: 'catalogNumber',  // pole přes které se vyhledává
circleLocation: true,
marker: false,

moveToLocation: function(latlng, catalogNumber, map) { console.log(latlng); map.setView(latlng, 10); }
});

searchControl.on('search:locationfound', function(e) {

    //console.log('search:locationfound', );

        e.layer.openPopup("OBJECTID");

}).on('search:collapsed', function(e) {

featuresLayer.eachLayer(function(layer) {   //restore feature color
featuresLayer.resetStyle(layer);


texts: Transformation from GK/ETRS89 to UTM/ETRS89 in QGIS?

texts:
I have a dataset with about 10.000 points and their coordinates in Epsg 31467, EPSG 25832 and something called Lagestatus 320 (GK and ETRS89,  tú i don‘t know correct proj4 definition). I use NTv2 and a local Grid file to transform to 25832 and this works fine!

But the way back to 31467 or Lagestatus 320 does not work. All coordinates are inf. I have no idea, what is wrong!

Do I need a different Grid file?


texts: Is there any list of Python packages bundled with QGIS 3 installation on Windows?

texts:
We currently solving the problem of dependcies of our plugin. Since we want to have user-friendly installation (inexperienced users), one of the possible solution is drop some used packages in favour the ones that are built-in in QGIS 3 (on Windows).

That leads me to this question: Which are the packages? Is there any list of these packages that are bundled with QGIS installation on Windows?


texts: Get actual error from ol.source.WMTS.optionsFromCapabilities

texts:
I am using the method ol.source.WMTS.optionsFromCapabilities to create a WMTS layer and when I am trying to use a projection that does not exist in OpenLayers it throws an error.

  Please note that in my case the projection is not available up front.

Unfortunately, the nature of the error is very general. When using the minified version I get:

  Cannot read property 'wb' of null

along with the stack trace, which is translated to the following when using the debug version:

  Cannot read property getCode() of null

Is there a way to get the actual error and not one in just plain text?


texts: Z-value missing in attribute table of shapefile from ASCII 3D to Feature Class?

texts:
i'm trying to convert some *.xyz files into shapefiles but unfortunately it does't work out correctly! I use the tool "ASCII 3D to Feature Class" (ArcMap extension "3D Analyst") because I've read this is a good and easy way to do this. But for some reason the attribute table of the resulting shapefile does not contain the z-values:

This is a problem because I want to generate a DTM out of the shapefiles.

Is there any solution for this? I've tried several options within the tool but without luck.

I don't think it's that important but for your information:
I have two different kind of *.xyz files which I can use representing the same area (2 meter grid width and variable grid width). they are build like this:

variable grid width:
(no header) - (2x space)x-value(4x space)y-value(5x space)z-value

2 meter grid width:
(no header) - (2x space)x-value(2x space)y-value(2x space)z-value


texts: Export clustered points as coordinates in QGIS

texts:
I have been looking at taxi data in a city and wanted to cluster points over a set area to see how many entries would be in each clustered area. My input is a csv of taxi data points [TaxiID, lat, long, time] that I have been able to load into QGIS, I then wanted to perform my clustering on these points. I've achieved this fairly easy using the layer properties on QGIS that allows me to display points as clusters and counts the number of entries in each cluster.

However I have not been able to find a way to export these results. Saving the layer does nothing as it just saves the underlying points, not the new clusters. I would ideally want an output file with all clusters displayed as:
[ClusterID, Lat, Long, ClusterDensity]

Is there any way to achieve this? I also tried using the K-means Clustering from the toolbox but it didn't seem to work only recreated every point in my dataset.


texts: After adding a feature in the line layer , The line created is not visible even after changing the properties

texts: I am a beginner at using gis. I am facing problems while creating line layer. After creation of layer when I try to edit the line drawn is not visible as it is never drawn. Although in attributes table all the attributes are saved


texts:
I'm following the manual and I've successfully digitised the fields, now I must do the paths. I can trace the paths but instead of it being a line, it creates a shape/area.

What am I doing wrong? I'm also confused by the general instructions:

"Create a new line feature called routes.shp with attributes id and type."

I created a new layer called "routes" exactly like the "school_property" layer. I then entered edit mode with route layer selected and digitised the path. When the attributes box appeared for the first route, I wasn't sure what to put in the "ID and routes" box.


texts:
I have a strange bug (?) using arcpy when I try to create a layer with a point inside the name. Let's consider I write:

N = 26.1
outLocation = "C:/Project/ArcGIS/MyLayers/"
outputName =  "SimpleName_"+str(N)
geometry_type = "POINT"
arcpy.CreateFeatureclass_management(outLocation, outputName, geometry_type)

The layer is created but it gets the name SimpleName_24 instead of SimpleName_24.1

Is it something that can be corrected?
I also tried "SimpleName_"+str(N)[:2]+"."+str(N)[3:] but it didn't work.


texts: geoServer WFS call to iterate/loop over a string

texts:
I would like to make a WFS call via POST that takes a value and checks if it is in a range on the features attributes. the attribute looks like this:

  <###:range>F 301-436,438-500,G 1</###:range> //these are on separate features.
  <###:range>C 201-400,D 1-100</###:range>
  <###:range>M 401-600</###:range>
  <###:range>B 1-144,146-310,312-400,F 1-400</###:range>

So if i had a letter and a number like 'F 310' I would like it to return the first and last feature.

I can't change the geoserver or data in any way.
I have looked into functions and can see that I could nest IF statements with INDEXOF and other string functions to manually check and take apart the string then use the BETWEEN function but this would be hard coded in regard to the length of the string to be broken apart and make a very verbose statement.

I will look more at the stored functions but Im having difficulty finding easy to digest information. I don't expect this to offer anything above what the standard call allows.

I am at the moment resorting to this processing on the client where loops make this job easy. It may well be that this is the 'correct' place to do the processing but before I close the door on this I wondered if anyone else had done a similar thing or have any cunning tricks.

EDIT:
I have found a function expression in the ECQL docs

<function> ::= <identifier> "(" ( <function arguments> ("," <function arguments> )* )? ")"
<function arguments> ::= <literal> | <attribute> | <expression>

This would seem to offer the ability to use recursion presuming the function is called (not some other function use) I can nest the 'IF $notFinished$ THEN thisFunction($subString$)' within it. I cannot however find any examples of how to use this within a POST request. -- this seems to be to access the standard functions not user created ones.


texts: How to export effectively from QGIS to Adobe Illustrator?

texts:
When I try to export my QGIS file to Adobe Illustrator I either get:

The map layout, but I can't change/select the different polygons
I can change/select the different polygons, but I don't get the background/colors/layout. Everything is basically black.
I tried the SimpleSvg plugin, but QGIS crashes for me when I run it.

The quality of QGIS exports isn't always up to par for me, so I want to alter it in Illustrator.

What are your suggestion(s) for a workflow for QGIS -> Illustrator?


texts:
I have created one python addin tool which creates some points along a line, it works good.

my problem is when my tool gets activated i am not able able to zoom/pan the map. map view just get stuck wherever it was before clicking on that tool.

more elaborately when i am in the middle of creating a line map view get stuck.

using below code:

class PointAddressCreateClass(object):
"""Implementation for PointAddressCreate_addin.tool (Tool)"""
def __init__(self):
    self.enabled = True
    self.shape = "Line" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.
def onMouseDown(self, x, y, button, shift):
    pass
def onMouseDownMap(self, x, y, button, shift):
    pass
def onMouseUp(self, x, y, button, shift):
    pass
def onMouseUpMap(self, x, y, button, shift):
    pass
def onMouseMove(self, x, y, button, shift):
    pass
def onMouseMoveMap(self, x, y, button, shift):
    pass
def onDblClick(self):
    pass
def onKeyDown(self, keycode, shift):
    pass
def onKeyUp(self, keycode, shift):
    pass
def deactivate(self):
    pass
def onCircle(self, circle_geometry):
    pass
def onLine(self, line_geometry):
   ***Some Code HERE****

its main functionality lies in "def onLine(self, line_geometry)" function.
so when i click on the map and start to create a line on map, i want zoom/pan functionality at that time.

i guess there should be a function to zoom/pan in active view by either mouse scrolling or may be any other method.


texts: Is it possible to combine a point and a polygon layer in one layer from a shapefile in QGIS?


texts: Join 3D points into a 3D line in QGIS (with Qgis2threejs plugin)

texts:
I have a series of several points in a csv, with each row being a different point, with information for various attributes, including the x and y coordinates, stored across the columns. I've been able to display these points in 3D with the Qgis2threejs plugin, using one of the columns in the csv as the elevation.

How would I go about creating a line which joins each of these points in order, and retains the elevation information for each of them (and preferably also the other attribute information)? I've tried using the 'points to path' tool in the processing toolbox, but this just returns a line which, whilst joining all the points, only has one row in its attribute table, listing the beginning and the end of the line, and loses all other information. If it would be easier I would be fine creating several separate lines, one joining each of the points, but there are 82 rows in the csv (ie 82 points), so I'd have to have a way to do this automatically. Ultimately I'm looking to have a line (or lines) joining the points in 3D, presumably also displayed using Qgis2threejs.

I'm running QGIS 3.4.4 on macOS.


texts: Creating topology for shapefiles using ArcPy?

texts:
in my project, there are some Line shapefiles (transport related) and I want to create topology for those shapefiles. I can create topology

by converting shapefiles into Geodatabase
creating topology
adding feature classes and rules to topology
Running and validating topology errors
Exporting topology errors into shapefile

I found some separate ArcPy codes for each task(as shown in below) for above mentioned but I am looking for single arcpy code by including all above tasks

Finally, what I want to say is, I have some shape files in one folder and I need topology errors directly by running ArcPy.

My English is not good enough to explain more about this but can you help me with my ArcPy code?

import arcpy
from arcpy import env

# Set workspace
env.workspace = r"C:\SOFTWARE\Shapefiles\topo"

# Set local variables
out_dataset_path =r"C:\SOFTWARE\Shapefiles\topo\out\topo.gdb"
out_name = "topo1"

# Creating a spatial reference object
sr = arcpy.SpatialReference(r"C:\SOFTWARE\Shapefiles\topo\line.prj")

# Create a FileGDB for the fds
arcpy.CreateFileGDB_management(r"C:\SOFTWARE\Shapefiles\topo\out", "topo.gdb")

# Execute CreateFeaturedataset
arcpy.CreateFeatureDataset_management(out_dataset_path, out_name, sr)
print "GDB created"

# Set local variables
in_features = ['line.shp', 'parcel_1.shp']
out_location = r"C:\SOFTWARE\Shapefiles\topo\out\topo.gdb\topo1"

# Execute FeatureClassToGeodatabase
arcpy.FeatureClassToGeodatabase_conversion(in_features, out_location)
print "shape exported to GDB"

input_dataset = r"C:\SOFTWARE\Shapefiles\topo\out\topo.gdb\topo1"
topo_name = "Topology"
cluster_tol = 0.001
input_fc =  r"C:\SOFTWARE\Shapefiles\topo\out\topo.gdb\topo1\line 1
1;C:\SOFTWARE\Shapefiles\topo\out\topo.gdb\topo1\parcel_1 1 1"
rules = r"'Must Not Have Dangles (Line)' C:\SOFTWARE\Shapefiles\topo\out\topo.gdb\topo1\line #;'Must Not Intersect (Line)' C:\SOFTWARE\Shapefiles\topo\out\topo.gdb\topo1\line1 #"
validate = "true"

# Create the topology
out_topo = arcpy.CreateTopology_management(input_dataset, topo_name, cluster_tol)
print("Created topology.")

# Loop through the list of feature classes and add them to the topology
input_fcL = input_fc.split(";")

for fc in input_fcL:
    param = fc.rsplit(" ", 2)
    in_fc = param[0]
    arcpy.AddFeatureClassToTopology_management(out_topo, in_fc)
    print(arcpy.GetMessages())

# Loop through the list of rules and add rules to the topology
rulesL = rules.split(";")

for rule in rulesL:
    r = rule.rsplit(" ", 4)
    rule_type = r[0].replace("'","")
    in_fc1 = r[1]
    subtype1 = r[2]
    in_fc2 = r[3]
    subtype2 = r[4]

    arcpy.AddRuleToTopology_management(out_topo, rule_type, in_fc1, subtype1, in_fc2, subtype2)
    print(arcpy.GetMessages())

# Validate the topology
if validate == "true":
    try:
        arcpy.ValidateTopology_management(out_topo)
    except:
        print(arcpy.GetMessages())

print("Finished.")


texts: How to activate a layer in QGIS layers legend

texts:
How can I activate a layer in qgis map legend automatically using python code .
I am using

qgis.utils.iface.setActiveLayer(self.theLayerToEdit)

but the layer is still not checked in the maplegend.


texts: Problem with MyBase when converting old VB.NET toolbar

texts:
I'm working on a project to convert and older set of ArcGIS tools that were developed for 9.x using VB.NET.  I'm trying to convert them to an Add-In for 10.4.

So far, I have created the Add-In and copied the code from the old project, but I'm getting an error that is preventing me from building the project.  The old project has an ArcGIS class file which refers to MyBase.m_enabled when as part of the hook for accessing the application.  In the new Add-In however, this reference gives a build error with the message:

'm_enabled' is not a member of 'Object'.

The full code for the ArcGIS class is below:

Imports System.Runtime.InteropServices
Imports System.Drawing
Imports ESRI.ArcGIS.ADF.BaseClasses
Imports ESRI.ArcGIS.ADF.CATIDs
Imports ESRI.ArcGIS.Framework
Imports ESRI.ArcGIS.ArcMapUI
Imports ESRI.ArcGIS.Geometry
Imports ESRI.ArcGIS.Display
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.DataSourcesRaster
Imports System.Windows.Forms

<ComClass(ArcGISClass1.ClassId, ArcGISClass1.InterfaceId, ArcGISClass1.EventsId),
ProgId("IntervisibilityTools.ArcGISClass1")>
Public Class ArcGISClass1

    Private m_application As IApplication

#Region "COM GUIDs"
    ' These  GUIDs provide the COM identity for this class
    ' and its COM interfaces. If you change them, existing
    ' clients will no longer be able to access the class.
    Public Const ClassId As String = "4c9af923-e5db-428c-9626-24bd2403688b"
    Public Const InterfaceId As String = "375cc171-dc44-4ff2-9929-ee4641481847"
    Public Const EventsId As String = "02cf9a2e-0d56-4f11-91f7-649365beb8f7"
#End Region

    ' A creatable COM class must have a Public Sub New()
    ' with no parameters, otherwise, the class will not be
    ' registered in the COM registry and cannot be created
    ' via CreateObject.
    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub OnCreate(ByVal hook As Object)
        If Not hook Is Nothing Then
            m_application = CType(hook, IApplication)

            'Disable if it is not ArcMap
            If TypeOf hook Is IMxApplication Then
                MyBase.m_enabled = True
            Else
                MyBase.m_enabled = False
            End If
        End If

    End Sub
End Class

The problem occurs on the two lines that read "MyBase.m_enabled = True" and "MyBase.m_enabled = False"
What is strange, though, is that all the other command and tools in this project contain the same code set in their OnCreate() methods and they don't trigger the error.

Is there some kind of difference between an older 9.3 project, and a new 10.4 Add-In that would cause this?

Does the project need the ArcGIS Class to access the application?


texts: Exporting shapefiles to file geodatabase results in no coordinate system (ArcMap)

texts: I export shapefiles with a defined coordinate system to a file geodatabase assigning the export coordinate system same as input file, but when I try to import them back into the project from the file geodatabase, they do not have an assigned coordinate system. Not sure where I'm going wrong.


texts:
I've a query that has to be run against 1 million records. The query finds the intersection between two polygons and the area of the result of the intersection. Here's the query:

SELECT
    ST_Area(
        ST_Collect(
            ST_Intersection(poly1.the_geog::geometry, poly2.the_geog::geometry)
        )::geography
    ),
    ST_AsGeoJSON(
       ST_Multi(
           ST_Collect(
               ST_Intersection(poly1.the_geog::geometry, poly2.the_geog::geometry)
           )
       )
    )
FROM poly1, poly2
WHERE poly1.id = 1 AND
   ST_Intersects(poly1.the_geog::geometry,poly2.the_geog::geometry)

I'm trying to figure out if I can use the result of ST_Intersection query which is common for ST_AsGeoJSON and for calculating the area using ST_Area. Is it possible to do it ?


texts: CORS - HARN transformations - what is the most accurate method

texts:
This may not be an issue for many GIS-ers but has anyone else had experiences transforming from modern NAD83 (CORS) to HARN coordinates and vice versa? I realize the discrepancy might be something like 10 cm but for sources like low-level aerial, mobile lidar or ground surveys, this is still a big deal. What is the best practice? Most states still require HARNs as a deliverable coordinate system, and many companies survey tied to the latest realization of the CORS network.

An ArcGIS implementation would be appreciated.

Also this might lead to an interesting discussion for those who think the NAD83 -> HARN transformation in ArcGIS is the right thing to do with modern GPS-derived survey data (it's not!).


texts: Shapefile data not displaying on MapInfo workspace?

texts:
I have a number of shapefiles created from ARCMap and would like it displayed in MapInfo (version 10.5) but the polygon is not displayed on the work space.

I can view my attributes table by browse table and I can select a polygon although I cannot view it (the image below show it is selected). I can also see the node by setting show node in layer properties.

Could anyone tell me what I missed?


texts: NDS file format conversion to an executable GIS format

texts:
Could we open .nds files in any of the GIS mapping environment.

it stands for Navigation Data Standards, having the navigation features stored in it. There are 2 types of nds file formats. One is executable one (in sqlite interface) and the other non executable (because of its binary format). I want to customize these nds files to view the data stored in it. I require a software technology to open these files and view the stored data on any of the mapping software which is compatible.


texts: Gdalwarp with "out of globe" values in sinusoidal projection

texts:
I want to project a global image (source ERA INTERIM) from WGS 84 to sinusoidal, using gdal 1.11 and bilinear resampling. It work fine BUT I have values everywhere on the rectangular extent of the projected dataset when I use the -te option. That is, the values are repeated when the dateline is crossed (e.g values from 179 East are duplicated on the left of values from 180 West).

Is there a trick to make sure that the values are not duplicated on the output image (NoData to the left of the projected 180W and to the right of the projected 180E) ?

The workaround is to create a mask of the globe for NoData, but mabe there is a gdalwarp option for doing this in one step.

EDIT : there was a little extra of 1/2 pixel on the original data set, but I've tried with a vrt of just less the 180 and the problem persisted. It does not solve the problem.

the problem occurs with :

gdalwarp -r bilinear -co COMPRESS=LZW -co TILED=YES -tr 463.312716527777752 463.312716527777752 -te -20015109.353999998420477 -10007554.677 20015109.354 10007554.676999999210238 -multi -t_srs "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs" $input $output

but not with

gdalwarp -r bilinear -co COMPRESS=LZW -co TILED=YES -tr 463.312716527777752 463.312716527777752 -multi -t_srs "+proj=sinu" $input $output

however, I need to use the -te option in order to force all my output images with exactly the same extent.


texts:
I ran a script for location allocation on ArcPy, which worked.

After running it, I used the Save to Layer File to save the result.

Now that I have the result saved (and can even open on ArcMap), I want to reload that file into a Python script to do some work on it.

How do I load/read/open the layer file into Python again? Basically the reverse process of Save to Layer File, where you input a file path and it outputs a object that is the results layer.


texts:
I've successfully loaded in OS MasterMap to a PostGIS (2.4.4.1) database, and it appears in QGIS (2.8.9) fine.

Somewhere during the load process the FID from the raw files (the TOID) gets replaced with the ogc_fid field and appears to be a row number instead of the fid in the raw dataset.

Does anyone know how to include the TOID in the import process?

I've looked through the python files in the OS Translator II plugin directory, but my knowledge of this is very basic, so I'm a bit lost.


texts:
Please pardon my ignorance in advance, but is it possible to style a layer(polygon) using the plugin leaflet-omnivore? All of the examples I've encountered are using the MapBox API

I have the layer rendering default colors with the following line, omnivore.topojson('./data/bmw_parcels_4326.json').addTo(map);

Something like the Leaflet tutorial example as follows would be nice. I just can't figure out how to call the function:

function getColor(d) {
    return d > 1000 ? '#800026' :
           d > 500  ? '#BD0026' :
           d > 200  ? '#E31A1C' :
           d > 100  ? '#FC4E2A' :
           d > 50   ? '#FD8D3C' :
           d > 20   ? '#FEB24C' :
           d > 10   ? '#FED976' :
                      '#FFEDA0';
}

function style(feature) {
return {
    fillColor: getColor(feature.properties.density),
    weight: 2,
    opacity: 1,
    color: 'white',
    dashArray: '3',
    fillOpacity: 0.7
};
}

L.geoJson(statesData, {style: style}).addTo(map);


texts: How can I calculate the distance to the nearest five neighbors for a polygon layer?

texts: Data set (shapefile) contains polygons.  How can I calculate the distance to the nearest five polygons in the data set in QGIS?


texts:
I am using QGIS 2.18.4 on Windows.
I have LiDAR data in GeoTiff format.

Is there a way to dynamically style the GeoTiff layer based on the current map extent?

I need to re-style the GeoTiff layer when I change the map extent in QGIS (pan or zoom). Basically I want the software to calculate the max and min values of the GeoTiff in the current map extent and apply a style (colour ramp) to those values, and when I change the map extent, the software needs to recalculate those max and min values.

I've been searching the internet and QGIS documentation but I haven't found any answers. I am not looking for web-based solutions.


texts: Selecting bands of image collection in Google Earth Engine?

texts:
I want to use the Landsat 8 surface reflection collection (LANDSAT/LC08/C01/T1_SR), which contains the 7 spectral bands plus some extra mask bands. I want to run my algorithm on just the 7 spectral bands, but I'm not sure how to select these. Does the ee.ImageCollection object have a method which allows you to specify which bands are used?

I am trying to run the ee.Algorithms.Landsat.SimpleComposite method on the image collection, which will not run if there is a mask band in the images.


texts: How to access XY position of text element in Layout view using ArcObjects

texts: I'm wondering which interface will allow me to set the XY position of a text element in the page layout of my MXD. I have tried the IElement.Geometry.Envelope.PutCoords(Y, X) to no avail.


texts: I have created annotation from the labels of a set of contour lines in ArcGIS and used Feature Outline Mask to create a mask layer in order to mask the lines using Advanced Drawing Options and make the contours stand out. Everything works great for a time period and then the masks seem to disappear and the contour lines cross the annotation. Examining the attribute table for the masks implies the all masks are still there but I am unable to see the actual polygons. Strangely enough if I copy a polygon to the mask feature class it will be show up both in the map and in the attribute table. Additionally, I have two sets of masks for annotation: one for the contours and one for isopluvials (rainfall lines). The masks for the isopluvials work as expected. The masks for the contours work briefly, but then stop working and appear to vanish. Has anyone seen this behavior before?


texts: What is a good way to cluster point data by item counts in ArcGIS?

texts:
I have point features that have as an attribute an asset count. For instance, point A may have 3 assets whereas point B may have 300 assets.

My goal is to have each point be in two categories: clustered or non-clustered. A clustered point means that, in a buffer with, say, a 5 mile radius, has 100 assets total between all points in that buffer. A non-clustered point is one that doesn't fall in that definition. The points could only be counted once. It is also advantageous to have more clustered than non-clustered points.

One solution I had to this problem was to buffer every point and then for every buffer count the number of assets. If the number of assets were below 100, I would call the point associated with that buffer (the center point) non-clustered. Otherwise, it would be clustered. Then, I would go through the clustered buffers and start with the buffer with the most assets. Every point within the buffer would be clustered. Then I'd keep going with the points that were not in any buffer previously checked and then go through that process again until there were no more buffers.

The problem with that process is that it automatically assumes that the center for the buffers is a point in the data. It may be better to have buffers centered around points not in the data to get more clustered points. Is there a better way to go about this problem?

Programming is not an issue for me. I plan on making this a geoprocessing service if possible, so it's going to use 10 SP5.


texts: get a PolyLine path to go to center of screen

texts:
I am trying to draw a polyLine to the center of the screen (as the second path, point B) ... I tried referencing the below to get center: any pointers?

  coordinatesBx = map.extent.getCenter().getLatitude();
  coordinatesBy = map.extent.getCenter().getLongitude();

The above errors with cannot getCenter() of undefined... should I try to get this in screenPoints first, then try to convert to lat long?

I am good with my first two start points as lat long coords, i.e. workingStartA and workingStartB; however I cannot get the second coordinatesBx and coordinatesBy to go to center of screen. I am in arcgis-JS 4.11 specifically.

i.e.

  var polyline = {
      type: "polyline",
      paths: [
          [workingStartA, workingStartB],
          [coordinatesBx, coordinatesBy]
      ]
  };

Update:

Here is my map; I essentially just want to call the center property lat and long; It works when I manually enter it as the below; but I would like to call it as a variable and have it update automatically when mapview is updated.

const view = new view ({
    center: [-93.70, 38.65], // can i grab this as two vars?
    container: 'mapview',
    map: esriMap,
    zoom: 5
  });


texts: Drawing a line connecting similar points in arcmap

texts:
I am working on mapping schools and the students that attend the schools. The school shapefile has a field for school name and the student shapefile has a field for the school they attend.

I would like to draw a line connecting each student to their respective schools just for display purposes to show travel in a general sense. Not looking for routes, just as the crow flies.

Is there anyway to do this in a reasonable amount of time without much python, my python skills are lacking.


texts: libLAS las2las scrubs ground point data on Ubuntu?

texts:
I am trying to use las2las from libLAS on Ubuntu 14.04 entering the following code into the terminal:

las2las --input merged.las --output ground.las --keep-class 2

This outputs a LAS file which has bounds -214.XX, -214.XX,-214.XX,-214.XX. Just to make sure the merged.las file was good, I was able to open it up and view it in ArcGIS 10.2.2 on a Windows 7 machine. I've also tried a variant where --input was changed to -i and likewise for --output, but got similar results.

Has anyone else encountered this problem? Is there something wrong in my code?

EDIT:
After more testing, I found out my real issue is lasmerge. I have tried the following two lines of code

ls *.las > lidardata.txt
lasmerge -i lidardata.txt -o indianhill.las

I have also tried:

lasmerge -i 640.las -i 641.las -i 686.las -i 687.las -o indiantwo.las

Both of them result in incorrect bounds. I have also tried the -verbose flag, which the help/manual suggest lasmerge should have. But, I get an error saying that it is not a command.


texts: I am trying to sync excel file with shapefile, I tried excel sync plugin but couldn't implement successfully. Could anyone tell how to use this plugin to sync shapefile with excel file.


texts: Important to perform atmospheric correction when attempting to identify coral reefs?

texts: I want to identify coral reefs using multi-temporal Landsat data and Lyzenga's Transformation method. In relation to pre-processing the image, should atmospheric correction be done or not? If not, what is the impact for the next analysis?


texts: Correct Coordinate Referencing System for QGis Georeferencing of 1977 S. African Land Survey Maps

texts:
I'm trying to georeference some maps of Namibia and am having trouble. The projection stated on the map is the "Gauss Conform Central Meridian 15deg E. Bessel's Spheroid". I've tried using South African CRS : HBK_NO_15 and CAPE_NO_15 on the assumption that perhaps the "NO_15" refers to the central meridian. These are the closest I could find to the projection listed on the map.

Is this the right coordinate reference system, and if not does anyone have any idea what is?

I have also asked a related question as Upside down result when I use QGis to georeference 1977 S. African Land Survey Maps of Namibia


texts:
When we work with Tab file in Mapinfo we can save the style directly into the Tab file.

Is there any way to save a feature layer together with a defined style into tab file in QGIS?


texts: Changing Raster symbol values (Unique Values) in ArcObjects?

texts:
I want to change Raster properties symbology using with Arcobjects. Unique Values change as per below attached snapshot.

Dim pWSFact As IWorkspaceFactory
Set pWSFact = New RasterWorkspaceFactory

'Getting Path
Dim pRWSpace As IRasterWorkspace
Set pRWSpace = pWSFact.OpenFromFile(strFolder, 0)

'Open Raster from path
Dim pRDSet As IRasterDataset
Set pRDSet = pRWSpace.OpenRasterDataset(DestFile)

'Convert RasterDataset to raster layer
Dim pRLyr As IRasterLayer
Set pRLyr = New RasterLayer
pRLyr.CreateFromDataset pRDSet
Dim pRReder As IRasterRenderer
Set pRReder = pRLyr.Renderer
Dim pBndCnt As Long
pBndCnt = pRLyr.BandCount
If (pBndCnt = 1) Then

'Document calling
Dim pmxdoc As IMxDocument
Set pmxdoc = ThisDocument

'Set map
Dim pmap As IMap
Set pmap = pmxdoc.FocusMap

'Add layer to Map
pmap.AddLayer pRLyr

Dim pRaster As IRaster
Set pRaster = pRLyr.Raster

Dim pRasterProps As IRasterProps
Set pRasterProps = pRaster

Dim pRSCRR As IRasterStretchColorRampRenderer
Set pRSCRR = New RasterStretchColorRampRenderer

Dim pRStch As IRasterStretch
Set pRStch = pRSCRR


texts: Local Network Hyperlinks in the New ArcGIS Online Map Viewer

texts:
So this always worked in the old map viewer. I have a local link:
\\server\path\path2\webpage.html

I could create a custom link in the old map viewer using pop ups like this:
file://server/path/path2/webpage{attribute}.html

But when I enter this now into a text at the bottom of the pop up, it simply opens a new tab with my same map viewer? I've tried some other options:
file:///server\path\path2\webpage{attribute}.html

//server\path\path2\webpage{attribute}.html

file://Z:/path/path2/webpage{attribute}.html

Nothing seems to be working, what am I missing?


texts: Can county level info be brought into a map?

texts:
I have a csv file of Clovis projectile points that were recorded only with the county in which they were found, no coordinates at all, no shapefiles. Is there a way to bring these into a state map with counties to show county level finds?

I have a geocoded county outline set for VA. Imported with no problems. I have geocoded site locations for VA. Imported with no problems. Now I have 920 Clovis spear points that were recorded to the county level only and which are not geocoded in anyway, except that the county is listed. I asked the question here and was directed to MMGIS and got the same error message that 2 other folks got so that didn't work. Then tried to use the vector join. That brought in only some of the info from the Clovis csv file I wanted and then only up to the number of counties in VA (105). So how do I do this. The ArcGIS folks can do it but can QGIS do so and if so, can someone give this newbie step by step instructions as I have tried dozens of combinations to no effect that is useful. Thanks


texts: Increasing spatial resolution of Landsat MSS and TM images?

texts:
I am trying to do a timeseries analysis of morphological change in the coastal zone using images from Landsat 1 MSS, Landsat 5 TM, Landsat 7 EMT+ and Landsat 8 OLI.

My problem is that although I can use pansharpening to increase the resolution of Landsat 7 and 8 to 15 m, Landsat 1 and 5 do not have a panchromatic band to allow this and their resolutions at 60m and 30m respectively is too low to accurately map changes.

My question is: is there a technique to increase the spatial resolution of TM and MSS images in ArcGIS, GRASS or QGIS?