texts: Using Z and M feature geometry to create line graph in ArcPy/Python?

texts:
I am a Python (v2.6.5) noob trying to plot a series of 3D polylines into graphs. So far I've come up with:

    # Import system modules
    import arcpy, os, sys, string
    from arcpy import env

    print "Modules imported."

    # Set environment settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = r"X:\HaulRoad\SpatialData"
    arcpy.env.scratchWorkspace = r"X:\HaulRoad\SpatialData"

    print "Workspaces set."

    # Set local variables
    infc = "\HaulRd.gdb\Treatment\XS_2009BEBRklnTerr_interpZ_Rte_isect"
    graph_template = r"\XS\XS_Seg02.55.grf"  # template graph originally created with 3d Analyst profile tool, customized in Advanced Properties, then exported to grf format

    print "Local variables set."

    #create list of fields of interest from FC or table of interest
    fields = ['SegID','STA_calc','shape.Z','shape.M']

    #create empty list for cursor to populate
    list = []

    print "Table and empty list created."

    # use search cursor to get field value for a given record
    rows = arcpy.SearchCursor(infc, "", "", "SegID; STA_calc")
    for row in rows:
        list.append(row.SegID)
        list.append(row.STA_calc)

    del row, rows

    print "Rows appended to temporary table.  List deleted."

    #remove duplicates from list
    list = dict.fromkeys(list)
    list = list.keys()

    print "Duplicates removed."

    #create a temporary memory variable
    memoryFC = "in_memory" + "\\" + "virtualFC"
    print "Memory Feature created."

    for n in list:
        arcpy.TableSelect_analysis(infc, memoryFC, "STA_calc = " + str(n))
        out_Seg = fields[0]
        out_STA = fields[1]
        out_graph_name = n
        out_graph_pdf = r"\XS\Script\XS_chart_Seg" + str(out_Seg) + str(out_STA) + ".pdf"
        graph_data = memoryFC

        # Create temporary feature layer
        arcpy.MakeFeatureLayer_management(infc, "XS_lyr")

        # Create the graph from temporary feature layer
        graph = arcpy.Graph()

        # Specify the title of the Graph
        graph.graphPropsGeneral.title = "Segment " + out_Seg

        # Specify the subtitle of the Graph
        graph.graphPropsGeneral.subtitle = "Station " + out_STA

        # Specify the title of the left axis
        graph.graphAxis[0].title = "Elevation (ft)"

        # Specify the title of the bottom axis
        graph.graphAxis[2].title = "Station (ft)"

        # Add a vertical bar series to the graph
        graph.addSeriesLineVertical("XS_lyr", shape.Z, shape.M)

        # Output a graph, which is created in-memory
        arcpy.MakeGraph_management(graph_template, graph, out_graph_name)

        # Save the graph as an PDF
        arcpy.SaveGraph_management(out_graph_name, out_graph_pdf, "MAINTAIN_ASPECT_RATIO", 800, 600)

    #clean in-memory
    arcpy.Delete_management("in_memory")

    print "PDFs created and memory cleaned."

I get an error in line 82 where I am adding the vertical line series.  I assume the problem is that I am trying to plot values based on feature geometry as opposed to values in the attribute table.

Is this possible without some intermediate conversion (e.g. converting vertices to points)?

The source data is a polyline feature class with Z and M values in an Arc 10.0 SP4 file geodatabase.

My overall intent is communciated in an earlier post:
Creating dynamic chart titles in ArcMap?
I was unsuccessful in my attempts to perform from within Arc.

error message I receive in IDLE follows:
        Traceback (most recent call last):
          File "C:\temp\MakeGraphTest_v100_20140616.py", line 82, in
            graph.addSeriesLineVertical("XS_lyr", shape.Z, shape.M)
        NameError: name 'shape' is not defined


texts: Label every polygon in Geoserver multipolygon

texts:
I want to label all areas in a multipolygon in Geoserver using SLD.
I have a map with two or three areas, but the label is only visible on the largest one. See attached images; the first image shows the map as a whole, the second image is zoomed in on the "northernmost part".

In Qgis there is a feature called Label every part of multi-part features. Is there something similar to this in Geoserver?

I've tried :

<VendorOption name="goodnessOfFit">-1</VendorOption>
<VendorOption name="conflictResolution">false</VendorOption>

among other sld commands.


texts:
Trying to get pandas to import, but I'm getting what looks like an error caused by a failed dependency of the version of my Esri-provided numpy's compile, based on this stackoverflow posting. Here's what I get.

>>> import pandas
numpy.dtype has the wrong size, try recompiling
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python27\ArcGIS10.2\lib\site-packages\pandas\__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
  File "numpy.pxd", line 157, in init pandas.hashtable (pandas\hashtable.c:22315)
ValueError: numpy.dtype has the wrong size, try recompiling

I check my numpy version:

>>> import numpy
>>> numpy.version.full_version
'1.6.1'

Based on this, I believe that this is the right version of numpy for the version of pandas I'm using (tried 13.1, 14.0, and 14.1).

I'm running the standard ESRI-shipped python for ArcGIS 10.2 (Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32).

>>> import arcpy
>>> arcpy.__file__
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\arcpy\\arcpy\\__init__.py'

Has anyone succeeded in getting pandas going this way or have ideas on what's wrong with my environment?

Should I update my numpy, which is supposed to be backwards compatible (according to user333700's text at the bottom of the stackoverflow posting), or is that likely to break my ArcGIS functionality?


texts: Removing Plugin Repository sites that fail to load

texts:
New here & to QGIS. Loading several plugins I noted that several sites seem to not load ( example "catais.org" or "GIS-LAB.info". Cannot actually find this site(s), I assume they are defunct, however in browsing I note that some sites are up/down for whatever reasons. Suggestions on removing or repopulating/refreshing the repositories list.

Terence

QGIS 1.8.0
OS X 10.8.3


texts:
Before I reinvent the wheel for a 1-time calculation....
Does there exist an online Calculator, which'll accept point upload (250-1000) and in return provide me (maybe based on OSM data) with a route or CP-sorted point listing ?


texts: How to export raster file with a known color ramp?

texts:
I have a single band raster file( that it is Grayscale) and I changed its symbology to unique value with a Known color ramp.

How can I save this raster file with its color ramp (to .tiff) so that it is displayed with that color ramp outside of ArcMap (in any picture viewer software)?


texts: How do I create an inverse-distance weighted attribute mean map?

texts:
An attribute-weighted heatmap applies inverse distance weighting to each point in a set proximity and adds them all up. I am searching for a tool in QGIS or another software that allows me to do the same thing using mean values.

Ex: in an area on a map with 2 nearby data points, one is 4 units away with value 10, the other is 1 unit away with value 40, the point will have value of (4/5)*40+(1/5)*10=32+2=34. This is a weighted average based on point distance, which would make it easier to interpret for my purposes.

I do not want to use an interpolation grid, and I do not want to use a mean grid since I want the result to be a geographically-moving average (ie: should visually look like a heatmap and not a grid).


texts: Automatically updating geometry attributes in QGIS without using Virtual Fields

texts:
I have a line layer and I computed the attribute "length" with the field calculator. After that, I changed the geometry of some lines with the editing toolbar. That means the values of "length" in the attribute table are not correct anymore. Is there an automatic way (or at least a quick way) to update the values of "length" to the correct actual length of the line geometries?
I know I could update the values using the field calculator. I also know I could use a virtual field. But I want to have the best out of these two options. I would like to have the automatic updates (like virtual fields) and the fact of having the correct values in the geodata itself instead of having these correct values only in my QGIS Project file (.qgz).
I observed that my coworkers do many mistakes using the field calculator, that's why I am looking for another solution.


texts: Load images into a multi-band raster in R?

texts:
I have a Landsat image with 11 bands. I need to run k means classification in R. But I do not need the whole of the image as my study area is much smaller. So I have created shapefile of the Region of Interest (ROI) in ArcGIS which specifically covers my study area.

How does one clip a raster image to the extent of a shapefile (here my ROI) in R?


texts: Repeat annotation labels for same feature on different data driven pages

texts:
I have an mxd with 29 data driven pages all at the same scale. I have the need to label hundreds of polygon features, so I converted the labels to annotation (stored in geodatabase and feature-linked) for a feature (stored in same geoDB) and am customizing their placement. What is the method for repeating annotation labels on adjacent data driven pages when the feature runs over the edge of the page to another page in layout view? I feel like I'm missing something obvious!

Also, some features do not have labels at all. I've already placed unplaced annotation, and when setting up the labeling in the original polygon feature class, I chose "repeat labels" and unchecked "remove duplicates". How would I label a feature currently without a label through editing the annotation feature class?

I'm using ArcMap 10.3.1 Desktop with advanced license.

UPDATE: I think I solved part I of this issue by selecting the edit arrow for annotation, clicking on the label I want to duplicate, right click, copy. Click in empty space, paste. Creates a new FID in the annotation feature class that is still feature-linked. Move to desired location.

Still wondering about placing a label on a feature without one by editing the annotation feature class. A janky fix has been to just place a label after hitting "Focus Data Frame", but it's obviously not feature-linked and I'm not satisfied with this workaround.


texts: A WMS layer fails to show at some scales

texts:
I am tring to overlay my WMS layer on Google but at a particular scale it doesn't show the data of my layer. What can be the problem?

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=2&amp;sensor=false"></script>
    <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript">
        var map;
        function init() {
            map = new OpenLayers.Map('map', { allOverlays: true });
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            var gmap = new OpenLayers.Layer.Google("Google Streets");
            var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://localhost:5555/geoserver/cite/wms",
            {
                layers: 'cite:view_test',
                transparent: true,
                projection: "EPSG:4326"
            });
            map.addLayers([gmap, wms]);
            map.zoomToMaxExtent();
        }
</script>
</head>
<body onload='init();'>
    <div id='map' style='width: 500px; height: 500px; background-color:Gray'>
</div>
</body>
</html>

I am new to Openlayers: can anyone help me?


texts: Reading Jp2 compression level using ArcPy?

texts:
Is the compression quality level used to create a JPEG2000 image stored somewhere inside the file, and how to read it?

I would like to know if my images where generated using a lossless compression or lossy, and if yes what was the level used?

I imagined a tag in the header would be present but I can't find it.

Can this be done in ArcPy?


texts: Is it possible to create a point within a Polygon (not a centroid)?

texts: Is it possible (without writing Python code - sorry I'm not a developer) to create a point layer from a polygon layer but ensure the point is within the polygon? The ftools centroid tool is cool but some centroids are created outside the polygon (i.e. irregular polygon). In ArcGIS there is a "Feature to Point" tool similar to the ftools 'polygon centroids' tool but has a checkbox to force the point to be within the polygon.


texts: Assigning costs to a road network : use raster or vector?

texts:
I have a road network in a PostGis database (db_routing). In another database (db_environment), I have some spatial features of the surrounding environment (trees as points and water bodies as polygons for example).

I would like to assign costs to my road segments depending on the surrounding environment. I envisage two possibilities:

through a raster: I can create a raster and each cell will have a cost depending on the features from db_environment it contains (trees density and presence or no of water for example). Then, I would have to give a cost to the road segments depending on the raster cells they intersect.
through a vector layer: I could run a proximity analysis around each of my road segments, by creating a buffer around it and looking at the features from db_environment contained in this buffer.

It seems to me that it would be easier to create a raster (by using simple mathematical additions to take the different cost into account, instead of performing spatial clips with a vector).

Do you have ideas on this, or examples of similar projects ?

Thanks in advance

Update
Some thoughts on the pros and cons of each method:

Raster

Advantages: Easy to add incrementally more and more cost factors by using simple mathematical operations
Disadvantages: Complex to choose the right pixel size, and to find a proper way to transfer this data to the road network vector

Vector

Advantages: Efficient to perform proximity analysis
Disadvantages: Bad representation for continuous data


texts: ArcMap, Network analyst data preparation

texts:
I have line feature class with pedestrian network ... and information about network parameters (surface type, surface quality, slope, etc. ... not in digital form now). I want to create network dataset for routing.
Is the only solution using them as attributes of line feature class (it means splitting lines into very short segments) or any other solution exists (something like linear referencing and dynamic segmentation)?


texts:
I'm adding a layer to an OpenLayers Map which includes data from GeoServer retrieved using WFS. The layer is created like following:

var saveStrategy = new OpenLayers.Strategy.Save();
var wfs = new OpenLayers.Layer.Vector("Editable Features", {
    strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
    projection: new OpenLayers.Projection("EPSG:26713"),
    protocol: new OpenLayers.Protocol.WFS({
        version: "1.1.0",
        url: "http://localhost/geodemo/geoserver/wfs",
        featureType: "LayerName",
        srsName: "EPSG:26713",
            featureNS: "http://www.openplans.org/MyNS",
        geometryName: "the_geom",
                            })
});

When sending WFS messages to GeoServer, the server could send errors (formatated as XML). How it is possible to be aware from these errors?

Thanks.


texts: How to outsource scanning and georeferencing maps?

texts:
We have some historical paper maps and we want to get them scanned and geo-referenced and ultimately make a seamless map for a particular time.  What vendors supply this service?  (I have found Fuzecore and DDS so far from a Google search.)  What experience have you had with them?  In general,

How does one go about evaluating these vendors--what criteria should be used to assess the quality, timeliness, and price of their work?
What kinds of issues might arise in outsourcing this?  What are the risks?

To keep this thread within the StackExchange format, please provide objective and well-supported answers only.


texts: How do I filter large set of points (481,308) in QGIS attribute table by fixing the extents(Lat Long values)

texts:
I have a large set of points (481,308) in single QGIS layer with the attribute table(ID, LAT, LONG,..ETC). But I only need points which fall inside particular area or polygon, I have fixed the extents of the polygon, as shown below:

1)North of Point1 12.978649°   77 .603701°

2)East of point1     12.952451°    77.633003°

3)East of point2     12.930359°    77.647210°

4)South of point2   12.893661°   77.636665°

5)West of point2    12.906764°   77.597081°

6)West of point1   12.952262°    77.577471°

What expression should I use to filter out points which come inside my polygon area?


texts: How to set my own QDialog Form instead QGIS QgsAttributeForm

texts:
I'm working in a QGIS plugin which its functionality is to facilitate the creation of custom attribute forms with complex logic to QGIS users without python knowledge. In order to do this, the user has to write a custom .json file with all data of layers, attributes, custom rules between widgets, form widgets etc. This file is loaded by a parser and the result is a QgsVectorLayer and a QDialog (A form) with the correct widgets structure and rules (Similar to QGIS form). Then, the layer is added to QGIS and the dialog is opened when user uses my own custom 'Add feature' tool.
I would like to know if I can replace the default QgsAttributeForm with my own QDialog Form so that I can use all QGIS tools (addFeature, editFeature...) with my own dialog instead of the QGIS autogenerated form. If not I have to duplicate all digitizing and editing tools because all of them open the autogenerated default QGIS form.


texts: How to get the LineStrings from a MultiLineString

texts:
I was wondering if there is a way I can extract the LineStrings from a MultiLinestring object.
What I am really trying to do is look into a MultiLineString  and see if I have a certain LineString. I have been looking everywhere, and the only method that sounds like it can do something of that sort is contains(Geometry g)  but that does not do the trick.


texts: Extracting features from High Resolution mosaic (tiff)?

texts:
I have a very high resolution map(tif) i.e. drone image as shown in the image.

Is there any way we could extract features including building and road etc. from high resolution image?


texts:
I'm new to QGIS, using v 3.18.  I would like to write an action that is triggered when a user inserts a point on a layer.  For example.  I have a point layer named testLayer.  In the properties dialog, there is an action list.  If I select the + button to add an action, I can define some python that can be applied to the actions scopes.  If the user is inserting a point, the action will be called.  How do I get the feature that is being added to the layer?  Specifically on the testLayer, there is an attribute called NodeId.  I would like to:

Grab the feature
Get the row number
Create the NodeId (similar to using the expression with lpad("id",3, '0'))
Use the feature to get a QgsPointXY for the point
Create a line on another layer that has a fromNode and toNode column based on the NodeId and QgsPointXY

I can't do any of that without knowing which feature is being added to the layer.


texts: C# & Mapscript - Setting Environment Variables At Runtime

texts:
I am working on an application that makes use of the c# Mapscript bindings.  When I manually set and/or append to the GDAL_DATA, GDAL_DRIVER_PATH, PROJ_LIB, and PATH environment variables - the application code works beautifully.

For a number of reasons, I am trying to avoid permanently setting/changing these environment variables.  I am under the impression that by using the .NET frameworks Environment.SetEnvironmentVariable method, that I should be able to set these environment variables at runtime for the current process.

This approach seems to work in some capacity - as the mapscript objects initialize properly (i.e., I dont get PInvoke errors...etc). In my code snippet below, I get an error at map.draw() complaining about GDAL_DATA and gcs.csv.

// add some new environment vars
// TODO check if they may already exist - in which case append to
Environment.SetEnvironmentVariable("GDAL_DATA",MY_GDAL_DATA_PATH)
Environment.SetEnvironmentVariable("GDAL_DRIVER_PATH",MY_GDAL_DRIVER_PATH)
Environment.SetEnvironmentVariable("PROJ_LIB",MY_PROJ_LIB_PATH)

// append to existing PATH variable
string pathVariable = Environment.GetEnvironmentVariable("PATH")
pathVariable += MY_PATH_VARS
Environment.SetEnvironmentVariable("PATH",MY_PATH_VARS)

mapObj map = new mapObj(transmitterMapFile);
map.setSize(request.Width, request.Height);
map.setExtent(extent[0], extent[1], extent[2], extent[3]);

imageObj img = map.draw();

Does anyone see something wrong with this approach?  Or is there a better way to set these variables at runtime?


texts: Is there a free way to convert DGN v8i to... any other format?

texts:
(Update: We have postgis and ogr2ogr (etc.) but not any ESRI or Microstation software.)

I just got DGN v8i files and I can't find any free way to convert them to... anything else.

FME and AutoDWG are not free.

OpenDGNViewer (aka DGNDirect) appears to be able to view but not export.

I really would be happy with any other format:

DGN v7
SHP
DWG
?

Crazy how difficult it seems to be to work with what is apparently a standard in many municipalities.


texts: maximum circle inside an irregular polygon from a random point

texts:
I am trying to work out an algorithm for creating the maximum radius circle within an irregular polygon (a census tract) based on a given center of the circle.

The motivation for this is to obscure the location of an individual who has answered a survey. Their actual location is known, however it needs to be obscured in the analysis, in order to release the data to the public, for further analysis.

We want to have a donut shaped polygon for each survey respondent that has some inside radius (easy), bounded by an outside radius that is constrained by the census tract that the individual is in. Their final location will be randomly placed within the donut polygon.

I have seen many answers to similar questions here, but not this specific one, which in this case starts with a SPECIFIC location.

Once we have the donut established, we can randomize the location of the individual response within the polygon. That's relatively easy...

Thanks for your ideas, mine so far have seemed pretty brute force, and computationally "expensive" or inefficient...


texts: Is there a way to make the interface of QGIS 2.0 darker in Ubuntu. I would prefer a darker theme closer to the Ubuntu Ambience style. Or is there a way to create personal themes?


texts:
Does LiDAR data suffer from the speckle noise like the SAR images and ultrasound cardiac images I'm used to?

I think speckle noise is inherent to all active sensors, but I'm not sure for LiDAR because all the freely-accessible elevation images for the UK I worked with have a high-resolution (25cm, 50cm, 1m, 2m). They might have gone through a preprocessing,  and anyway if the speckle is there it's really hard to spot.


texts:
Do i need to purchase the QGIS license for commercial use? Can i use the QGIS commercially in our project?
https://qgisenterprise.com/en/offering/packages/
I found the few variants of QGIS but the price is not listed there, please guide me to purchase these variants.


texts:
I am converting some NetCDF files from Float32 to either 16bit or 8bit to safe space on a server.
Since I Originally created these NetCDF using GeoTIFF´s this is where I apply the conversion before adding them into a new NetCDF file. This works without any problem.

The issue I have is that I need to add a scalefactor and offset using the ncatted unidata command.
As far as I understand to add scale and offset information the following commands are used:

ncatted -O scale_factor,Variable,c,f,Value foo.nc
ncatted -O add_offset,Variable,c,f,Value foo.nc

However it just shows me the help or cheatsheet when I run it.

Am I missing something?


texts: Add symbology to raster - color ramp with manual breaks - in ArcGIS Pro

texts:
I would like to add symbology to my raster. It is a single band raster. I have a color scheme already imported in my ArcGIS Pro Project. I would like to have a color ramp but with breaks manually fixed.

So in Symbology, I choose stretch symbology type. I select my color scheme.
Then I would like to manually fix some breaks. How can I do that ?

To be really clear, I want a color ramp. Therefore the Classify symbology with « manual interval » method, in which I can fix my class breaks, does not work.

What I would like is equivalent to the QGIS method : singleband pseudocolor with linear interpolation.Then I manually fix my breaks (or use a file text).

I join screenshots of my maps :

1)   in QGIS with the correct symbology

2)  In ArcGIS with the classify method.

[

As you can see the legends are the same but in QGIS it is an interpolation, while in ArcGIS there are only the 7 colors.

I am using ArcGIS Pro 2.2.0 and QGIS 3.

How can I do this?

EDIT
It seems that I need this :
https://pro.arcgis.com/fr/pro-app/help/mapping/layer-properties/color-schemes.htm
It says to use the "Color scheme" choice in Primary symbology. However I do not have this option...

EDIT 2
I upgraded to ArcGIS Pro 2.5, but the "Color scheme" still does not appear. There are more options in the stretch symbology but none of them allows manual breaks.


texts: Placing road labels only at map edges and road intersections in QGIS

texts:
I want to place road labels only near the map edges, and where roads intersect - as depicted by the red X's in the image.

Background: I've seen the military do that in their topo maps, and I think it's a very efficient and clean way of labelling roads (these will be the 'shield-like' symbols with the route number in them) - maybe it's possible by using some kind of expression that detects the intersections between roads and map edges?


texts: Project large collection of shapely object to different CRS

texts:
What is the most efficient way of projecting several thousands of polygons and multipolygons to a different CRS in Python? I have found that looping over the polygons and reprojecting them one by one is rather slow. Ideally, for a thousand polygons, this operation shouldn't take longer than 1 second.

Currently, I am using an approach where I extract all coordinates into a single numpy array, convert them, and split the results back up into polygons. While this is quite fast, right now it doesn't handle polygons with interiors or multipolygons. I could extend this approach, but before doing so, I was wondering whether I am overlooking something that is a bit more manageable.


texts: Improve visual appearance of line of points

texts:
Arcgis 10.5

I have a point shape representing a river system. It is points, not a line, because of the mathematical calculations I had to do beforehand. In close it looks like this (the actual river is there as a line shape too).

Now, I need to visualize the different values of the points. I made several categories with colors green to red. But as the next picture shows, the points are overlapping and making it very difficult to see anything if zoomed to full extent.
I tried different sizes and different symbols. Nothing really works.

Any ideas what I could do? Joining it to the line would be ideal, but I dont know how, since its one big riverline and the point-values are not projected correctly to the respective part of the river.


texts:
I am new to R and I am looking for a little help. I have a polygonized raster image and I want to get the middle coordinate of the image. I have tried gCentroid
but there I get a list of multiple coordinates... how do I get just the middle one?


texts: Mosaic To New Raster - Raster Cells Shift

texts:
I have wind raster datasets for the U.S. that are organized by state and I would like to merge these datasets to get one map of the whole U.S.

I am new to using ArcGIS and through some research I found out that I can do this with the Mosaic To New Raster tool.

The problem that I'm running into is that even though I use the same projection, the raster cells seem to "shift" after having merged them. This can be seen in the pictures I uploaded!

Border of New Hampshire and Maine Original

What seems to be the problem here?
Is the Mosaic To New Raster tool the right choice?
I used "BLEND" as the mosaic operator.


texts:
I'd like to know what the difference is between .XXn RINEX files as published by navigation stations such as the Brussels one, bruxXXXX.XXn, and the broadcast .XXn files. I'm asking this because when I try to use the .XXo station files together with brdc .XXn files, the rtklib tool won't give me anything (what it calls solutions, i.e. .pos files containing actual coordinates), while when I record the same .XXo files using my smartphone, I can freely use the brdc .XXn files to obtain my phone's coordinates.
Is there any sort of clarification or a link to a resource explaining these things?


texts: How to convert KMZ geometry collection to SHP

texts:
I try to open and convert to shape a KMZ with Qgis, but impossible !
When I open it, I have this :

I select "Vigne" with 35 entities then OK. But there isn't entity displayed. In layer panel I have this weird icon.

So I decide to save it in shape, maybe it will work... But Qgis return me this message :

Somebody have an idea, how to read and convert this kind of KMZ ?


texts: CAD vs GIS projection file text - result is a "custom" projection in ArcGIS Desktop?

texts:
Do the differences between these numbers below (i.e. Standard_Parallel_1 & _2) matter at all when importing a .shp file exported from AutoCAD.  We were thinking we used to just import .shp files and they would reflect the right WA SPN projection upon import, but now GIS is calling anything we import from CAD a "Custom" projection, presumably because ArcMap cannot relate to the way the .prj file is written from CAD.  We can simply c/p the text from the GIS .prj into the CAD exported .prj - but people are asking me if it matters -

can anyone explain the differences in these nos. and whether we should be concerned or not?

GIS

  PROJCS["NAD_1983_StatePlane_Washington_North_FIPS_4601_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.8333333333333],PARAMETER["Standard_Parallel_1",47.5],PARAMETER["Standard_Parallel_2",48.73333333333333],PARAMETER["Latitude_Of_Origin",47.0],UNIT["Foot_US",0.3048006096012192]]

CAD (Map 3D)

  PROJCS["NAD_1983_StatePlane_Washington_North_FIPS_4601_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1640416.667],PARAMETER["False_Northing",0.000],PARAMETER["Central_Meridian",-120.83333333333300],PARAMETER["Latitude_Of_Origin",47.00000000000000],PARAMETER["Standard_Parallel_1",48.73333333333333],PARAMETER["Standard_Parallel_2",47.50000000000000],UNIT["Foot_US",0.30480060960122]]


texts: qgis field calculator truncates column names with more than 10 characters

texts:
I am currently working with the field calculator as I want to copy the values from one attribut "join_id" to the attribut "edgeid" within one layerfile. The attribut structure looks like following:

The way I realize this with the field calculator is this:

So far, so good. The values are successfully copied into the edgeid attribut now. But strangely, in the output file of this calculation, all column names which exceed the number of 10 characters, are truncated to 10 characters. Is there a possible way to increase this limitation without changing the name manually afterwards in the properties?
In the following, you can see the truncated column names of the outputfile of the calculation:

Any suggestions?


texts: I'm working on a script in ArcMap 10.1 that takes a screenshot and I need to know how to extinguish (turn off) a layer in my table of contents.


texts:
Any idea what this error means?

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

I get this error when I am trying to save a ROI in QGIS (within the SPC plugin).

I have uploaded a JPG image which comes from my iPhone so it's not georeferenced, and it does not need to be, I just need to classify the image and get an area count on one class.

When asked for a CRS I selected wgs84 since it's the default. I am using the tool box since I do not use python because I am not familiar with programming.

Here is the message I am getting:

Traceback (most recent call last):
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\classificationdock\classificationdock.py", line 2240, in saveROItoShapefile
            cfg.utls.calculateSignature(cfg.shpLay, cfg.rstrNm, [self.ROILastID], cfg.ROIMacroID, cfg.ROIMacroClassInfo, cfg.ROIID, cfg.ROIInfo, 50, 40, "No", "No", UID)
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 1690, in calculateSignature
            oList = cfg.utls.rasterToBands(tS, cfg.tmpDir, None, "No", cfg.bndSetMultAddFactorsList)
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 3243, in rasterToBands
            iBC = cfg.utls.getNumberBandRaster(rasterPath)
          File "C:/Users/Nahun Leiva/.qgis2/python/plugins\SemiAutomaticClassificationPlugin\core\utils.py", line 4840, in getNumberBandRaster
            number = rD.RasterCount
        AttributeError: 'NoneType' object has no attribute 'RasterCoun


texts: QGIS python custom properties for labeling

texts:
I have some code that is working great for adding labels to my vector layers:

    layer.setCustomProperty("labeling", "pal")
    layer.setCustomProperty("labeling/enabled", "true")
    layer.setCustomProperty("labeling/fontFamily", "Noto Sans")
    layer.setCustomProperty("labeling/fontSize", "10")
    layer.setCustomProperty("labeling/isExpression", True)
    layer.setCustomProperty("labeling/fieldName", " concat( name_nl, '\\n', name_de )")
    layer.setCustomProperty("labeling/placement", "0")

I found most of the property names, values through searches in forums/web.  As you can see the label is a multi-line concatenation of two fields.  I would want the text to be left aligned.  This is possible in the GUI, but I seem unable to find the property name that is needed for text alignment.  There is API documentation about MultiLineAlignment etc. but I cannot figure out what to put extra here, I've tried stuff like:

    layer.setCustomProperty("labeling/multiLineAlignment", "0" )
    layer.setCustomProperty("labeling/multiLineAlign", "0" )
    layer.setCustomProperty("labeling/alignment", "center" )

with various values, names etc. nothing seems to work for the text alignment.  The API docs in http://geoapis.sourcepole.com/qgispyapi/qgspallayersettings#QgsPalLayerSettings.MultiLineAlign

seem to suggest there is something.

Does anyone know that is needed?  Or where these property names labeling/xyz are listed in a documentation?


texts:
When the cell's width of an attribute table containing text/string is modified to a number of mm, it automatically adds a line break on the last word.

Example

The red ellipse shows the last word

Steps

Open Print Composer;
Add Attribute Table;
In "Item properties" tab, click "Attributes..." button and change the cell's width from Automatic to 100mm for example;

Is there a way to fix this issue? Maybe with sql?

Observations

This problem doesn't seem related to the layer datatype (shapefile, geopackage, ...)


texts:
I have a problem I need to figure out but don't have idea how.
I have two separate directories with shapefiles. In dir 1. shapefile names are like 1.shp till 1000.shp. And in dir 2 W1.shp till W1000.shp. And I need arcpy script that will create pairs and process every pair. So for example 1.shp goes with W1.shp and then create intersection and save it. And every pair in the same way. Could you please help how to do that?


texts: Counting MODIS burned area pixels inside a grid in GEE

texts:
I am using MCD64A1.006 MODIS Burned Area Monthly Global 500m product in GEE and trying to count the number of pixels with a value inside of each grid cell in a vector grid I created.

// load MCD64A1 Version 6 Burned Area

    var dataset = ee.ImageCollection(imageCollection)
                      .filter(ee.Filter.date('2018-01-01', '2018-12-31'))
                      .filterBounds(border);
    var burnedArea = dataset.select('BurnDate')

// add grid

Map.addLayer(grid, {color: 'white'}, '1degree grid', true);

// count pixels

var pixC = burnedArea.reduceRegion({
  reducer: ee.Reducer.count(),
  geometry: grid,
  scale: 500,
  maxPixels: 1e9
});

print(pixC)

a link to the grid asset: https://code.earthengine.google.com/?asset=users/stavo/Vectorgrid_1degree

I assumed that if I provide a multipolygon as a geometry for the reducer I will get a separate result for each grid cell. However, I receive a count of all existing pixels in all cells.

Is there a way to get a count for each cell?


texts:
I have a canvas within a QWidget (also tried QFrame) which uses a stylesheet:

border: 2px solid black;
border-radius: 10px;

The stylesheet looks great in the designer, but as soon as I put the canvas into the widget it does not adhere to the round frame design. The canvas overlaps the corners and remains rectangular.
If I increase the thickness/radius to 20px it is thick enough to prevent full overlap, but instead of getting a nice curve the inside of the corners become square due to the canvas overlap.

Basically I need a way to clip the canvas (QGraphicsView) with a rounded corner rectangle OR an inventive way to use a QGridLayout and overlap another widget to produce the rounded frame effect.


texts: Change label size in OpenLayers 3 from QGIS Plugin output

texts:
I am working on OpenLayers 3 at the moment and my aim is to provide an offline map.

At the moment I am trying to get GeoJSON files offline. For that I am using the QGIS Plugin that exports the Shapefiles from QGIS into an OpenLayers Web Page. My problem is that the labels for the roads keep the same size when I am zooming in and out which leads to a messy output.

Does anyone know how to change it? I found some pages where it was proposed to use map.getscale() but I wasn't able to embedd it into the code.

I guess this is the part of the code which needs to be changed:

                var styleCache_roads={}
                var style_roads = function(feature, resolution){
                    var value = ""
                    var style = [ new ol.style.Style({
                        stroke: new ol.style.Stroke({color: "rgba(76,38,0,1.0)", lineDash: null, width: 1})
                    })
                    ,new ol.style.Style({
                        stroke: new ol.style.Stroke({color: "rgba(255,206,128,1.0)", lineDash: null, width: 1})
                    })
                    ];
                    var labelText = feature.get("name");
                    var key = value + "_" + labelText

                    if (!styleCache_roads[key]){
                        var text = new ol.style.Text({
                              font: '9.0px Calibri,sans-serif',
                              text: labelText,
                              fill: new ol.style.Fill({
                                color: "rgba(0, 0, 0, 255)"
                              }),
                            });
                        styleCache_roads[key] = new ol.style.Style({"text": text});
                    }
                    var allStyles = [styleCache_roads[key]];
                    allStyles.push.apply(allStyles, style);
                    return allStyles;
                };


texts:
I have a polygon feature class and I want to trace (select with a polygon) a picture that is solely comprised of a couple of interlocking letters.

In ArcMap when I would do this I would simply drag the picture into the data frame and I could adjust the sized and position of it, trace, export, delete the picture and have a brand new layer in the shape that I wanted.

I don't see a way to do this in QGIS, when I drag a photo in I am then prompted to define the new layer's coordinate system. It doesn't seem to recognize that it is only a picture. Anyone know how I can simply drag in a picture to QGIS to trace it?


texts:
Is there a way to merge all the layers with same name using python script in QGIS in the following list;

names = [layer.name() for layer in QgsMapLayerRegistry.instance().mapLayers().values()]
print names

Output:

[u'Pois', u'Pois', u'Pois', u'Pois', u'Pois', u'Pois', u'Pois', u'Pois', u'Pois']

So that when I list my current mapLayers, all I get is one layer with all the other layers merged into it.


texts: Create point from line table using MapInfo

texts:
I need to turn a line tab file into a point tab file using MapInfo (v15.2 x64). The lines represent routes, and I want the point table to have a point for each node in the line table, and a column holding the order it falls in the route.
The Point attribute table will look something like this:

Route,Latitude,Longitude,Order
A,12.314,-101.23,1
A,12.32,-101.33,2
A,12.41,-101.43,3

Is there a way to do this in the MapInfo UI?


texts: Using Digital Certificates using OpenLayers?

texts:
I'm developing a project using JavaScript, PHP and OpenLayers. A lot of maps are loaded using and HTTPS connection against an external OGC server.

When I try to load the map using HTTPS, they doesn't load (instead of, they show me an "Error loading the map, try again later").

I think that the problem is because of Digital Certificate. If I load directly from the server (using a WMS call) like this (look the last parameter):

https://serverurl/ogc/wms?service=WMS&version=1.1.0&request=GetMap&layers=ms1:lp_anual_250&styles=&bbox=205125.0,3150125.0,234875.0,3199875.0&width=306&height=512&srs=EPSG:4326&format=application/openlayers

The browser ask me for my authorization to see it. If I accept the Digital Certificate, I can see the map. After that, and because of my browser now accepts the certificate, I can see my own map from my own application.

I'm creating the layer like this:

activeLayer = new OpenLayers.Layer.WMS(
               layername, layerurl,
               {
                  width: varmap.size.w,
                  srs: varmap.projection,
                  layers: layername,
                  height: varmap.size.h,
                  styles: style,
                  format: 'image/png'
               }
               );
varmap.addLayer(activeLayer);

Is there any way to ask for the Digital Certificate manually when the user access to my web?

I'm using CodeIgniter to load views.


texts: Update layer groups symbology from a .lyr

texts:
I'm searching for a way to update layer symbology. I have around 50 mxd which have all the same TOC made of 2 dataframes (one .lyr for each) containing numerous layers / layer groups. The data is essentially shapefiles, most of them are in different folder/disks. The file organization technique is something that I would do differently if it was my data, but I have to deal with it as it is.

I don't wan't to import the .lyr files and delete the old content in each of the maps, because I would have to re-do the legend each time (and I don't want to convert the legend to graphics for obvious reasons...).

So, does anyone know a script or anything else that could help me to link or apply a .lyr symbology to a bunch layers/layer groups in multiple mxd?


texts: Simplified flood "model" / estimation from elevation data

texts:
The goal is to present an estimation of potential flooded area. But still keeping it simple.
I know this will not be accurate. The question is:

will it be good enough for at gestimate / rough guideline? I am aware this is a crude method.

I am using QGIS.
Output
I want to create flood area polygons of n m^3 of water. e.g. polygons showing the max. area that will be flooded if xx m^3 water is released.
Input

raster DEM
m^3 of water to be released

Process

convert DEM raster layer to polygons based on elevation (in steps on 1m because of the DEM resolution).
set the area of the polygons as an attribute
create an volume attribute (area * 1m^3) to get an estimate of how much water the area will hold.
optionally rescaling the polygons to get estimations for volumes lesser than the polygon but greater than the "inner" smaller polygon (e.g. in fractions of 10).


texts: Can I clip raster maps by vector boundaries on fly while serving them via geoserver?

texts:
I have a lot of georeferenced raster topographic map sheets which contain not only map itself, but some sketch elements like legends, stamps outside the map frame. I want to make seamless coverage from these rasters, which will be served by geoserver WMS. But I don't want to make two copies of these rasters originals and clipped by map frame that produce seamless coverage.So is there any way in geoserver to clip these rasters by map frame boundary on fly like in ArcGIS mosaic catalog?
  Thanks


texts: How to create unique value field in Intramaps Roam for

texts:
Is there a way to create a field (eg. text widget) that only accepts unique values (eg. feature_ID).

May be by adding some python logic, checking if the entered value already exists in the attribute table of the layer...

For instance, if I have a "feature_ID" text widget in my form, it shouldn't be possible to

Any ideas?


texts:
Suppose I have an online store in San Francisco, California. Most of my customers are from the Bay Area, but I do have some customers from the rest of the U.S.

For my analytics platform, I want to build a map that initially shows my customers in the Bay Area (one dot for each customer at their residential address). Then it will gradually and continuously zoom out to show all the customers in the entire U.S.

When it has completely zoomed out, the center of the map should be the center of the U.S. (usually thought to be in Kansas).

What software can I use for this?

I don't mind coding something up from scratch (e.g. from Javascript) if there isn't anything prebuilt in other software packages e.g. ArcGIS.


texts: I am trying to plot dates and values from carto.js ( using the sql API) into highchart.js . this example uses the following data structure [Date.UTC(2013,5,5),0.7638] ,but  how can I covert the the data returned after the sql request into this data structure [Date.UTC(2013,5,5),0.7638] ?? Any idea??


texts: How to know Who is reconciling the Version to DEFAULT(Parent) in Geodatabase

texts: We have Public DEFAULT version and working Versions(Child) have been created directly from DEFAULT. We have also provided Reconcile-Post Option to group of Users placed at separate locations. Hence sometimes when I go ahead with reconciling my version It says some one else is reconciling the version, Can I identify which USER is reconciling on Database at that moment.


texts: How to export JPEG with a geoprocessing Service

texts:
So I'm trying to have users export a JPEG of an area.
I'm just in the beginning stages of doing this. I'm stuck on why the features from the MXD are not showing up on the output of the GP tool.
I created a MXD with counties on it.
Published the MXD to ArcGIS Server with the counties on it.
Registered the layers in the MXD to the Server.
I created a simple Python script that exports the MXD into a JPEG.
Works on Local Machine.
Published it to ArcGIS Server.
When running the GP Service in WAB it only exports the MXD with no layers in it.
What am I missing here? I don't seem to have any features on the exported JPEG. It's just blank.
Python code:
import arcpy, os, zipfile, shutil, urllib2

arcpy.env.overwriteOutput = True
outFolder = arcpy.env.scratchFolder

jpgFile = os.path.join(arcpy.env.scratchFolder, "test" +".jpg")
outPutLocation = arcpy.SetParameterAsText(0, jpgFile )

mxdPath = r"xxxxxxxxxxxxxxx\xxxxxxx\xzxxxxxxx\xxx.mxd"

mxd = arcpy.mapping.MapDocument(mxdPath)
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
arcpy.mapping.ExportToJPEG(mxd, jpgFile)
arcpy.AddMessage(jpgFile)


texts: I am using mapbox:///mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v5 for the style of my map. But I need to change the Persian Gulf to Arabian Gulf. How can I edit or delete the Persian Gulf to Arabian Gulf? Is it possible to edit the dataset in Mapbox? Or only option for me is to provide my own dataset and style it.


texts:
Can you please let me know how we can set current map to Full Extent  using ESRI ArcPy?

import arcpy
import arcpy.mapping

# Set the Map to be Full Extent

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.Set-To-Full_Extent

like what the  is doing on main toolbar

in the ArcMap?


texts: Optimize nearest neighbor query on 70 million point cloud on SQL Server 2008

texts:
I have about 75 million records in a SQL Server 2008 R2 Express database. Each is a lat long corresponding to some value. The table has geography column. I am trying to find one nearest neighbor for a given latitude longitude (point). I already have a query with spatial index in place. But depending on where the record is in the database, say first quarter or last quarter, the query can take about from 3 to 30 seconds to find the nearest neighbor. I feel this can be optimized to give lot faster result by optimizing the query or spatial index.
Right now applied some the spatial index with default settings. Here is what my table and query looks like.

CREATE TABLE lidar(
    [id] [bigint] IDENTITY(1,1) NOT NULL,
    [POINTID] [int] NOT NULL,
    [GRID_CODE] [numeric](17, 8) NULL,
    [geom] [geography] NULL,
 CONSTRAINT [PK_lidar_1] PRIMARY KEY CLUSTERED ([id] ASC)
 WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF,
 ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

The spatial Index I am using:

CREATE SPATIAL INDEX [SPATIAL_lidar] ON [dbo].[lidar] ([geom]) USING  GEOGRAPHY_GRID
WITH (
GRIDS =(LEVEL_1 = MEDIUM,LEVEL_2 = MEDIUM,LEVEL_3 = MEDIUM,LEVEL_4 = MEDIUM),
CELLS_PER_OBJECT = 16, PAD_INDEX  = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF,
ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

Here is the Query I am using:

declare @ms_at geography = 'POINT (-95.66 30.04)';
select TOP(1) nearPoints.geom.STAsText()as latlon
from
(
select r.geom
from lidar r With(Index(SPATIAL_lidar))
where r.geom.STIntersects(@ms_at.STBuffer(1000)) = 1
) nearPoints

Here is a sample of lat longs in my database . to give an idea of accuracy and density. All the 70 million records are for one city (Lidar data).

POINT (-95.669434934023087 30.049513838913736)

Now this query gives me results as I described above, but I want to improve the performance as much as possible. My guess is by tweaking the default values of the spatial index I may be above to better optimize the performance. Any clues about this?

I tried varying the buffer from 10 to 1000 but with almost same results.

Also any other suggestions to improve the performance are welcome.

Here is the system I am using right now:

Windows 7 64bit Professional
Intel(R) Core(TM)2 Quad CPU    Q9650  @ 3.00GHz (4 CPUs), ~3.0GHz
Ram: 8 GB
NVIDIA GeForce 9500 GT


texts: Why is Iterate Field Values starting with 1 in ModelBuilder?

texts:
I have a set of States in the US and for each one I want to perform a set of tasks within ModelBuilder. When I type the state as a string parameter the model runs fine but I have to type in the State, then wait for the model to run, then type in the next state etc. I'd much rather just click go and have the model iterate through each of the State names in the list.

I created a CSV file with each of the state names and then set that as the input table in Iterate Field Values. For some reason, the first output is the number 1. This causes the model to crash because it relies on the State name in order to properly load files. For example, passing "Rhode_Island" into the model tells it to go to the Rhode Island folder on my computer and load the files.


texts:
I'm new to GIS.

I have some code that converts infrared images of Mars into thermal inertia maps, which are then stored as 2D numpy arrays. I've been saving these maps as hdf5 files but I'd really like to save them as raster images so that I can process them in QGIS. I've gone through multiple searches to find how to do this but with no luck. I've tried following the instructions in the tutorial at http://www.gis.usu.edu/~chrisg/python/ but the files I produce using his example code open as plain grey boxes when I import them to QGIS. I feel like if someone could suggest the simplest possible procedure to a simplified example of what I'd like to do then I might be able to make some progress. I have QGIS and GDAL, I'd be very happy to install other frameworks that anyone could recommend. I use Mac OS 10.7.

So if for example I have a numpy array of thermal inertia that looks like:

TI = ( (0.1, 0.2, 0.3, 0.4),
       (0.2, 0.3, 0.4, 0.5),
       (0.3, 0.4, 0.5, 0.6),
       (0.4, 0.5, 0.6, 0.7) )

And for each pixel I have the latitude and longitude:

lat = ( (10.0, 10.0, 10.0, 10.0),
        ( 9.5,  9.5,  9.5,  9.5),
        ( 9.0,  9.0,  9.0,  9.0),
        ( 8.5,  8.5,  8.5,  8.5) )
lon = ( (20.0, 20.5, 21.0, 21.5),
        (20.0, 20.5, 21.0, 21.5),
        (20.0, 20.5, 21.0, 21.5),
        (20.0, 20.5, 21.0, 21.5) )

Which procedure would people recommend to convert this data into a raster file that I can open in QGIS?


texts: Can PostGIS constrain a column to multipolygons and polygons?

texts:
I'm currently using PostGIS 1.5.3, but I will be upgrading to 2.0 soon. So please note any differences between the two versions that are relevant to the following questions.

Is it possible to create a column of the PostGIS geometry type that allows insertion of polygons and multipolygons but restricts insertion of other geometry types without manually modifying the constraint PostGIS generates when calling AddGeometryColumn?
Are there reasons not to do this? In particular, does PostGIS store any metadata that manually modifying the constraint might negatively impact? (I'm very new to PostGIS, so forgive me if the idea of PostGIS storing metadata is absurd.)
How significant is any overhead incurred by using multipolygons for everything?

I'm already aware of using ST_Multi to convert polygons into multipolygons before insertion, so if it's not possible or not a good idea, I'll do that.


texts: ArcGIS 10.4.1: Split Polygons by Polygons

texts:
I'm attempting to split a feature class of polygons by another set of polygons. The steps I've taken are synonymous with those here. I select the polygons I want to use as the split, and edit using the "split polygons" tool the feature class I am trying to split. I end up with funky results as I show in the following picture:

Wherein the red lines are the polygons I want to use to split the black polygons. The selected polygons are a single selected polygon I am using to demonstrate the funky result I am having. Additionally, some other polygons split like they should normally, though replicate themselves multiple times in the results.


texts: Improving performance of Ext Grid with GeoExt WMSCapabilitiesStore?

texts:
i have a question concerning the performance of the Ext Grid when loading big datasets from the GeoExt WMSCapabilitiesStore.

My application loads about 2500 layer records in an Ext Grid Panel. Once the records are loaded the application works very well, thanks to the Buffered Grid View plugin. But the problem is, that the initial load takes a very long time (about 10 seconds) which is not very responsive.

I understand that it takes quite a while to generate layer records from a XML file. But since it is not possible to receive WMS Capabilities as JSON (which is recommented for huge datasets in Ext), maybe there is an other way.
I assume that most of the time is used to provide an array from the XML request. It seems not very clever, that this process should be repeated every time someone opens the page, especially because the data is static.

Maybe there is some way to create an array with all the layer records once and load it into the grid, instead of transforming the data every time?


texts: Split and merge polygons by ID and Feature value in python or QGIS

texts:
I have a spatial dataset with two major columns: county_name and group_ID. The spatial polygons are represented by each county_name. Some counties share the same group_ID, while some counties contain more than one group_ID: i.e., I want to merge polygons with the same group_ID into one, and split the polygon which contains many group_ID (randomly or evenly) into sub-polygons with the same number of group_ID, and assign the group_ID feature to each split new sub-polygons.

I am very new to QGIS and spatial in python, is there a way to do both at the same time, or just part of that?


texts: Passing SLD as variable in parameter in OpenLayers 3?

texts:
I have a wms layer and I want to pass the sld variable in a parameter. I refer to

Styling WMS layers in OL3 as well but cannot solve.

The fiddle is

http://jsfiddle.net/shumanbaral/x6qwyuvk/1/.

Here,

tile_wms.getSource().updateParams({'styles':'', 'sld_body':_sld });

does not work. This is the basic for query and I a struck.


texts: How to convert several 'point' data to 'line' data?

texts:
I am using QGIS V3.4. I have over 1000 data points situated between a start and finish point expressing the Depth of coverage (DOC) of a pipeline. I need to identify the places along the pipeline which have a DOC lower than 0.6m to that which has coverage greater than 0.6m. the figure below identifies this, with grey data points identifying DOC greater than 0.6m and blue data points showing less than 0.6m.

it may look like a line (but a closer up image identifies its just multiple dots close together).

I have tried converting the point to line data by using the points to path tool in the toolbox. This creates however a solid line from the start point to the finish point (as seen below) and doesn't include any other points within its attribute table. Additionally, it looks like it is plotted in a straight line rather than following the placement of the points.

I have also tried looking for the points2one plugin, but this doesn't seem to exist on QGIS v3.4.

I need to be able to create this line but identify it as areas lower than 0.6 DOC and areas greater than DOC, highlighted with different colours. Does anyone know how to do this?

Possible suggestion have been to use the points to path tool, however this creates issues as when I calculate it (knowing that it will arrange my data points from lowest to highest), I get as seen in the bottom figure, showing multiple lines.

I still haven't been able to solve my problem


texts: Identifying feature class permissions in Oracle ArcSDE

texts:
I created a new Feature Class, and I assigned some users SELECT privileges to that Feature Class.  I want to look at the list of users that I have assigned privileges to, how do I do that?

Updated

Is there a GUI application to do this?


texts: Leaflet: loading JSON with Ajax not working

texts:
I'm trying to remove an HTML div if an array of the JSON I'm loading matches the feature properties of my GeoJSON. Here is my code:

function geo_json_dc64d985f99647e7b35676bc82a64cc7_onEachFeature(feature, layer) {

    layer.on({
        mouseout: function(e) {
            geo_json_dc64d985f99647e7b35676bc82a64cc7.resetStyle(e.target);
        },
        mouseover: function(e) {
            e.target.setStyle(geo_json_dc64d985f99647e7b35676bc82a64cc7_highlighter(e.target.feature));
        },
        click: function(e) {
            map_ae26379126cd4ce79aea9d0f395ec09f.fitBounds(e.target.getBounds());

            $.ajax({
                dataType: "json",
                url: "js/csvjson.json",
                success: function(dati) {
                    dati.forEach(function(arrayItem) {
                        if (arrayItem["Comune"] == e.target.feature.properties.NOME_COM) {
                            $('#welcome').remove();
                        }
                    })
                }
            })
        }
    });
};

You can see how it is working right now here (without the JSON, that can't be loaded).

My JSON looks like this:

"": 0,
"Comune": "BONDENO",
"PUNTEGGIOSCUOLA1516": 4.25,
"Value 1": 63,
"Value 2": 8,
"Value 3": 17,
"DANNO": 6,
"Somma valori": 88,
"numero_di_scuole": 4,
"CERTIFICATOAGIBILITAABITABILITA": "",
"DOCUMENTOVALUTAZIONERISCHIO": "",
"PIANOEMERGENZA": "",
"PUNTEGGIOSCUOLA1617": 5.5,
"VINCOLIPAESAGGIO": 1,
"EDIFICIOVETUSTO": 0,
"PROGETTAZIONEANTISISMICA": 1,
"VINCOLIIDROGEOLOGICI": 0,
"PUNTEGGIO_SCUOLE_PARITARIE_1516": "",
"PUNTEGGIO_SCUOLE_PARITARIE_1617": ""

What am I doing wrong?


texts:
I am running this extremely simple code using the ArcGIS python environment:

import arcpy
test = r"C:\....\New_Shapefile.shp"  #test contains several fields, including one called "Number".
updaterows = arcpy.SearchCursor(test)
for row in updaterows:
    print (row.getValue("Number"))

the first time I run the code, it works and I get a list of all the elements in the column "Number", but if I try to run the for loop again, when I enter the code I do not receive any output. This does not change nor if I type the code again or if I simply recall it from the command history.
Also, I tried to replace the field "Number" with some other field name, and it still does not print if already a print command was run before. It seems to work only if I delete "updaterows" first.
What does this occur? Is the problem involved with the function or with the arcGIS development environment for python?


texts: Create view table with QGIS and Geopackage

texts: Working with QGIS 3.4.9 and Geopackage. I created a View table. The command runs without errors, the view is created but does not appear in QGIS. What do I need to do?


texts:
I'm working with renderers and I want to compare symbols from two different renderers. Is there any way to do it in pyqgis/python?

Here is how I get symbols:

renderer = layer.rendererV2()
category = renderer.categories()[0]
symbol = category.symbol()

Maybe you know any other way to compare symbols in PyQGIS?


texts: Using Band Math in R Creates Raster with Different Coordinate System?

texts:
I am trying to make a simple NDVI raster from a Landsat 8 image (containing bands 2-7). The Landsat image has a Coordinate System of NAD_1983_UTM_Zone_11N (and datum: D_North_American_1983). When I run a create a new raster of a simple NDVI calculation in R, the new raster seems to have the same coordinate system in R. However, when I add the original Landsat image, and then the ndvi output raster in ArcMap, I get the following warning in ArcMap (and the properties reads the Coordinate System for the new raster as UTM_Zone_11_Northern_Hemisphere and datum: D_unknown).

Why am I getting this error and how do I avoid it?

ndvi.tif Raster Dataset Properties in ArcMap:

Here's my R code taken from https://geoscripting-wur.github.io/IntroToRaster/:

# Call required packages
library('raster')
library('rgdal')

L8_p38r37_04202018_brick<- brick('C:/Documents/Data/L8_p038_r037_04202018_B2-7.IMG')

# Function for NDVI. Source: http://rspatial.org/analysis/rst/9-remotesensing.html?highlight=ndvi

VI <- function(img, k, i) {
  bk <- img[[k]]
  bi <- img[[i]]
  vi <- (bk - bi) / (bk + bi)
  return(vi)
}

# For this image (Landsat 8, bands 2-7) NIR = 4, red = 3.
ndvi <- VI(L8_p38r37_04202018_brick, 4, 3)
plot(ndvi, col = rev(terrain.colors(10)), main = 'Landsat-NDVI')

writeRaster(ndvi,filename = "ndvi.tif", format = "GTiff", overwrite = TRUE)

crs(L8_p38r37_04202018_brick)
# Output reads: CRS arguments: +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs

crs(ndvi)
# Output reads: CRS arguments: +proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs


texts:
How can I split an 4 channel rgb pic in qgis? With the value tool I can see 4 channel. I tried to use the RGB to PCT tool but I always get an error (File "C:\PROGRA~1\QGISBR~1\bin\pct2rgb.py", line 125, in
ct_size = ct.GetCount()
AttributeError: 'NoneType' object has no attribute 'GetCount' )


texts: Heatmap doesn't render the same as map layout

texts:
Im trying out a heatmap using QGIS. It looks good on the layout manager but when I export it the hotspots render a lot smaller on the map. I played around with the export settings, layer settings, symbology settings but still can't figure it out.

The first image is the export and the second image is a screenshot of what I am trying to achieve.


texts: Sampling raster data and classifying the pixels

texts:
I'm completely new to python usage in GIS.
I'm working with Sentinel images and want to sample the pixels of raster file only in the places which are represented by the geometry of the truth data which I have it in the form of shapefile.
All I want to find is the analogous of the below code in Python.
var training = image.select(bands).sampleRegions({
  collection: points,
  properties: [class],
  scale: 30
});

image.select(bands) - is my raster data,
Collection- is my shapefile
Trying to find my output as the below image.
Source : https://miro.medium.com/max/1050/1*WrtLqr49lbpf24K3Pb6ViQ.png
[![enter image description here][1]][1]
https://www.earthdatascience.org/courses/use-data-open-source-python/intro-raster-data-python/raster-data-processing/classify-plot-raster-data-in-python/
I wanted to do some sampling like in the above link, it has clustering and sampling of trees based on their heights but I want to sample and cluster pixels only in the locations based on the geometries of my shapefile i.e, wanted to acheive supervised classification.


texts: Geoserver OSM data Imported via osm2pgsql - most efficient tables to use to style roads

texts:
The Osm2pgsql importer for OSM data to Postgres results in two tables for ways, one called planet_osm_roads and a second one called planet_osm_lines

The Osm2pgsql documentation states that the planet_osm_roads is a subset of planet_osm_lines and is useful to display roads a zoomed out levels to reduce the postgres server workload on lookups on the much larger planet_osm_lines

There are two approaches to styling the roads using these two tables:

Use planet_osm_roads until a certain zoom level and have the SLD stop styling at that sale, say a minimum of 250K then start styling from a maximum scale 250K down using planet_osm_lines
Use planet_osm_roads for styling Motorway, Trunk, Primary and Secondary Roads down to the minimum scale and use planet_osm_lines to style all the other roads except for Motorway, Trunk, Primary and Secondary starting from a maxscale of 250K

(Note: Both layers presented to the end user via a layer group)

The first option requires accessing planet_osm_roads THEN planet_osm_lines
The second option requires accessing both tables all the time

My Question is:

Which is the most effective approach assuming that no data can be removed from the tables because of the minutely diff updates and considering the following two objectives:

Efficiency in interpreting SLD in Geoserver
Efficiency in table geometry lookups on the postgres server


texts: Can I create a balloon callout on an address point on a published map?

texts:
Very new to this, so please excuse any ignorant question!  I've created a vb.net app to open a published map in ArcReader.  Have a few questions...

First,  I started with the query attribute sample to find an address, zoom to the point on the map, and flash.   I'd like to have a balloon callout display showing the address on the map as well.

From this site, I tried the following code (below), but trying to use ICallout and IFormattedText Symbol tells me 'ambiguously defined for esri.ArcGIS.Display'.

I'm using ArcReaderControl to build this and then adding on to it.  Have I missed something simple?

Thank you very much for any help you have!

DonnaB

Private Sub AddBalloonCallout(ByVal activeView As IActiveView, ByVal text As String, ByVal x As Double, ByVal y As Double)

    Dim pTextElement As ITextElement
    Dim pElement As IElement
    Dim pPoint As IPoint
    Dim pCallout As ICallout
    Dim pTextSymbol As IFormattedTextSymbol
    Dim pGraphicsContainer As IGraphicsContainer
    Dim midX As Double, midY As Double

    Dim pCallout As ICallout
    pTextSymbol = New ESRI.ArcGIS.Display.TextSymbol

    'Dim pTextSymbol As IFormattedTextSymbol
    Dim pGraphicsContainer As IGraphicsContainer
    Dim midX As Double, midY As Double

    'Create a new text element
    pTextElement = New TextElement
    pElement = CType(pTextElement, IElement) 'QI
    pTextElement.Text = "Text callout" & vbCrLf & text

    'Position the new element on the active view's center point
    midX = (activeView.Extent.XMax + activeView.Extent.XMin) / 2
    midY = (activeView.Extent.YMax + activeView.Extent.YMin) / 2
    pPoint = New ESRI.ArcGIS.Geometry.Point
    pPoint.PutCoords(midX, midY)
    pElement.Geometry = pPoint

    'Set the text element symbology to a default balloon callout
    pTextSymbol = New ESRI.ArcGIS.Display.TextSymbol
    pCallout = New BalloonCallout
    pTextSymbol.Background = CType(pCallout, ITextBackground)

End Sub


texts: Adding Torque layer using createLayer instead of createVis in CartoDB.js?

texts:
I have two tables in CartoDB, one is a fixed layer with locations of restaurants in a city. The other layer has data about the locations where police had to go because of fights for example (say 112 calls) that happened in the city during a one year period.

Because I want to create my own basemap I have been using the createLayer function in CartoDB.js to display the restaurants. This works fine. But next I want to add a Torque map of the 112 calls on top of this. However, when I do finally get the Torque map to work, the other layer of the restaurants is no longer visible.

What should I do to make both layers visible?

Below a short version of the code I am using now, which only shows the Torque layer (also, in this version there is no time slider visible, which I hope will become visible once I get both layers working):

// initiate leaflet map
map = new L.Map('map', {
    center: [0,0],
    zoom: 11
})

// load the base map
L.tileLayer(mapURL, {
    attribution: '...'
}).addTo(map);

var CARTOCSS_TORQUE = {...};
var torqueLayer = new L.TorqueLayer({
            user       : 'username',
            table      : 'table_name',
            column     : 'column',
            countby    : 'count(cartodb_id)',
            resolution : 2,
            steps      : 300,
            blendmode  : 'multiply',
            animationDuration: 90,
            map: map,
            cartocss   : CARTOCSS_TORQUE
        });

cartodb.createLayer(map, layerURL)
          .addTo(map)
          .done(function(layer) {
              ...make a small SQL query change...
          })
          .on('error', function(err) {
             console.log(err);
          });

torqueLayer.addTo(map);
torqueLayer.play();


texts: Roof color recognition - How to reclassify rgb colors in intervals?

texts:
I'm creating a tool to recognise the colours of roofs 1 given an orthophoto and a buildings layer in ArcGIS Pro 2.7, but I'm stuck with the final part...
I have already managed to extract the mean and median colours as raster 2 and even pass them to vector by calculating some statistical values 3. Now I would like to be able to reclassify these colours in intervals so that I can calculate, for example, the proportion of "red" roofs in a given area.
Any idea?


texts: Replicate 'Clip Output to Graphics Extent' when exporting with arcpy

texts:
Sometimes I use the check box 'Clip Output to Graphics Extent' when exporting using the UI.  I currently have a largish batch of mxd's that I want to export with this button checked.  I am using the ExportToPNG for the batch export but can't see how to set the 'Clip Output to Graphics Extent'.  Thus all my outputs have white borders.

Based on my googling this isn't possible but can someone please confirm?  What are my alternatives for clipping white space from layout views?

Example with Clip Output to Graphics Extent unchecked:

Example with Clip Output to Graphics Extent checked:


texts: cartographic line develop spikes when applied offset value

texts:
version: ArcGIS 10
I am using a number of lines in certain polygon. As I apply offset value to the outline, spikes/kinks are produced as shown in the picture. Any solutions to remove the spikes and represent line as it originally is? Plus why is there a greater distance between the lines at places then others, indicated in blue and pink lines.


texts: Get the lines between all points of a polygon in PostGis : avoid nested loop?

texts:
I am trying to get all the lines between the points of a polygon, by writing PostGreSQL functions. I have written the two following functions that do the job fine :

the first function to get all the points from the polygon

CREATE OR REPLACE FUNCTION PointsFromPolygon(polygon geometry)
RETURNS SETOF geometry AS
$$
DECLARE
    point geometry;
BEGIN
FOR point IN SELECT DISTINCT points.geom FROM ( SELECT (ST_DumpPoints(polygon)).* ) AS points LOOP
    RETURN NEXT point;
END LOOP;
END;
$$
LANGUAGE plpgsql ;

the second function to create all segments between these points.

CREATE OR REPLACE FUNCTION AllSegmentsFromPoints(polygon geometry)
RETURNS SETOF geometry AS
$$
DECLARE
    point1 geometry;
    point2 geometry;
    i integer;
BEGIN
i:=1;
    FOR point1 IN SELECT * FROM PointsFromPolygon(polygon) LOOP
        FOR point2 IN SELECT * FROM PointsFromPolygon(polygon) OFFSET i LOOP
            RETURN NEXT ST_MakeLine(point1,point2);
        END LOOP;
    i:= i+1;
    END LOOP;
END;
$$
LANGUAGE plpgsql;

Is there a better way to perform this ? Perhaps by doing a cartesian product between the points ?


texts: Extracting/casting mixed geometry types to single type using ogr2ogr?

texts:
I have a GeoJSON file with mixed geometry types, something like this:

{ "type": "FeatureCollection", "features":
    [{ "type": "Feature", "geometry":
        { "type": "GeometryCollection", "geometries":
            [{ "type": "MultiLineString", "coordinates": [
                    [[-4.66065, 19.70386],[-4.66053, 19.70377],[-4.66026, 19.70358],[-4.66011, 19.70349],[-4.66009, 19.70352],[-4.66008, 19.70358]],
                    [[-4.66008, 19.70358],[-4.66009, 19.70352],[-4.66011, 19.70349],[-4.66026, 19.70358],[-4.66053, 19.70377],[-4.66065, 19.70386]]
                ] }, { "type": "Point", "coordinates": [-4.66012, 19.70362] }
            ] },
                "id": "1",
                "properties": { "feature_count": 3 } },
    { "type": "Feature", "geometry":
        { "type": "LineString", "coordinates": [
                [-4.60419, 19.76303],[-4.60456, 19.7629],[-4.60481, 19.76260]
            ] },
            "id": "2",
            "properties": { "feature_count": 1 }
    }]
}

I'm trying to extract out the LineString/MultiLineString geometries from the file (including those nested within GeometryCollections) with ogr2ogr, so I tried this:

ogr2ogr -f sqlite -dsco SPATIALITE=YES -dialect SQLITE -sql "select CollectionExtract(geometry,2), feature_count from 'mixed_types'" mixed_types.sqlite mixed_types.geojson

but I get ERROR 1: Unexpected geometry type MULTILINESTRING as part of GEOMETRYCOLLECTION. Which doesn't make sense, because fixing the mismatched geometries is the whole point of the query.

If I were to first load the GeoJSON into PostGIS and then run a similar SQL query, I don't have any issues. However, I'm trying to remove the PostGIS step and normalize the data just within a quick shell script. It doesn't seem like Spatialite's CollectionExtract() function is working properly within my query.

I've also tried using ogr2ogr's -explodecollections flag, but this creates a duplicate feature for each constituent geometry. I'm trying to end up with the same number of features as I started with.

What would make my Spatialite query work as intended?


texts: OpenLayers 3: putting an image (or logo/legend) on the map

texts:
I'm relatively new to OpenLayers. How to insert a simple image (or logo/legend) on the map?

From this example, http://jsfiddle.net/expedio/od5eLpb9/

Is it possible to overlay the legend (that in this case is a simple image) on the map?


texts: Time spent writing cutting and rendering map tiles algorithm/mechanism

texts:
I know this a very vague question but I really need to know this.

Can anyone help me find kinda matrix that shows how much time spent by different companies writing their map tile cutters/renderers like Google,Bing,Yahoo, OpenStreetMap, Maptiler, Mapnik (at the heart of TileMill) and Geoserver tile rendering system.

Since I need to make a rough estimate that if I start writing the entire tile cutting and rendering mechanism in house then how much time,resources and money do I need.


texts: Adding time enabled layers to ArcGIS online

texts:
I am trying to add time enabled layers into ArcGIS online. The information in the ArcGIS resource center makes it sound like it is possible to add time enabled layers from ArcMap to ArcGIS online. I can get the layer to be time enabled in ArcMap but when I zip the layer and add it to ArcGIS online the time factor is gone. I can see my layer but not play through the time animation. You are suppose to be able to see a description of each layer in ArcGIS online, it seems like the description will tell you if the layer is time enabled or not but this option is greyed out.

Any suggestions on how to animate my layer would be helpful!


texts: GRASS r.viewshed from Python with multiple raster tiles

texts:
I'm new to GRASS and struggling to do a viewshed across multiple tiles. I have got the GRASS r.viewshed function working from Python as follows for a single tile:

gis_path = os.path.join(output_dir, 'gisdb')
output_filename = '{}-viewshed.tif'.format(filename)
transmitter_coords = str(x_transmitter) + ',' + str(y_transmitter)

with Session(gisdb=gis_path, location="location", create_opts="EPSG:27700"):

    print(gcore.parse_command("g.gisenv", flags="s"))
    gcore.run_command('r.external', input=tile_path, output=filename, overwrite=True)
    gcore.run_command('r.external.out', directory=output_dir, format="GTiff")
    gcore.run_command('g.region', raster=filename)
    gcore.run_command('r.viewshed',flags='b',input=filename,output=output_filename,coordinates=transmitter_coords,overwrite=True)
    gcore.run_command('r.external.out', flags="r")

What is the right way to do this for multiple tiles? I have the following attempt with a loop that correctly reads in a list of file paths:

with Session(gisdb=gis_path, location="location", create_opts="EPSG:27700"):

    print(gcore.parse_command("g.gisenv", flags="s"))

    for tile in list_of_tiles:

        output_filename = '{}-viewshed.tif'.format(tile[-10:-4])
        gcore.message('Importing %s -> %s@%s...' % (tile, tile[-10:], output_dir))
        gcore.run_command('r.external', input=tile, output=output_filename, overwrite=True)
        gcore.run_command('r.external.out', directory=output_dir, format="GTiff")

I'm unsure if I now need to merge together the individual files (not sure how to do this) or to feed r.viewshed a list (which I haven't been able to do).


texts: Adding a new Coveragestore in a certain Workspace by REST

texts:
So, simple thing as it seems but I can't seem to make it work! I'm trying to add a raster data file (GeoTIFF) to geoserver via REST API, using curl on linux. REST API is working, since I created a new workspace using it:

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' \
 -d '<workspace><name>restProba</name></workspace>' \
 http://localhost:8080/geoserver/rest/workspaces

It's correctly created as shown by Geoserver's admin ui, but when I try to add a coveragestore to that workspace by executing

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d
'<coverageStore><name>int_dec</name><enabled>true</enabled>
<type>GeoTIFF</type> <url>$home/int_dec.tif</url></coverageStore>'
"http://localhost:8080/geoserver/rest/workspaces/restProba/coveragestores?configure=all"

even though it is correctly loaded, it goes directly into the default workspace, which is not the one I want it in. Is there any way of defining which workspace i want it in? I thought it'd enough by mentioning it in the URL where I point to restProba's workspace URI but it seems to be omiting it.

Thanks for your help :-)

pd: newbie with geoserver, I've tried searching for this but either i'm not using the correct search criteria, im a fool or it's just too simple for anyone to ask that i'm even fooler for asking it :p


texts: ENVI Changes the Projection of the output

texts: After I have finished my Object-Oriented Classification, I open my result in ArcMap and I see that ENVI changed my Projection. Now the images are really in different places.


texts:
I have a table with 9,000 records (MYdb) and 4 visualisations linked to the table.
I am at a point where I have another 800 records (update001) to add to the original table.  I expect I will have to do this three times a year.

Data is in the same format in both tables.

I have tried the following SQL insert into MYdb select * from Update001

This creates an error column "quantity" is of type integer but expression is of type text.

Any ideas as the best way to do this?

All the columns are Strings except two, quantity and year that are set as number.
I have checked both the tables for the column name and format and both I have the exact same details in both tables.

The year column was in a different sequence in the table.


texts:
I would like to add a list to each of my points such that it gains the list as a "property". The following script does that:

var points = /* color: #d63000 */ee.List(
[[1.3634359574461996, 31.636034304440155],
 [3.6046468949461996, 31.148372138748694],
 [-0.9656656050538004, 29.172742327143503],
 [2.8575765824461996, 29.172742327143503],
 [0.7042562699461996, 30.506858885801098],
 [-1.6248452925538004, 30.884738935660458],
 [-3.8221109175538004, 27.62655429384725],
 [2.2862875199461996, 25.781544169671214]]);

var mp = ee.FeatureCollection(points.map(function(p){
  var point = ee.Feature(ee.Geometry.Point(p), {})
  return point
}))

var list = ee.List([1,2,3,4,5])

var addList = function(feature) {
  return feature.set({List: list});
};

var listAdded = mp.map(addList)

Export.table.toDrive(listAdded,
"export_Points",
"export_Points",
"export_Points");

However, the table this outputs looks like this:

The issue with this is that the list is confined to one cell, rather than something I can work with further. While I could go through and handle this in e.g. Notepad++ or possibly with VBA, it would be far more efficient if the table I got from the export was usable from the start. Is it possible to "transpose" the table in such a way that I have the "system:index" in the top row and the list values in the columns below, like this:

I will keep working on this and post updates if I find anything!


texts:
I want to define the area below a contour that slopes at a particular angle (say -0.05%) from a particular point, for many points.
I have a DEM, and can compute contours at a particular level (say 200 meters), and a grid/raster of slopes.
But I don't see how to compute the a "contour" with a particular slope (-0.05%) from a point.

I will use the contour to intersect with a polygon layer (administrative areas for example) to compute the areas of administrative areas that are below or above the sloping contour.
I prefer to use ArcMap or ArcGIS Pro, but could work in R or QGIS (at a push).


texts: QGIS transparent layers plot as solid opaque - solution?

texts:
I have been trying to plot from QGIS to a HP Designjet T120 plotter using Win10x64, but the transparent layers of my QGIS project appear as solid opaque on the plot.

If I plot to PDF to transparent layer are transparent.

Is my problem with the HP plotter driver settings do you think?

I cannot see where to change this on the plotter configuration settings.


texts: Different download options for the new Landsat ETM+ data

texts:
Can anyone give short info about the difference between:

LandsatLook Natural Color Image (11.2 MB)
LandsatLook Thermal Image (8.9 MB)
LandsatLook Quality Image (2.5 MB)
LandsatLook Images with Geographic Reference (22.5 MB)
Level-1 GeoTIFF Data Product (270.4 MB)

I am trying to apply filters for feature detection in ArcMap on the Landsat data, but am I going to be able to make composite bands with the first four types of data? I guess they are simple jpeg images and won't give me any analysis value compared to the tiff data?

I don't want to download unnecessary files - the analysis process will produce enough chunk of data to fill a fully empty hard disk.


texts: US unemployment data by zip (or aggregating data up to county level)

texts:
I am trying to find unemployment rate data for the US that is:

at 5 digit zip code level
monthly, or quarterly, or even annually, for 2008-2012
free

That seems to be impossible as far as I can tell. It looks like the lowest level of aggregation is county and annual (the county data at http://www.bls.gov/lau/#tables). However, you can get monthly data from http://www.melissadata.com/lookups/bls.asp, which cites the BLS as source, which leads me to believe that it is available. Could someone point me where it can be downloaded?

Second, I will also need to aggregate my outcome data from zip to county FIPS code. Since zips change all the time and counties stay stable, is there a dataset that will allow me to translate from zip at some point in time to county?

EDIT: I was able to locate several option for crosswalk files between zip codes and counties. The most up-to-date versions were the USPS ones.  The city state product links each 5 digit zip to the main county (the one that has the majority of the deliveries). The zip+4 product has a one-to-one mapping between them which is more precise, but also more expensive. These are subscription products that need to be updated, and are either monthly, bimonthly or quarterly.

The best free version is the HUD one. It has quarterly 5 digit zip to the main county using an allocation method based on residential addresses and postal vacancy data rather than by area or by population. It uses 2000 census geography. Another one is from the Missouri Census Data Center. Judging by the date it is from September of 2010.


texts: Changing map projection and adding graphic features in projected coordinate system using ArcGIS API for JavaScript?

texts:
I'm having some problems with the ArcGIS API for JavaScript.

I have a web service that traces an electric network and sends back JSON with point and polyline (path) geometry.

I've created a function to loop through the returned features and get an XY for each one.

This service sends the XY in the projected coordinate system that the data is in, which is a NAD 1983 state plane feet.

Right now I have a sample of the returned JSON in an external js file with a variable called result assigned to it.

Here's the code:

var map_extent = new Extent(7300100.788, 545856.679, 7308850.788, 551134.457, new SpatialReference({ wkid:102726 }));

    map = new Map("mapDiv", {
      basemap: "streets",
      extent: map_extent
    });

    map.on("load", function() {
        total_objects = Object.keys(result.results).length;

        for (object = 0; object < total_objects; object++) {
            total_features = Object.keys(result.results[object].features).length;

            for (feature = 0; feature < total_features; feature++) {
                var x_coord = result.results[object].features[feature].geometry.x;
                var y_coord = result.results[object].features[feature].geometry.y;

                var pt = new Point([x_coord, y_coord], new SpatialReference({ wkid:102726 }));
                var sms = new SimpleMarkerSymbol().setStyle(SimpleMarkerSymbol.STYLE_SQUARE).setSize("10").setColor(new Color("green"));
                var graphic = new Graphic(pt, sms);
                map.graphics.add(graphic);
            }
        }
    });

The extent doesn't seem to be working. It's just zoomed way out from where it should be. The features are being added to the map, but they are to the east of Africa- they should be in Oregon.

What am I doing wrong?


texts: Getting NULL-values when point sampling USGS (SRTM 1 Arc-Second Global) grid (QGIS 2.8.2)

texts: I use the Point Sampling Tool in QGIS to transfer gridvalues (of DEMs) to point features. This goes well with grids from f.i. MapMart (SRTMHARRIS_DEM), but I get only NULL-values when using grids from USGS (SRTM 1 Arc-Second Global). Does anybody know why and how to get proper values from SRTM 1 Arc-Second Global?


texts: QGIS polygon centriods - How are they created?

texts: I have been using QGIS to analyses spatial data and I created polygon centroids with the vector geometry tools. Now for a report I have to explain how these centroids were created. I have not been able to find an algorithm or an explanation of how QGIS creates centroids, can anyone help?


texts: Why doesn't Leaflet have cross-origin error when adding WMS layer from GeoServer, but GetFeatureInfo using ajax does

texts:
I am learning web mapping with Leaflet. I added a WMS layer and now I'm trying to get feature details using ajax to send getFeatureInfo request. I'm not finished yet, and right now I just want to log something to the console to test whether the request is successful. My code look like this:

$.ajax({url:url, success: function(){console.log('ab')}

where the url is a working WMS getFeatureInfo request that I've tested. The developer tool gaves me this error message:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/geoserver/geog585/wms?service=WMS&vers…ation/json&x=271&y=280&query_layers=geog585:TaipeiSchoolUTF8. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I've seen some similar post on this issue. It seems that I can resolve the problem by changing some settings in GeoServer. But what really puzzles me is why I didn't get this error when adding the layer to Leaflet? According to the MDN Same-origin policy page:

  The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin. It helps isolate potentially malicious documents, reducing possible attack vectors.

Both getFeatureInfo and getMap request are retrieving information from GeoServer. So why does one work while the other doesn't?


texts: Convert Embeded Graphics to Simple Graphics, ArcGIS

texts:
Is there a way to convert an embedded graphic in an ArcMap document, to a non-embedded graphic?

I have a number of graphics of little trees. They were embedded into an mxd  and I want to convert them back to simple graphics so that I can copy and paste them from one mxd to another without the size changing because of the scale.

Is there any way to do this?


texts:
I am struggling with creation of the map legend adequate to my GeoJSON stylization.

The code looks like below:

var geojsonMarkerOptions = {
radius: 8,
fillColor: "#ff7800",
color: "#000",
weight: 1,
opacity: 1,
fillOpacity: 0.8
};

var sitis = L.geoJSON(sitec, {
pointToLayer: function (feature, latlng) {
feature.properties.myKey = feature.properties.Title + ', ' +
feature.properties.Head
    return L.circleMarker(latlng, geojsonMarkerOptions);
},
    onEachFeature: function (feature, layer) {
        layer.bindPopup('
'+feature.properties.Title+'

Address:
'+feature.properties.Head+'

'+feature.properties.Description+'

Website:'+feature.properties.URL+'
');
}

    }).addTo(map);

2nd layer

var geojsonMarkerOptions2 = {
radius: 5,
fillColor: "#ffc34d",
color: "#1a1100",
weight: 1,
opacity: 1,
fillOpacity: 0.4
};

var church = L.geoJSON(test, {
pointToLayer: function (feature, latlng) {
feature.properties.myKey = feature.properties.Title + ', ' +
feature.properties.Head
    return L.circleMarker(latlng, geojsonMarkerOptions2);
},
    onEachFeature: function (feature, layer) {
        layer.bindPopup('
'+feature.properties.Title+'

Address:
'+feature.properties.Head+'

'+feature.properties.Description+'

'+feature.properties.URL+'');
}

    }).addTo(map);

And 3rd one with custom icon...

var myIcon = L.icon({
iconUrl: 'icon.png',
iconSize: [32, 37],
iconAnchor: [16, 37],
popupAnchor: [0, -28]
});

L.geoJson(tesco, {
  pointToLayer: function (feature, latlng) {
return L.marker(latlng, {icon: myIcon});
  },
  onEachFeature: function(feature, layer) {
layer.bindPopup('
'+feature.properties.Title+'

Address: '+feature.properties.Head+'

'+feature.properties.Description+'

'+feature.properties.URL+'');
}
}).addTo(map);

There are ready GeoJSON layers implemented to the map.

Now the legend code

function getColor(d) {
    return d === 'Company'  ? "#de2d26" :
           d === 'Church'  ? "#377eb8" :
           d === 'Shop' ? "#4daf4a" :
           d === 'Other' ? "#984ea3" :
                        "#ff7f00";
    }

    function style(feature) {
    return {
        weight: 1.5,
        opacity: 1,
        fillOpacity: 1,
        radius: 6,
        fillColor: getColor(feature.properties.TypeOfIssue),
        color: "grey"

    };
}

var legend = L.control({position: 'bottomleft'});
legend.onAdd = function (map) {

var div = L.DomUtil.create('div', 'info legend');
labels = ['Categories'],
categories = ['Company','Church','Shop','Other'];

for (var i = 0; i < categories.length; i++) {

        div.innerHTML +=
        labels.push(
            ' ' +
        (categories[i] ? categories[i] : '+'));

    }
    div.innerHTML = labels.join('
');
return div;
};
legend.addTo(map);

with CSS file...

.info
 {
        padding: 6px 8px;
        font: 14px/16px Verdana, Geneva, sans-serif;
        background: white;
        background: rgba(255,255,255,0.8);
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
        border-radius: 5px;
 }

.legend {
        line-height: 18px;
        color: #555;
    }

.legend i {
        width: 15px;
        height: 15px;
        float: left;
        margin-right: 8px;
        opacity: 0.7;
    }

I tried to replace

fillColor: getColor(feature.properties.TypeOfIssue),

with

fillColor: getColor(feature.properties.geojsonMarkerOptions),

but no effect at all,

Is there some solution to make this legend compatible with the style of single GeoJSON layer provided?


texts:
What do you think what are the advantages and disadvantages (of both)?

Apart from fact that open source software is free to use.

I mean capabilities, functionality, workload to GIS servers, easy to use etc.


texts: What is the difference between ST_GEOMETRY and WKT? Is ST_GEOMETRY just a database type and WKT (well-known text) is a textual representation of the data?


texts: Exporting a classified map from google earth engine

texts:
I have classified an Landsat image in Google Earth Engine and I need to export it so that I can use it in a GIS software. Export to cloud storage is a fee-based service and I cannot afford to pay for that. Therefore I have tried the following code for image exporting according to the reference materials:

// Export the image, specifying scale and region.
  Export.image.toDrive({
  image: classified,
  description: 'imageToDriveExample',
  scale: 30,
  region: geometry
  });

I don't get any results though.


texts: Correlating population density with points of interest?

texts:
I'm trying to conduct a study to determine the geographic distribution of pediatric urologists across the country. I'm using ArcMap.

I downloaded a shapefile of every county in the U.S. I also added data on how many children are in each county. I've reached the point of creating a heat map. I have also compiled the latitude and longitude of every pediatric urologist in the country, so I can map them as points of interest.

Is there a way to statistically compare the distribution of these POI and the distribution of children, so determine where there are underserved areas? Is there a way to create a radius around each POI to determine which counties lie in those areas?

Also, the shapefile I downloaded from U.S. Census seems to show America squished vertically, see below. Can I stretch it out a little so it looks accurate?


texts:
Today I stumbled upon a picture taken from the ISS looking down Europe and it is really beautiful.

So, I started thinking I could add more to the picture. Like world borders, cities, road network, everything. For fun.
The problem is that I know next to nothing about the azimuth or height of the sensor used proj4 satellite projection
Can you can help me assign a projection that image?
Here's the source (it's big!)


texts: I have 50m X 200m polygon which has several small polygons inside. I would like to define how scattered small polygons inside a big polygon. I was wondering if there is a tool which can calculate some index based on the distribution of polygons across a big polygon. For example, if polygons are gathered it would give index 0 and if they are scattered well index would be 1. Is there any tool that I can use? ArcGIS or QGIS would be good.


texts: Change attribute table value using graphical modeler?

texts:
So I have a buffer layer with an associated attribute table. This table has a column called "value" that I want to change to "x" based on previous selection. I can select the buffers in the layers I need to edit, but I don't know how to edit the values of the attributes of the selected buffers.

How can directly edit attribute values at a specific column from the graphical modeler?


texts:
Any idea for customizing Identify Dialog in ArcMap.I want to use my control (for example a list view or a custom control) to show attributes of features in same native ArcMap Identify Dialog,mean replacing some controls of that dialog box.If ArcObject doesn't expose any interface for this purpose,is there any way to replace whole dialog with another dialog but still using same tool,I mean using ArcMap native identify tool,we can show a complete different dialog box which simulates same functionalities.

Any idea,help or guide line would be highly appreciated.