texts: Error while starting OpenTripPlanner server

texts:
I have started working with OpenTripPlanner (I am developing a journey planner app). I am following the two & five minute tutorial given on OpenTripPlanner website.
But while starting the server using "bin\start-server.bat" it's giving me errors which are shown in picture. I also tried to google for error messages but didn't find any fair solution.


texts: Cannot read property 'addLayer' of undefined in svelte

texts:
below is my code. I am using leaflet in svelte to plot a map with image.
<script>
    import { onMount } from 'svelte';
import L from 'leaflet';
    var map;
onMount(() => {
  map = L.map('issmap').setView([51.505, -0.09], 13);
    });
var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
    imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
L.imageOverlay(imageUrl, imageBounds).addTo(map);

</script>

<html lang=en>
    <head>
     <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
   integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
   crossorigin=""/>
         <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
   integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
   crossorigin=""></script>
        <style>
#issmap { height: 180px; }
</style>
    </head>
    <body>
        <div id="issmap">
        </div>
    </body>
</html>

But i am getting a error "Cannot read property 'addLayer' of undefined". how can i slove this ?


texts: Extract height values from vector to CSV

texts:
I have generated a CSV file (using the MMQGIS plugin) expecting to obtain all the coordinates of a vector layer that I have created. But the output file only contains the latitude and longitude coordinates (and a third column for the shapeid's). Is there a way to obtain also the altitude values?

Edit:

The first picture is from a KML that allows me to add the altitude column in the attributes list, and the second one is from a KML that just adds a column of zeros:


texts: A shapefile / boundary coordinates for Bangladesh divisions

texts:
Are there any shapefiles on the boundary coordinates for each of the Bangladesh administration divisions?

Essentially what I want to achieve is to have the minimum and maximum of the longitudes & latitudes of three divisions: Khulna, Barisal & Chittagong so I can create a rough mask for these regions.

I have used this link to obtain the Bangladesh shapefile but does not give me the individual division borders, or that I can see when using ArcGis Explorer.

I was thinking, if I had the data for the border coordinates I could extract the min & max values.


texts: How to transform a shapefile with a MN03 (LV03) coordinate system into a shapefile with a MN95 (LV95) coordinate system?

texts:
Switzerland is currently introducing new coordinates: by the end of 2016, all federal and cantonal reference data (e.g. the Swiss cadastral system) sould be transformed to the new highly-accurate LV95 reference frame, and all other basic geodata are to follow by 2020.

How can we transform a coordinate system of a shapefile to this new coordinate system (MN95 or LV95) in order to "read" it over datas in this new coordinate system (MN95 or LV95)?


texts: How to calculate the image size knowing its coordinates and pixel size?

texts:
Coordinates of the upper left corner=286185.598266, 5180967.071686,
Coordinates of the lower right corner=286223.863098, 5180909.674438
Pixel size=0.0463053,-0.0463053
How is the image size calculated, if the coordinates and pixel size are known?
Approximately should be 1024х 1536
Is there a script  or formula?

I work with the library Gdal

   gdalData_1 = gdal.Open(images_1)
   gdalData_2 = gdal.Open(images_2)
   rasterXSize = gdalData_1.RasterXSize
   rasterYSize = gdalData_1.RasterYSize
   print (rasterXSize ,rasterYSize )

Output = 1024 х 1536

I want to calculate the same thing, only knowing the resolution of pixels and the value of 4 coordinates


texts: What function should I use to assess the degree of elevational change (rocky cliffs etc.) of a DEM?

texts:
I have a DEM of my research area and I want to assess how the topography/elevation changes. I am specifically looking to see what areas may be good suitable bat-roosting habitat so I am trying to identify which areas might be rocky hillsides or cliff-faces.

I am wondering what kind of function should I use to best assess this? Slope? Ruggedness?

I am also wondering HOW to go about utilizing the best function to do the job.

I am a beginner GIS student/ecologist, any advice or help would be fantastic! Thanks in advance!


texts: ArcGIS Add Join Attribute Table on ModelBuilder

texts:
I can Add Join Attribute Tables using two shape files by manual on ArcMap.
But I want to add join attribute tables using two shapre files on ModelBulder without ArcMap.
Can I do it ?

Please let me know some informations.


texts: Determine 3 and 6 minute fire response times

texts:
I'm expecting to get an Excel file with data on previous fire and emergency response times. I was told it will have incident addresses and the response time for each incident (~ 12K incidents). I also have a street layer and an address layer. Some streets have speed limit data, some don't, although I can assign arbitrary values based on road class (collector, major arterial, local, etc.).

Is this sufficient data to produce a map showing response times? Ideally there would be a city-wide map similar to what an outside vendor produced 5 years ago, which to me looks more like a sort of heat map. They'd also like maps for each of eight fire stations. They're sort of unclear on exactly what they want; they may not know. I think essentially what they want is a map for each station showing 3 and 6 minute response time zones based on their actual data. I could do a multiple ring buffer based on an average speed, but that doesn't take into account actual streets. All help appreciated, thanks.

Running ArcInfo 10.0 sp5, have Network Analyst and Spatial Analyst, although a bit rusty on both.


texts: Nearest Neighbour Pixel Value Google Earth Engine

texts:
I want to attach the values from one raster to another raster. Using simple band math I can multiply the value of the base raster which is the presence of mangroves and therefore 1 or masked by the value of the other raster, which is the change in water from the Pekel water layer. This works for where both rasters have a value but where the Pekel layer is masked I would want the value in the mangrove layer to be the nearest pixel in Pekel layer.

//import Pekel data
var gsw = ee.Image('JRC/GSW1_0/GlobalSurfaceWater');
var change = gsw.select("change_abs");

//import Mangroves of the World
var mangrove = ee.Image(ee.ImageCollection('LANDSAT/MANGROVE_FORESTS').first());

//////////////////////////////////////////////////////////////
// Constants
//////////////////////////////////////////////////////////////

var VIS_CHANGE = {
    min:-100,
    max:100,
    palette: ['red', 'black', 'limegreen']
};

var MANGROVE_COL = {
  palette: ['orange']
};

//////////////////////////////////////////////////////////////
// Calculations
//////////////////////////////////////////////////////////////

var combine = mangrove.select('1').multiply(change.select('change_abs'))

//////////////////////////////////////////////////////////////
// Map Layers
//////////////////////////////////////////////////////////////

Map.addLayer({
  eeObject: mangrove,
  visParams: MANGROVE_COL,
  name: 'mangrove extent',
  shown: false
});

//Change in water intensity
Map.addLayer({
  eeObject: change,
  visParams: VIS_CHANGE,
  name: 'occurrence change intensity',
  shown: false
});

//Change in water intensity
Map.addLayer({
  eeObject: combine,
  visParams: VIS_CHANGE,
  name: 'occurrence change intensity in mangrove',
  shown: true
});


texts: ArcGIS 10.1 - c# custom geoprocessing function tool - how to populate a polyline output parameter?

texts:
I'm at 10.1SP1 with VS2010.

In my tool's ParameterInfo property I create an output GPParameter object of IGPParameterEdit.DataType GPLineTypeClass.

Then in the Execute() method I do work that creates an IPolyline that I want to stuff into that parameter's IGPParameter.Value property as an IGPValue.

PROBLEM 1: Using the typical

IGPValue outValue = gputils.MakeGPValueFromObject(myIPolyline)

using the GPUtilities class's IGPUtilities interface causes an E_FAIL COM error. huh. How does one debug that? Well, try another way -

So I tried this instead:

IGPLine2 outValue = new GPLineClass();
outValue.Polyline = myIPolyline;
gpUtils.PackGPValue((IGPValue)outValue, outputParam);

PROBLEM 2: But I get an invalid cast exception on that first line:

System.InvalidCastException: Unable to cast COM object of type 'ESRI.ArcGIS.Geoprocessing.GPLineClass' to interface type 'ESRI.ArcGIS.Geoprocessing.IGPLine2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{1248339D-7B76-4A43-8FE0-752B1BF9D39A}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))

GPLineClass cannot be cast to IGPLine2. What! Documentation says this class implements this interface. I CAN cast it to IGPLine, but that interface is ridiculous - I'd have to disassemble the IPolyline and assign each vertex, and it won't work for multipart geometries.

SO - what is the secret sauce to stuff an IPolyline into an output parameter's value? And what the heck is up with that IGPLine2 thing?

Thanks!


texts: OpenLayers 3 drag box interaction not pointing correctly

texts:
I am using OpenLayers 3.9.0. I Want to add and remove dragZoom and dragBox interactions in OpenLayers 3 map dynamically.

<button id='box'>dragBox</button>

var dragBox = new ol.interaction.DragBox({
            condition: ol.events.condition.always,
            style: new ol.style.Style({
                stroke: new ol.style.Stroke({
                    color: [0, 0, 255, 1]
                })
            })
        });

In jQuery for button click event:

$('#box').click(function(){
    map.addInteraction(dragBox);
})

When this event triggered using button the cursor and the box are not at same position.

So why does this is happen, and how can we overcome this?


texts: Comparing ArcGIS Desktop configuration on two pieces of hardware?

texts:
I have two PCS with ostensibly the same configuration (i.e. both ArcGIS Desktop 10.0 SP5, both 4Gb RAM) yet when I load the same file geodatabase onto both and run the same large (400 element) model on both one runs perfectly (takes 1 hr 11 mins) while on the other it bails consistently with this error:

  ERROR 999999: Error executing function. Invalid Topology [Topoengine error.]

If this really had invalid topology I think the same error should show on both machines so I believe the error message to be spurious and that the problem is really something to do with the underlying configurations.

To compare just the hardware configurations, in the absence of any licensing restrictions, I could use something like Belarc Advisor but this is likely to throw up so many differences that it becomes hard to distinguish those relevant to ArcGIS Desktop configuration and those that are not.

Has anybody tried to find or develop a tool that can summarise the ArcGIS Desktop and relevant hardware configuration for a machine and perhaps write that to a table so that output from two machines can be fed through Table Compare to highlight what is different?

The PatchFinder answer was a good one because it showed working machine having 10.0 SP5 only while non-working one showed a chequered history of SP2, SP4, HotFix, SP5 plus Workstation and VBA Resources. So we planned to uninstall and reinstall.  Unfortunately, I cannot recall whether that plan went ahead, or the outcome.


texts: I have googled extensively and have emailed a few different companies but have come up with nothing. I was wondering if anyone knew where to locate a copy of ArcView 3.0a that is compatible with Mac OS? I have checked ebay etc. Is anyone aware of any place that specializes in selling used out of date software or are there any private users with it to sell.


texts: Fill recordset parameter with excel file in geoprocessing model

texts:
I've managed to create a working ArcGIS Model service and now I'm trying to use it in my silverlight application. The model uses a geoprocessing tool Record set (an excel file). I'm trying to add this parameters like it's done in the Drive time sample.

I don't know how to call the excel file that I need.


texts: Looking for Cities population datasets for the state of Arizona

texts:
Looking for cities in Arizona especially I'd like to have them with that has population attributes. I've checked Arizona's geospatial websites and none of them I have found.

Does anyone know where I can find them ?


texts: Changing pixel data from Landfire.gov using ArcMap

texts:
I am trying to create and compare a "before" and "after" of an area's vegetation change for land restoration. I then want to use the "before" and "after" vegetation types to create two simulations in FlamMap to show the reduced risk of fire. I am using raster data (existing vegetation type, canopy height, canopy cover, etc)from Landfire.gov. Landfire.gov gives a value for each type of vegetation, and I am trying to figure out how to change the value.
I am also wondering if I change the value of vegetation type (1 layer) do I need to learn to change the other types/is it even feasible to change canopy height, canopy cover, canopy bulk density, etc?
Is there an easier way to show a before/after or land alteration with raster data in ArcMap?


texts: map of evolution of illiteracy with torque cartodb

texts: I have to make a map of decreasing illiteracy rate in the last five years, I have data for each province. What I mean is that by the torque tool that offers cartodb, the provinces (which are polygons) will change color according to the index increases or decreases through time. anyone has an idea on how. Excuse my English is not my native language.


texts:
How can I find all points in a polygon pass in queries:

My column coord is a geometry point example,

pseudo-code.

select a.* from "table" as a where ST_WITHIN(a.coord, [lng1 lat1, lng2 lat2, lng3 lat3, lng4 lat4,...])

I'm using EPSG 3857


texts: How to fire a query from OpenLayers to GeoServer to fetch 'the_geom' column in PostGIS table?

texts:
I am coloring the polygon shapes of world_country. I have OpenLayers in my UI, GeoServer as server and PostGIS as db.
All I want is fire this query:

select the_geom from world_country where cntryname='China'

And this query should return shape file of China, so I get it in my UI and can color it.

I am using wfs data layer to fire the query, but I am not getting the selected country. Please suggest what I am missing?

function init()

{
    $("#heatmapArea").remove();
    $('body').append('

');

            map = new OpenLayers.Map({
                div: "heatmapArea",
                allOverlays: true,
                projection: new OpenLayers.Projection("EPSG:4326"),
                units: "m",
                numZoomLevels: 18,
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                                 20037508, 20037508.34)
            });

var gmap = new OpenLayers.Layer.Google("Google Streets", {numZoomLevels: 20});

      var countryLayer = new OpenLayers.Layer.WMS("Country polygon","http://10.208.22.159:8080/geoserver/wms",{'layers': 'aqp:world_country', transparent: true,}, {isBaseLayer: false, opacity: 0.3, deltaX: 0.0013, deltaY: 0.00058});

    var wfsLayer = new OpenLayers.Layer.Vector("WFS", {
            strategies: [new OpenLayers.Strategy.BBOX()],
            protocol: new OpenLayers.Protocol.WFS({
                url:  "http://10.208.22.159:8080/geoserver/wfs",
                featureType: "aqp:world_country",
               // featureNS: "http://www.openplans.org/topp"
                geometryName:"the_geom"
            }),
            styleMap: new OpenLayers.StyleMap({
                strokeWidth: 3,
                strokeColor: "#FF0000"
            }),
            filter: new OpenLayers.Filter.Logical({
                type: OpenLayers.Filter.Logical.OR,
                filters: [
                    new OpenLayers.Filter.Comparison({
                        type: OpenLayers.Filter.Comparison.EQUAL_TO,
                        property: "cntryname",
                        value: "China"
                    }),
                    new OpenLayers.Filter.Comparison({
                        type: OpenLayers.Filter.Comparison.EQUAL_TO,
                        property: "cntryname",
                        value: "India"
                    })
                ]
            })
        })

map.addLayers([gmap, countryLayer,wfsLayer]);
           map.zoomToMaxExtent();
           map.zoomIn();
           map.setCenter(new OpenLayers.Bounds(-180, -90, 180, 90).getCenterLonLat(), 3);
        }


texts: Deleting polygons smaller than certain dimension using ArcGIS Desktop?

texts:
I've made a model in ModelBuilder in ArcMap 10.3, what it basically does is creating polygons over open areas such as farm-lands, grass-lands, marshes etc that has a low slope.

My challenge is that I don't want polygons that are smaller than a specific area. lets say in this example that the area can not be smaller than 160m2. This is easy by creating an expression removing polygons with area less than that. But I'm interested in the actual size, it needs to be at least 40x40m. (diameter of 40m if it is doable with circle vs square).

Figure 1 and 2 are OK because they both have an area inside which is 40x40m, but figure 3 does not and should thus be removed/deleted. It also visualizes the trouble with square meters, as the figure 3 has the same area as figure 1.

As long as the polygon have one area of at least 40x40 the remainder "noise"/bulbs in the polygon does not matter.

@FelixIP gave one solution in the first answer on this post that almost worked. But after some testing I found that there were some flaws in the output after running the two scripts. It solved my problem since, luckily enough, no errors occurred in my analysis extent. Here are two pictures that depicts the two errors i found:

As you can see here, if we had moved the point from which the buffer was made, it would be possible to arrange it so that the buffer would fit inside the polygon boundaries.


texts: Querying Data with a 1-Many Relationship Class

texts:
I have created a relationship class similar to the one I posted about in this question.

Essentially, there is a point feature class representing a location of vegetation clearing with attributes about the point (size of clearance, property ID, etc).  There is also a table with information about different vegetation species that were cleared at that point and attributes about the vegetation (how much of each species was cleared, count of species, etc).  The two are linked together with a 1-Many relationship class based on a unique ID which I created.

I can successfully click on a point and see the information about the point as well as all the species that were cleared at that point using the information tool.

However, I would like to query the points based on attributes in the plant species table.  For example, "select all points which contain a particular species".  But, the Select By Attributes tool doesn't let me see fields in the table.  Just the fields in the point feature class.

How can I do this?  Is this a limitation of relationship classes?  Do I need to query the data some other way?

Thanks for any help.


texts: Sum value ArcGIS attribute (field calculator)

texts:
I have in my columns attribute the following table (
follows the image):

"rank" (which is related to the order of my data);

"SL" (which is a linear measure of my object);

"testada" (the formula):

I wanted a help in the implementation of the formula tested in the field command of the calculator arcgis.

The columns "rank" and "SL" range, containing more or less attributes. That is, My data vary and what I'm showing is just a sample of my data set so was wanting a more dynamic formula. This formula has to read up to the last line, and return the sum of tested according to formula.


texts:
I have two raster datasets, the first an 800 meter digital elevation model, the second a corresponding set of temperatures at the same resolution and identical spatial reference.

I've extracted each into a smaller selection (elevation & temperature below):

Does a chunk of code exist that pulls the maximum and minimum values of one raster (in this case elevation), and extracts the values of the corresponding second raster (temperature)?

It's my goal to run this code for numerous smaller raster datasets.

My initial thought was to write code in ArcPy using the "Extract by Point" tool, however I discovered that this fell short of what I'm attempting to do.


texts: extracting data from rasters using shapefile boundaries in r

texts:
I have a raster.stack of 8 environmental variables and a shapefile of Ecoregions for the southern U.S.

files<-list.files(path='E:/Ecoregions Models/Border Bioclim/',pattern='asc', full.names=TRUE)
predictors<-stack(files)

##subset the main shape file into 12 individual shapefiles for the regions of interest
ER_11.1<-Level.2.ecoregs[Level.2.ecoregs$NA_L2CODE=="11.1",]...

I am attempting to use the extract function to pull out 5,000 random points from every ecoregion and save them as different objects.

I am having trouble projecting the individual ecoregion objects on to the raster files.
I have already changed the projection but there is still a problem.

>bio_1
class       : RasterLayer
dimensions  : 324, 444, 143856  (nrow, ncol, ncell)
resolution  : 0.08333333, 0.08333333  (x, y)
extent      : -125, -88, 18.5, 45.5  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=48 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : E:\Ecoregions Models\Border Bioclim\ModelVariables\bio_1.asc
names       : bio_1

> ER_11.1
class       : SpatialPolygonsDataFrame
nfeatures   : 22
extent      : -1989641, -1450736, -1748693, -208349.6  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=48 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
nvariables  : 8
names       : NA_L2CODE,                NA_L2NAME, NA_L1CODE,                NA_L1NAME,                       NA_L2KEY,                     NA_L1KEY,   Shape_Leng,   Shape_Area
min values  :      11.1, MEDITERRANEAN CALIFORNIA,        11, MEDITERRANEAN CALIFORNIA, 11.1  MEDITERRANEAN CALIFORNIA, 11  MEDITERRANEAN CALIFORNIA,     331.1174, 1.483274e+08
max values  :      11.1, MEDITERRANEAN CALIFORNIA,        11, MEDITERRANEAN CALIFORNIA, 11.1  MEDITERRANEAN CALIFORNIA, 11  MEDITERRANEAN CALIFORNIA, 5417939.1114, 8.472524e+04
>

The problem here must be in the different extents.
Does anyone have any suggestions on how to resolve this in the raster package?


texts:
I've got a script which runs through some GPS data and creates several outputs (tables, shapefiles etc.).

However, when I've just run it, the folder where all the input data lies (along with most of the outputs) has just vanished without a trace. It's not even the recycling bin.

The only references to 'Delete' are deleting fields, deleting a table if it exists (*arcpy.Delete_management(gpsStreetSummary)*) and at the start deleting a GDB if it exists.

There's nothing I can find in the script to explain why it would just delete everything?? Does anyone know if there is a bug in arcpy that sometimes causes this to happen?


texts: Missing/inconsistent River Thames map data in Overpass Turbo

texts:
I have noticed the River Thames cut off quite abruptly when applying the following query to Overpass:

(
  way["natural"="water"]({{bbox}});
);

out body;
>;
out skel qt;

The resulting data is shown below - you can clearly see that the background map shows the river continuing, but the data does not follow that:

I've tried all the water types I can think of (below), but the best I get is a single line that follows the centre of the river, and not an area polygon that is topologically accurate.

(
  way["natural"="water"]({{bbox}});
  way["natural"="coastline"]({{bbox}});
  way["waterway"]({{bbox}});
  way["water"]({{bbox}});
);

out body;
>;
out skel qt;

EDIT: This is the result of AndreJ's answer:

relation(2263653);>>;
out skel;


texts: How can I transform some KML data to Sql Server 2008 using FME?

texts:
I've just downloaded FME 14 day trial. I'm trying to see how easy/hard it is to transform some KML data (a simple neighbourhood shape) into my Sql Server 2008 database using FME.

I sorta don't even know where to start .. blush.

The closest I got was

New Workspace Wizard
Source file => KML. (OGCKML)
Destination => Sql Server 2008 (MSSQL_SPATIAL) + EPSG:4326

After some other questions which I didn't really understand, it then hit PLAY and it did create a table called Document but it had a single field which was NULL. I know my KML has data in it .. cause i've loaded it up into Quantum GIS also ... and that worked.

So - could anyone help me please?

Are there any tutorials I could reference to learn if this product is what we need.

I know there's other ways to do this but I want to keep this post only talking about FME and how to use that to do what we're trying.

SIDE NOTE: Any links to pricing? None of us could find any, also ... :~(


texts: Printing Layout legend feature count using QGIS

texts:
In the legend below I have included the feature counts on a polyline layer with a basic categorised style.
However, I would like to get rid of the total count in the layer title (highlighted in yellow) but keep the feature count just on the different categories.

I have tried removing the feature count and adding a formula directly into the categories labels - but the categories labels do not seem to accept formulas (sadly). I've already dug through SE but I haven't really found what I'm looking for. They are mostly about how to modify the feature counts based on the extent of the map - which doesn't answer my question.
Does anyone know if it's possible via the interface and if so how?


texts: Spline plugin doesn't active after being installed?

texts:
I just intalled Spline plugin

But then it is not activated on the toolbar

What can I do right now?
I use QGIS version 2.10.1-Pisa. Windows 7 x64bit.


texts: Exporting band data of a large number of points

texts:
I have a question regarding exporting a data from GEE.
I am new to coding and GEE. What I would like to achieve is export pixel band data of points a have managed to upload using Fusion Table.
Is is possible for GEE to export band data of those point in form of a table?

My code so far:
 https://code.earthengine.google.com/8a764b5d22a9f7108152fce1acc1fe16

The code:

// Load a FeatureCollection from a Fusion Table
var CRuHM_small_data = ee.FeatureCollection('ft:1ocXhbAqP_NbA0iE7tivKgKCfTFGseNdibklZj0NX');

// Print and display the FeatureCollection.
Map.addLayer(CRuHM_small_data,{},'CRuHM_small_data');
print(CRuHM_small_data);

//Navigate to area of interest
Map.setCenter(17.3834, -0.8929, 8);

// Select a specific Sentinel-2 image from the archive
var sent2a = ee.Image("COPERNICUS/S2/20170801T090021_20170801T091620_T33MYV");

// Add RGB composite to map, for water/land
Map.addLayer(sent2a,{bands:['B8','B11','B4'], min:0, max:3000}, "water/land");

However, the next step is more complicated for me.
I was trying this code, but something is missing:(

//exporting band data to table
//Export.table.toDrive(collection, description, folder,
//fileNamePrefix, fileFormat, selectors),

Export.table.toDrive({
  collection: CRuHM_small_Data,
  description: "CRuHM_small_Data",
  folder: "GEE",
  fileNamePrefix: "Table",
  fileFormat: "CSV",
  selectors: ["ID", "B3", "B2"]
  });


texts: Identifying polygons in two separate layers with a large (>85%) overlap

texts:
I have two separate layers and I want to identify polygons that overlap more than 85%. When I try "Extract by location" tool it gives me the polygons that overlap even in small areas.
I am using QGIS Desktop 3.2.2


texts: Convert x y coordinates to polyline shapefile

texts:
I am trying to process output from a model that simulates the movement of particles in groundwater. The program outputs the particle ID number, the x and y coordinates, and the time at which the particle is at those specific coordinates.
Each line contains the ID, X, Y, and T. For example:

No_1......2.34546E+03......7.73783E+03......1.20647E+04
No_2......5.37637E+03......8.52437E+03......1.37673E+04
No_1......2.37357E+03......7.74387E+03......1.21567E+04

There are hundreds of particles and each particle has several hundred x,y,t values.  The file sizes can easily be over 100GB.  I can sort/group the file so that each particle is listed in order of increasing travel time.

Is there a way to convert a text file with these coordinates into a shapefile that contains one continuous polyline for each particle, from its first x,y location to its final x,y location?  I'm not going to do anything with the polylines other than display them, so the attributes aren't really important.  I don't have a need to identify or select them based on particle ID, for example.


texts:
How can I retrieve the result of a SQL query from a source?

I would like to create a dynamic table that displays the result of a query.

 const source= new carto.source.SQL('SELECT cartodb_id, country, pop, the_geom_webmercator, the_geom FROM country');

const layer= new carto.layer.Layer(source, style, {
    featureOverColumns: ['cartodb_id', 'country', 'pop', 'the_geom']
});

layer.on('featureOver', data => {
    console.log(data);
});

 source.setQuery('SELECT * FROM country WHERE pop > 10000')
        .catch(cartoError => {
        console.log(cartoError)
        })
        .then(success => {
            //Display result
            console.log(success); //undefined
        });

I can't get the result back.
setQuery returns a Promise object, but it undefined.

I guess I miss something... any idea ?


texts: How to filter a merged Landsats collection by cloud coverage in Google Earth Engine?

texts:
I have a collection of all Landsat 4, 5, 7, and 8 imagery that has been modified for future processing.

  var mergedCollection = L457Renamed.merge(L8Renamed);

A property for each image is "CLOUD_COVER".

I would like to create a filter for this merged collection that will remove imagery above an adjustable cloud cover threshold.

something like:
        var collectionCloudiness = mergedCollection.select("CLOUD_Cover less than 10")

Additionally, how do I copy code from GEE so that it keeps its formatting and colors?

Thanks for your help!


texts: I can't get my OpenLayers radar overlay to display correctly

texts:
I've tried to overlay a radar image on my map so that I can show the current radar for the United states. However, whenever I load the map, I can't seem to get the projection to look correct. Here's the image at one of the higher zoom levels: high zoom level, and here's the image when I zoom in (notice it takes up the same amount of space horizontally no matter the map zoom):

zoom in image.

Here's the code I'm using to set up the OpenLayers map. I've poked at this for quite some time, and can't quite figure out what's going on here.

I'm relatively new to OpenLayers.

loadExtendedFieldMap: function() {
this.removePageSource();

$('#map-container').height($(window).height() - 350); // 350 = magic number to get an appropriate map height. It's the number of pixels from the bottom of the window.
$map = $('#map-container', this.element);

if (!$map.length) { return; }

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

bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.LonLat(-127.620375523875420, 21.652538062803));
bounds.extend(new OpenLayers.LonLat(-66.517937876818, 50.406626367301044));
bounds.transform(proj4326, proj900913);

$map.MapController({
  layers: {
    bingAerial: new OpenLayers.Layer.BingAerial({
      wrapDateLine: true,
      isBaseLayer: true
    }),
    bingRoads: new OpenLayers.Layer.BingRoads({
      wrapDateLine: true,
      isBaseLayer: true
    }),
    boundary: new OpenLayers.Layer.Boundary({name: 'Field Boundary'}),
    radar: new OpenLayers.Layer.Image('radar', 'http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif', bounds, new OpenLayers.Size(3400, 1600), {
      'isBaseLayer': false,
      'alwaysInRange': true
    })
  },
  mapOptions: {
    eventListeners: {
      changelayer: $.proxy(this.layerChanged, this)
    }
  }
}).MapController('addControls', {
  // Core
  layerSwitcher: new OpenLayers.Control.LayerSwitcher({
    alwaysOn: true
  })
});

this.getFieldInformation();
},


texts: Using labels/attributes from arcMap to display information

texts:
I am wanting to take the labels/attributes that are used in arcMap and display them in an InfoWindow when the user clicks on the map point. I really have no idea where to start on this so any help would be appreciated. I have attached a screen shot of my arcMap with the labels as well as a screen shot of where I am wanting the labels to appear. If you look at the picture titled 'InfoWindow,' Utah is displayed when the user clicks on the state.

Here is the xaml I have used with my maps so far:

<esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseClick="MyMap_MouseClick" MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352">
                <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:ArcGISDynamicMapServiceLayer  ID="ID" Url="This is where the URL is."/>
</esri:Map>

            <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"
            HorizontalAlignment="Left"  VerticalAlignment="Top"
            Margin="20" Padding="5" BorderBrush="Black" >
                <esri:Legend Map="{Binding ElementName=MyMap}"
                         LayerIDs="ID"
                         LayerItemsMode="Tree"
                         ShowOnlyVisibleLayers="False"
                         Refreshed="Legend_Refreshed">
                    <esri:Legend.MapLayerTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox Content="{Binding Label}"
                                    IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                                    IsEnabled="{Binding IsInScaleRange}" >
                                </CheckBox>
                                <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />
                            </StackPanel>
                        </DataTemplate>
                    </esri:Legend.MapLayerTemplate>
                    <esri:Legend.LayerTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Label}"
                            IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                            IsEnabled="{Binding IsInScaleRange}" >
                            </CheckBox>
                        </DataTemplate>
                    </esri:Legend.LayerTemplate>
                </esri:Legend>
            </Border>

If you have any questions, do not hesitate to ask! Thanks again!


texts: Grass Gis: What is the meaning of a TARGET LOCATION?

texts:
I am attempting to follow a guide on creating ortho-photos in Grass GIS, available here:

https://grassbook.org/extra/sample-chapter/

The chapter suggests that a separate cartesian LOCATION should be used for un-georeferenced images, and that the image group should have the projected LOCATION set as its TARGET LOCATION.

The following step requires that the image group have an elevation model set, for which the DEM would be in the projected location. However, it doesn't seem like I can access things which are in other locations, and it doesn't really make sense to have a projected DEM with my unprojected images, and vice versa.

I have read before that starting the orthorectification process with unreferenced images is a normal way to do it, but I can't seem to make any progress.

What does setting the target do, and how can I move forward?


texts:
I'm trying to run QGIS's overlap analysis. I ran this a few days ago, but it's not working anymore.

I have yellow as zipcodes (overlap_zipcodes) and purple as census tracts (84_censustracts). I'm trying to calculate the percentage that census tract is in each zipcode.

I get the following error


texts: Populating feature class attribute field with input from another table using ModelBuilder of ArcGIS Pro

texts:
I am using ArcGIS Pro 2.4 and its ModelBuilder

I would like to add an attribute value from one feature class to another using ModelBuilder.

Is there a geoprocessing tool that will directly populate a record?

I have one watershed and several tables I would like to extract data from.  I'm just beginning ModelBuilder and very new to Python.


texts: Model builder - Nesting models to extract raster values to points

texts:
Hello!
Hopefully a quick question.  I have a simple model below that iterates through a folder full of rasters, taking each in turn to extract data values based on a single shapefile of Random point locations.  The rest works over the points table to add a field named after the raster, calculates it from the RASTERVALU field, then deletes the RASTERVALU field.  That file is fed back into the model as the next raster comes through to repeat the process. The end result is a series of shapefiles where the final one has as many fields as raster, named after the raster, and with its values.

Now I want to do this for many shapes/feature classes of random points.  I have tried to use this is a nested iterator model with no luck.  When nested, I can pass the name of each random point shp so that it does not over-write the previous run, but in that case the raster iterator only works for the first raster.  I realize this might be asking a lot of the model builder, but maybe someone has a better idea fro nesting or a different logic approach.
Thanks!


texts: Opening script in Toolset using GPToolDialog()?

texts:
I need to open a Python Script using GPToolDialog(), but the script is in a Toolset, not in the Toolbox main path.

I tried many ways to solve but do not work, examples:

Example 1:

pythonaddins.GPToolDialog(r'Path to Toolbox\Toolset', 'Script')

Example 2:

pythonaddins.GPToolDialog(r'Path to Toolbox', 'Toolset\Script')

No one ot the examples works.


texts: How to determine bounding box of current qgis 'map canvas extent' from the python console

texts:
I've asked a similar question here: How to quickly calculate bounding box coordinates of a selected polygon with qgis

...regarding a quick way to determine the bounding box of a given layer.

Is there any way to do the same thing for the current qgis view? I imagine it is an iface property but cannot find it in the documentation. Thanks.

update:
I'm working with the qgis print (map) creator right now, and I've found a button which appears to call a function that I'm alluding to. If you open the print creator, in the right side bar there is a menu button called "Item Properties". Click on this and below there is a submenu called "Extents". Expand that and there is a button called "Set to map canvas extent". This button appears to utilize the function I'm alluding to by extracting the bbox coords of the main qgis map view.


texts: How can I fix QGIS 1.8 startup issues due to missing qwt5.dll library?

texts:
I installed the QGIS 1.8 a couple of weeks ago and it run ok. Today the qwt5.dll library is missing apparently. I deinstalled and also deinstalled the microsoft visual c++ 2005 distributables to do a clean new install but nothing seems to work.

Windows 7 64 bit .exe


texts:
I am using QGIS 1.8.0 on Mac OS 10.8.3 with python 2.7. Thanks to other threads in the forum, I have successfully installed shapely here:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Shapely-1.2.16-py2.7.egg

However, when I try to use the polygonizer-Plugin in QGIS it tells me that it cannot find shapely.ops. This clearly seems to be a path-problem, but I have no other versions of python installed. I have tried to append the above path to .bash-profile, but to no avail.

Any help is appreciated.

Nils


texts:
I originally posted the question on SO but just realised it was more suited here... I am copying the question below, not sure what the rule is, just let me know if I need to remove the other one from SO.

I am using the JMS clustering community plugin of GeoServer. I want to build a cluster of map servers mainly with horizontal scaling.

I have generated an image and run my geoserver with the JMS extensions in a container. At the moment I am only testing with a docker-compose but my goal is to use it in a Kubernetes cluster.

It took me a day more or less to have it "kind" of working in a multi master/slave configuration. In fact all nodes are both master and slaves.

The issues I have are the following:

Partial duplication of data. Data does get copied from one node to another but not always. The workspaces in particular seem to have more issues (?)
if I boot a new node then it starts blank, none of the initialisation is done. I would expect a new node to have all its data initialised by another node?
if I use the web interface, every time I log in one node it logs me out the other nodes!
occasionally if I create an element (more often a workspace) it complains it was already created, as if the message bounced back to the server.

Here's a template cluster file properties for the nodes:

CLUSTER_CONFIG_DIR=/opt/geoserver/data_dir/cluster
instanceName=$INSTANCENAME
readOnly=disabled
durable=true
brokerURL=
embeddedBroker=enabled
connection.retry=10
toggleMaster=true
xbeanURL=./broker.xml
embeddedBrokerProperties=embedded-broker.properties
topicName=VirtualTopic.geoserver
connection=enabled
toggleSlave=true
connection.maxwait=500
group=geoserver-cluster

And the embedded-broker.properties

## JMX settings (can be overridden by env vars)
## For more information, see: http://activemq.apache.org/jmx.html
# enable/disable broker jmx
activemq.jmx.useJmx=false
# set the JMX connector port
activemq.jmx.port=1098
# set the JMX connector host
activemq.jmx.host=$DOCKERIP
# enable the JMX connector
activemq.jmx.createConnector=false

## broker settings
# set the base path of the temporary broker dir
# this is also used as persistence base dir
#activemq.base=./

## configuring the embedded broker
# connects the server via native I/O socket to the local network broadcast using an automatic assigned port
# maximumConnections and wireFormat.maxFrameSize are added to avoid ddos attacks
activemq.transportConnectors.server.uri=tcp://$DOCKERIP:0?maximumConnections=1000&wireFormat.maxFrameSize=104857600&jms.useAsyncSend=true&transport.daemon=true&trace=true

## the broker performs discovery using the following protocol:
# multicast on default network
activemq.transportConnectors.server.discoveryURI=multicast://default

## persistence settings and system usage
## The systemUsage controls the maximum amount of space the broker will
## use before slowing down producers.
## For more information, see: http://activemq.apache.org/producer-flow-control.html
# enable/disable persistence
activemq.broker.persistent=true
# heap memory usage
activemq.broker.systemUsage.memoryUsage=128 mb
# disk space memory usage
activemq.broker.systemUsage.storeUsage=1 gb
# temp disk space memory usage
activemq.broker.systemUsage.tempUsage=128 mb

My docker compose (main elements)

version: "3.2"

services:
  geoserver:
      image: geocento/geoserver
      ports:
        - "8650:8080"
      restart: on-failure
      env_file:
        - geoserver.env
      networks:
        geoserver2:
  geoserver2:
      image: geocento/geoserver
      ports:
        - "8651:8080"
      restart: on-failure
      env_file:
        - geoserver.env
      networks:
        geoserver2:
etc...
networks:
  geoserver2:
    ipam:
      driver: default
      config:
        - subnet: 10.10.0.0/24


texts: How to completely delete overlapping polygons with one shapefile?

texts: I can't figure out a method or find a tool that would completely delete (or disregard) just the overlapping polygons (red) that intersect with the Puerto Rico polygon (black). I essentially want to create a shapefile with just the polygons that don't intersect with the black polygon. I am using ArcGIS 10.3.


texts:
I would like to learn more on processing SAR images (general characteristics, pre-processing, filtering), in particular Sentinel-1, for crop monitoring (paddy rice in particular) in areas where optical imagery normally fail due to heavy cloud.

Is there any good training/resources to start?


texts: Formula to Check Latitude & Longitude is within Area without Google Maps Api

texts:
I got this Example Map

SampleMap:
http://techinfo.co.id/test/map.php

I make Boundary Polygon shape ,

-6.875165174925262, 107.56293296813965
-6.882663904407988, 107.66730308532715
-6.980818117491586, 107.67210960388184
-6.97093546084682, 107.54508018493652

And How to check if the given Lat, Lng is -6.935884,107.611592 in those Boundary Area

But what i need is without Google Maps Api .. because it's gonna be Offline


texts: Automatically create an array of all visible layer names in QGIS

texts:
How can I get an array of all visible layer names automatically using QGIS expressions? In principle it should work with the variable @map_layers. Using the following expression works fine for what I want to do, but only in a semi-manual way:
array (
    layer_property(
        array_get (
            @map_layers ,
            0
        ),
       'name'),
    layer_property(
        array_get (
            @map_layers ,
            1
        ),
        'name'
    )
)

I have to add manually an array_get (@map_layers, [index]) statement for each layer. I would rather like to iterate and get all visible layers automatically, indifferent of how many layers are visible. In a first step, I calculate the no. of visible layers: array_length (array_first (array ( @map_layers  ))) (abbreviated no_visible in the next expression).
Where I'm stuck is iterating to create the layer name for for each visible layer. I tried the following expression, but it returns no results: No feature was found on this layer to evaluate the expression.
array_foreach (
    generate_series(0,[no_visible]),
    layer_property (
        array_get (
            @map_layers ,
            @element
        ),
        'name'
    )
)

What am I doing wrong?
Update:
The expression in itself seems to be correct, even though the one offered by @lejedi76 is more elegant to achieve the same goal. However, the behavior of QGIS is quite buggy when using either of these expressions to select several (raster) layers at once as input for a tool in batch mode - see https://gis.stackexchange.com/a/385917/88814 for details.


texts: QGIS plugin: are project variables creatable and writable

texts:
I like to develop a plugin and made a github repository.
Upfront: this is my first time and haven't got a clue yet.

This is my target:

 This plugin is intended to be used in QGIS.
 QGIS has the ability to create and store variables that are specific to the software in
 general, a loaded project or a specific datalayer in a project. These variables can be
 called upon on in all sorts of algorithm and expressions.

 TARGET:
 The intended purpose of this plugin is to read a UI file when it is first used.
 The plugin should read the amount of inputfields in the UI file.
 It should add the same amount of projectvariables to the QGIS project and name them in a
 similar way they are named in the UI.

 Everytime the QGIS-project is opened the plugin should read the variables-values and
 display them when the plugin is loaded. So the QGIS user doesn't need to set all the values
 on project startup, instead the plugin uses the last know values.

 The intend of this project is to make a plugin that is easily changeable to the end-users
 needs.

Why this plugin:
I, and probaly more users, have a goto project file in which work is done.
I have setup this project with 3 types of layers:
- Baselayers, which contain the skin of the earth.
- Informationlayers, which contain features on the earth.
- Worklayers, layers where work is done, using the base- and informationlayers.

This plugin helps me augment the symbology of the base- and informationlayers in a cental and easy-to-use place. At the moment i use a referencelayer (a .csv file) in which i store values, that are called upon by the symbology and labels of the base- and information layers.
The idea is to use the project variables instead of the values in the .csv file and use the plugin to change the values of the variables.

Example, this is the way I control the color of depthareas in my project with an expression:

CASE
-- green areas that are dry at LAT
WHEN DRVAL1 < '0' THEN '#84CC93'
-- Darkblue areas between LAT and the shallow contour
WHEN DRVAL1 < attribute(get_feature('chart-
symbology_reference','value_type','Shallow'),'decimals') AND DRVAL2 > '0' THEN '#83BCE6'
-- blue areas between the shallow contour and safety contour
WHEN DRVAL1 < attribute(get_feature('chart-
symbology_reference','value_type','Safety'),'decimals') AND DRVAL2 >
attribute(get_feature('chart-symbology_reference','value_type','Shallow'),'decimals') THEN
'#A4E1EC'
-- lightblue areas between the safety contour en deep contour
WHEN DRVAL1 < attribute(get_feature('chart-
symbology_reference','value_type','Deep'),'decimals') AND DRVAL2 >
attribute(get_feature('chart-symbology_reference','value_type','Safety'),'decimals') THEN
'#AFF2DD'
-- verylightblue areas between the deep contour and infinite depth
WHEN DRVAL1 < '1000' AND DRVAL2 > attribute(get_feature('chart-
symbology_reference','value_type','Deep'),'decimals') THEN '#FFFFFF'
END

Instead of the "attribute(get_feature('chart_sym....." i would like to reference to a project variable, and control the value of the projectvariable with a GUI.

I have made an UI file in QT 5 Designer:

In this case the plugin should create 15 variables in the project.
The names of the variables should be similar to the name of the input in the UI.
But a different user, should be able to upload a different UI-file, which then creates the right amount of projectvariables that can be called upon in an expression as: @created_variable_name.

My main questions:

Does QGIS allow the creation of project-variables by a plugin?

Although setting up the variables once in the project isn't a major task, it is more user-friendly to have this function and makes is easier to use for beginning users.

Does QGIS allow a read/write function from a plugin to the projectvariables?
What is the best book to buy, or tutorial to follow, in creating this plugin?


texts: Set picture marker symbol for a layer with arcpy (ArcGIS)

texts:
I have an ArcGIS map document with one layer symbolized with Categories > Unique values. I want to update symbology for this layer by specifying a path to a picture marker symbol for every unique value. I can do that manually by clicking each default symbol in the Layer properties > Symbology and then Edit Symbol > type = Picture Marker Symbol and browsing to the file needed.

I have a list of attribute value -- name of .bmp file on disk.

Is there a way to do this in an automated way with ArcGIS/arcpy?


texts: How to align labels using Label toolbar?

texts: I'm worried I'm missing something terribly obvious here: how do you set the alignment (left / centre / right) for feature labels? I'm referring to QGIS 1.8, and using the 'Label' toolbar, rather than Layer Properties labeling.


texts: How to drop rows from a GeoPandas dataframe that are raising errors, in this case: TopologyException, Ring Self-intersection

texts:
I am trying to find the points from a geopandas frame that are inside the polygons from another geopandas frame. The code that I am using is the following:

points[points.geometry.within(polygons.unary_union)]

Most of the times it works, but for one file it gives me this error:

TopologyException: Input geom 0 is invalid: Ring Self-intersection at or near point -71.126795046686823 42.767412284376533 at -71.126795046686823 42.767412284376533

this error is raised when I do

polygons.unary_union

My understanding is that (at least) one of the polygons is invalid.

I don't mind if I drop some polygons, I don't need to be 100% accurate. The question is: How do I drop the rows from a geopandas frame that are raising the TopologyException

The polygon dataframe is coming from: https://docs.digital.mass.gov/dataset/massgis-data-2016-land-coverland-use

The particular shp file with problems: http://download.massgis.digital.mass.gov/shapefiles/lclu2016/LCLU_R02C18.zip


texts:
I have laoded my lines data in MS-SQL in one table. I have points data in DBMS as well in separate table . When I open both table the map window would show lines and points as I want but now when I join more points the data is updated to points table. And since point table is table to store points only and line table is to store line data only. How is it possible to solve this issue so that when I connect points Line table is updated?

  I am using

  Microsoft SQL 2008
  Connect the dots Tool to connects points ( actually I need line
  data in line table)
  Mapinfo 10.0


texts:
I want to select some features and do some actions to this selected features.
Something like if attribute in field a is = abc than do something. But the selection will not fit. As written in https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html i have tried:

query = ' "fieldname" = \ 'attribute\ ' '
request = QgsFeatureRequest().setFilterExpression(query)
for feature in self.layer.getFeatures(request):
   'do something'

Fieldname and attributs are arrays and i want to iterate them. That's the Problem!
How can i write the query in the correct syntax?

What i need issomething like:

query = " ' " + ' " ' + fieldname[i] + ' " ' + ' = ' + '\' + " ' " +  attribute[j] + ' \ ' + " '' "

or

query = chr(39) + chr(34) + fieldname[0] + chr(34) + chr(39) + chr(61) + chr(92) + chr(39) + attribute[j] + chr(92) + chr(39) + chr(39)

Both will not work.
Any Idea?


texts: Extract polygon name dataframe if the geo-point is inside polygon?

texts:
I have two dataset one with polygon name and polygon and other with location name and latitude and longitude.

Data 1 (Geopandas Dataframe)

import geopandas as gpd
data_poly = gpd.read_file(path + "Data_community_file.geojson")

COMMUNITY NAME   POLYGON
New York         MULTIPOLYGON (((55.1993358199345 25.20971347951325,
                 55.19385836251354 25.20134197109752.... 25.20971347951325)))
Chennai          MULTIPOLYGON (((65.1993358199345 22.20871347951325,
                 55.19325836251354 15.20132197109752 .... 15.20971347951325)))

Data 2 (Data Frame)

STOP NAME            LONGITUDE       LANGITUDE
Chennai main stop    55.307228       25.248844
Cabra stop           55.278824       25.205862
USA stop NY          55.069368       24.973946

If the data 2 (stop_name) is inside in the data 1 (polygon) need to extract the name of the polygon. ie. if the USA Stop NY is present in any "New York" need to add the name in the new column in data2.(You need to convert the lat and lot to Point(Lat,Lon) format for the below code.)

Sample code :

import json
    from shapely.geometry import shape, Point
    # depending on your version, use: from shapely.geometry import shape, Point

    # load GeoJSON file containing sectors
    with open('sectors.json') as f:
        js = json.load(f)

    # construct point based on lon/lat returned by geocoder
    point = Point(-122.7924463, 45.4519896)

    # check each polygon to see if it contains the point
for feature in js['features']:
    polygon = shape(feature['geometry'])
    if polygon.contains(point):
        print(feature)

The above code will able extract the polygon based on the "Point". How to apply the same for the data frame in the place of the point?


texts: Get the vertices on a LineString either side of a point (Sql Server 2008)

texts:
I have a point that sits on top of a LineString, both Sql Geometry types.

POINT('0.5 0.5')

LINESTRING('0 0 NULL 1, 1 1 NULL 1')

I want to find the vertices of the LineString that lie either side of the point so that I can interpolate the Z and M values. Based on the values above my desired result would be:

POINT('0.5 0.5 NULL 0.5')

Can this be achieved in Sql Server 2008 or is there an add-on available to support this?

In reality I would be querying a LineString containing many points, not just two as shown in the example above.


texts: Interface that provides access to property/method that shows whether Layer is visible?

texts:
I came across some hack code that I wrote from a few years back that I need rewrite in c#. At the time, I couldn't find property/method that would tell me if a layer was actually visible on the map. As opposed to the ILayer.Visible property which is the potential for a layer to be visible. IMapLayers.IsLayerVisible looked promising but it didn't return the expected values.

My ESRI incident didn't have a related bug and the resolution to that incident was my own hack that I provided.

How are others obtaining this information about a layer's true visibility within a map?

When I said true visibility, I meant that if a layer was visible and it's parent/grandparent/etc are visible too. 'True visibility' was a poor choice of words on my part, because it could be interpreted as a visible layer that has features within the current extent (which is not what I need).


texts: No images in popups (only URL is displayed)

texts:
I'm trying to do a mapaweb test from Qgis 3.4, generating the same with Qgis2web. The map has popup images. In local mode, the images are seen perfectly at the point I want.

To upload to the network, I have changed in the PHOTO field of Qgis table the web address of each image and I have uploaded to the server of my website all Qgis2web folders. also, in the code of Layers.js and Qgis2web.js, I have already changed "Photo" to "attachment", but only the web address where the image is hosted is displayed, not the image.

Can someone help me with this question?


texts: ArcObjects WPF Legend Toolkit Control doesn't show layers

texts:
I'm starting to develop GIS applications using ArcObjects for c# and WPF.

I'm trying to migrate a legacy ArcObjects application to the newest version. I'm simply adding a map control with its legend, using the Esri.ArcGISRuntime.Toolkit. Nothing special here. So I followed the examples, put the map and bind the legend to the map like this:

<esri:MapView x:Name="MyMapView" Margin="47,0,40,48" Grid.ColumnSpan="3" Grid.Column="1" >
            <esri:Map x:Name="MyMap">
                <esri:ArcGISTiledMapServiceLayer ID="BaseMap"
            ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            </esri:Map>
        </esri:MapView>

<esri:Legend x:Name="MyLegend" Grid.Row="1" Layers="{Binding Map.Layers, ElementName=MyMapView}"    > </esri:Legend>

Then I add a GraphicsLayer programmatically:

  GraphicsLayer pointLayer = new GraphicsLayer();
  pointLayer.DisplayName = "My Layer  Name ";
  pointLayer.ShowLegend = true;
  pointLayer.Graphics.Add(CreateMapPoint()); // Adds a simple marker
  pointLayer.ID = "SimpleGraphicsLayer";
  MyMap.Layers.Add(pointLayer);

But when I execute the application, the legend is blank. No layer information is shown. In the legacy application, where we used and older version of ArcObjects worked fine.


texts: Attribute error: 'NoneType' object has no attribute 'GetLayer' geoPDF

texts:
I have written some code to export projection information from geoPDF’s. For some reason on some of the files I get the following error and other are fine.
    AttributeError: 'NoneType' object has no attribute 'GetLayer'

As I understand the above error it means that the proj variable is empty. When I check the files with GDALINFO it clearly shows the projection information
My Code
    fileName = 'filename'
    filePath = 'path/to/file/'

    driver = ogr.GetDriverByName('PDF')
    dataset = driver.Open(filePath + fileName +'.pdf')

    # from Layer
    layer = dataset.GetLayer()
    spatialRef = layer.GetSpatialRef()
    # from Geometry
    feature = layer.GetNextFeature()
    geom = feature.GetGeometryRef()
    spatialRef = geom.GetSpatialReference()

    spatialRef.MorphToESRI()
    file = open(filePath + fileName +'.prj', 'w')
    file.write(spatialRef.ExportToWkt())
    file.close()

    print (neatline_wkt)
    print (spatialRef)

Some PDF files raise the following error but others don't. For example this file has projection information embedded as per below - https://usfs-public.box.com/shared/static/26rhbxx7oqxdtw5efxi5asd894cwbmwb.pdf but causes an error.
    gdalinfo CA_Plumas_National_Forest_Greenville_MVUM.pdf
    Driver: PDF/Geospatial PDF
    Files: CA_Plumas_National_Forest_Greenville_MVUM.pdf
    Size is 5250, 3412
    Coordinate System is:
    PROJCS["NAD_1983_UTM_Zone_10N",
        GEOGCS["GCS_North_American_1983",
            DATUM["North_American_Datum_1983",
                SPHEROID["GRS_1980",6378137.0,298.257222101]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["False_Easting",500000.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",-123.0],
    PARAMETER["Scale_Factor",0.9996],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]]
    GeoTransform =
     620218.9230522923, 14.39324062623421, -4.455847902786653e-06
     4470454.925909669, 0.0001940513634986329, -14.39592969090605
   Metadata:
     CREATION_DATE=D:20190529162113-08
     CREATOR=Esri ArcMap 10.5.1.7333
     NEATLINE=POLYGON ((649617.508764131 4422834.69664129,649617.465150077
     4468987.38965106,694136.387837796 4468987.60928566,694136.315653489
     4422835.67742383,649617.508764131 4422834.69664129))
     Corner Coordinates:
     Upper Left  (  620218.923, 4470454.926) (121d35' 1.84"W, 40d22'33.65"N)
     Lower Left  (  620218.908, 4421336.014) (121d35'34.82"W, 39d56' 0.99"N)
     Upper Right (  695783.436, 4470455.945) (120d41'39.34"W, 40d21'42.13"N)
     Lower Right (  695783.421, 4421337.033) (120d42'33.00"W, 39d55'10.27"N)
     Center      (  658001.172, 4445895.979) (121d 8'42.09"W, 40d 8'54.83"N)
     Band 1 Block=5250x1 Type=Byte, ColorInterp=Red
     Band 2 Block=5250x1 Type=Byte, ColorInterp=Green
     Band 3 Block=5250x1 Type=Byte, ColorInterp=Blue

Similar file - https://usfs-public.box.com/shared/static/jv6cf5tp30smo4t1kei9i807xjbnxrmm.pdf has no issues and can create projection file.
Any clues on how to resolve?


texts: GeoJSON data format fetching from PostgresQL


texts:
As far as I can see the up to date version of OpenLayers is 5.2. I am trying to connect my OpenLayers to my WPS but I have no luck doing so. All the info I can get says that there was WPS support in version 2 but "now" (old sources) in version 3 it wasn't implemented. I can't find any sources on how this is in the current version...

All I tried did not succeed so I got the feeling that trying to connect to my WPS like I would do in version 2 won't work at all. Before I continue to try to connect OpenLayers and my WPS I would like to have this question clarified.

So code like this won't work or I am using it wrong?

// Create a WPSClient instance for use with the local GeoServer
this.wpsClient = new OpenLayers.WPSClient({
    servers: {
        local: '/geoserver/wps'
    }
});


texts: How to disable on-focus "scrolling" of dropdownlists in QGIS forms?

texts:
The dropdownlists in QGIS form has an advanced action behaviour i.e. the items in a dropdownlist are getting scrolled while we scroll the mouse wheel by focusing over the control.

I don't want this behaviour and I need to disable this. Is there any existing plug-in to achieve this? or give me suggestions on this.

Thanks.


texts:
Could you, please, explain me the difference between two types of coordinates:

[-11539.488377739675,6710096.017961704]

and

51.4977973,-0.2691569

These coordinates represent London location, but they are different! Why?


texts: OpenLayers - possible to display detailed GIS data?

texts:
I have an OpenLayers app to plot point features, but need to read in a very detailed multipolygon vector layer to plot an accurate location.

I'm currently loading the polygon layer via TinyOWS. I've set maxZoom to 2000 in OpenLayers and am using BBOX strategy. When I zoom in the first load is ok, but the whole layer gets loaded and I can see it when I zoom out despite the maxZoom.

The application now runs too slowly.

I'm new to this and wondered if someone could point me in the right direction. I got some pointers here: Different level of detail(layers) on different zoom level at  OpenLayers map and here: OpenLayers GML Polygon Performance

Here's the WFS call for the polygon layer:

pos_skotsel = new OpenLayers.Layer.Vector("Pos_Skötsel", {
    strategies : [new OpenLayers.Strategy.BBOX()],
    projection: new OpenLayers.Projection("EPSG:4326"),
    protocol: new OpenLayers.Protocol.WFS({
        version: "1.1.0",
        srsName: "EPSG:4326",
        url: "http://XX.XXX.XXX.XXX/cgi-bin/tinyows",
        featurePrefix: "tows",
        featureNS :  "http://www.tinyows.org/",
        featureType: "XXXX",
        maxScale: 2500,
        geometryName: "geom"
    })
});

map.addLayers([gphy, wfs, pos_skotsel]);


texts: Geoserver not buffering external graphic in PointSymbolizer

texts:
We've got some Point data we're displaying in a WMS layer using geoserver 2.2 (same problem on 2.3.1). We style it with the following SLD

<Rule>
    <PointSymbolizer>
     <Graphic>
       <ExternalGraphic>
         <OnlineResource
           xlink:type="simple"
           xlink:href="http://server/directory/image.png" />
         <Format>image/png</Format>
       </ExternalGraphic>
       <Size>28</Size>
     </Graphic>
   </PointSymbolizer>
</Rule>

The problem is that when I click on the edge of the image displayed, the getFeatureInfo returns nothing. When I click dead-center or near-center, I get my data.
I have checked that the image is indeed 28px by 28px

I have added a buffer parameter to the getFeatureInfo request and that "solves" it but my images are different sizes in other layers so that's not a satisfying solution.

Any idea why geoserver might not be computing the buffer correctly ?
Thanks


texts:
This is slightly complicated. I have a dxf created by autocad which seems to have been corrupted. It will not open in AutoCAD. However, it opens in QGIS.

I tried selecting the file in QGIS and saving as DXF. however when i try to open it in AutoCAD it cause AutoCAD to crash.

this is a similar question to Exported DXF from QGIS won't open in AutoCAD but it was not adequately answered.

Any suggestions.


texts: Creating a program using GeoTools to find if a given point is inside the GeoJSON file

texts:
I have this GeoJSON file with the coordinates of neighborhoods in Valencia (Spain). Then I am using GeoTools to load the file and check if a given coordinate is inside the GeoJSON file and if YES retrieve the unique id of that region. I created my Java program based on this answer. It is compiling but I cannot find if my point is inside a region of the GeoJSON file.

{
  "type": "FeatureCollection",
  "name": "boundary_administrative_Valencia_lines",
  "crs": {
    "type": "name",
    "properties": {
      "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
    }
  },
  "features": [
    {
      "type": "Feature",
      "properties": {
        "full_id": "w4786833",
        "osm_id": "4786833",
        "osm_type": "way",
        "admin_level": "4",
        "boundary": "administrative",
        "natural": "coastline",
        "surface": "",
        "name": "",
        "border_type": "",
        "highway": "",
        "name:ca": "",
        "name:es": "",
        "name:lt": "",
        "wikidata": "",
        "wikipedia": "",
        "source:date": "",
        "ref": "",
        "name:it": "",
        "bridge": "",
        "layer": "",
        "man_made": "",
        "name:en": ""
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            0.1778961,
            38.8127748
          ],
          [
            0.1777836,
            38.8128318
          ],
          [
            0.1777124,
            38.8129247
          ],

My Java program:

public class TestGeoJson {
    public static void main(String[] args) {
        try {
            File inFile = new File("resources/valencia/boundary_administrative_Valencia_lines.geojson");
            if (!inFile.exists()) {
                return;
            }
            Map<String, Object> params = new HashMap<String, Object>();
            params.put(GeoJSONDataStoreFactory.URLP.key, URLs.fileToUrl(inFile));
            DataStore newDataStore = DataStoreFinder.getDataStore(params);

            String pt = "LineString (0.1778961 38.8127748)";

            FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
            SimpleFeatureSource featureSource = newDataStore.getFeatureSource(newDataStore.getTypeNames()[0]);
            Contains contains = ff.contains(
                    ff.property(featureSource.getSchema().getGeometryDescriptor().getLocalName()), ff.literal(pt));
            SimpleFeatureCollection collection = featureSource.getFeatures(contains);
            if (collection.size() > 0) {
                try (SimpleFeatureIterator itr = collection.features()) {
                    while (itr.hasNext()) {
                        System.out.println(itr.next());
                    }
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


texts: How to cell wise large raster/stack in R?

texts:
Now there are time series rasters r1,r2,r3,...,r100. I want to predict future values cell-wise and generate new rasters (i.e., r101,102...).
Fake code as follows:

#stack all raster
stk <- stack(r1,r2,r3,...,r100)
#convert stack to numeric， one column corresponding to one layer,
#rows coresponding to raster cells.
vals <- values(stk)
# apply function on each row (cells),predicted values saved to array
arr <- apply( vals,1, function)
#write to new Rasters
writeRaster(arr,'/r101.tif')

This method is available for small size stack because it read all data into memory in R. If the stack is large, are there other methods processing block by block on stacks/raster?


texts: Using IF-Statements in Calculate Field Code Block inside an Iteration

texts:
I have created a model in ArcGIS 10.2 that iterates through some feature classes in order to add a field 'Zmin10' (double) and calculate the field value based on a variable (called "Minimum") to which it adds a different value based on the feature class name ("outName").

Here is the model:

The Calculate Field Tool ('Recalculate Field Zmin10') is set as following:

Expression: shift( !Zmin10! )

Expression type: Python

Code Block:

def shift(Zmin10):
if %outName% == 'toc':
    return (( float(%Minimum%) ) - 20)
elif %outName% == '2016':
    return (( float(%Minimum%) ) - 40)
elif %outName% == '2017':
    return (( float(%Minimum%) ) - 60)
else:
    return (( float(%Minimum%) ) - 80)

The code block does not work at all for the feature class named 'toc', where I get the following error:

Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 2, in shift
NameError: global name 'toc' is not defined

For the other options, it always returns the value according to the "else" part of the statement, as if somehow it does not recognise the other values either.

I do not understand exactly where the code is wrong and why.

For more clarity, the Python script is attached:

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("Model Functions")

# Script arguments
Input_Folder = arcpy.GetParameterAsText(0)
if Input_Folder == '#' or not Input_Folder:
    Input_Folder = "D:\\ArcGIS\\Scripts\\ModelTransects\\test_final\\03_SHP\\Tempor" # provide a default value if unspecified

Minimum = arcpy.GetParameterAsText(1)
if Minimum == '#' or not Minimum:
    Minimum = "-157.3" # provide a default value if unspecified

# Local variables:
path_points_sel__1_ = Input_Folder
path_points_sel2 = path_points_sel__1_
path_points_sel__2_ = path_points_sel2
Name = Input_Folder
outName = Name

# Process: Iterate Feature Classes
arcpy.IterateFeatureClasses_mb(Input_Folder, "*points_sel*", "POINT", "RECURSIVE")

# Process: Calculate Value
arcpy.CalculateValue_management("changeName(\"%Name%\")", "def changeName(Name):\\n    return str(Name[16:])", "String")

# Process: Add Field
arcpy.AddField_management(path_points_sel__1_, "Zmin10", "DOUBLE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")

# Process: Recalculate Field 'Zmin10'
arcpy.CalculateField_management(path_points_sel2, "Zmin10", "shift( !Zmin10!, %outName% )", "PYTHON", "def shift(Zmin10, outName):\\n    outName = %outName%\\n    if outName == 'toc':\\n        return (( float(%Minimum%) ) - 20)\\n    elif outName == '2016':\\n        return (( float(%Minimum%) ) - 40)\\n    elif outName == '2017':\\n        return (( float(%Minimum%) ) - 60)\\n    else:\\n        return (( float(%Minimum%) ) - 80)")


texts: Create raster out of overlapping buffers within the same shapefile in QGIS 3.0

texts:
This question has been asked before but none of the provided solutions work for me.

I have a bunch of points. Around the points I have created buffers which overlap to differing degrees.

Each buffer has a feature value of 1, and I would like to add these feature values together where the buffers overlap, like in the image below.

From these new intersecting fields I want to create a raster with the feature count as the burn-in value.

I have tried "intersection" using the buffer shapefile layer as both input and intersection layer. I have also tried "Union" on the buffer shapefile layer, and then "Join attributes by location" with the union layer and the original buffer layer, suggested by AlmaThom here: Split and count overlapping features within a layer.

With both these methods I used count() in the field calculator to calculate the number of buffers that intersect each buffer.

The problem with this method is that it does not cut out new fields where the buffers intersect and count their overlapping features. It just sums the features of the buffers that are touching. This is what the raster output looks like:

Supposedly one can do this using the Sextante plugin but it does not seem to be available for QGIS 3.0. Another option would be to use QGIS Processing Toolbox | SAGA | Vector polygon tools | Polygon self-intersection as suggested here: How to sum up values of overlapping polygons in QGIS?

but in QGIS 3.0 I cannot choose an attribute table field as the identifier, only a layer. When I try to run Polygon self-intersection with the buffer layer as both the Polygons layer and the Identifier layer I get "TypeError: must be str, not bytes" and "UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 166: ordinal not in range(128)".

Is there another way of creating a raster from overlapping features within the same shapefile in QGIS or can I improve what I have already tried?


texts: How to export Google Maps zip polygon to shapefile

texts: I have the following URL that is a zip polygon from Google Maps that I want to export to shapefile and open in QGIS. How can I do that?


texts:
I'm trying to use IIS 7 Manager to publish a web map on the internet except I have the folowing problem:

I installed the ArcIMS web ADF for Java, and created a new webpage which depends on ArcIMS services (using ArcIMS admin), and then deployed it. When I opened the URL using another PC the page did not load.

To summarize, I have ArcIMS 9.3 (with servlet 5.0), ArcIMS web ADF for Java. What can i do to publish my web map ?


texts: Getting similar IDW results using Spatial and Geostatistical Analysts for spatial interpolation of data with many zeros?

texts:
My data are plant biomass data from hundreds of sites. Most sites have zero biomass; these zeros are real. Thus, my data violate most assumptions of geostatistical interpolation methods (confirmed using Geostat. toolbox): non-normal distribution without log transformation (zero problem), clustering of sites with biomass, data are mostly stationary except near transitions out of vegetated areas, autocorrelated over very short distances.

I conducted IDW and Local Polynomial interpolations using Geostatistical Analyst and received mediocre results. The main problem is that there are very few areas predicted to have zero biomass.

In Spatial Analyst, simply selecting a small number of points with a variable search tracked the data much better. How can I get similar results using IDW in Geostatistical Analyst in order to get at least one measure of fit (RSE)?

Can my process/decision for interpolation be adequately justified for a paper, or should I be doing something else?


texts: How to exclude the "More" tab where your operational layers are stored in the Flexviewer 2.2

texts:
I am using Robert's awesome TOC widget.
I want to exclude the "more" tab where your operational layers show up, because they are listed in the TOC widget.

Can I do this in the config.xml?


texts: FME: Coordinates with a buffer - how to merge / dissolve points that overlap other buffers?

texts:
I'm trying to process some spatial query in FME.
I have a dataset of cities with coordinate pairs and around these coordinates a buffer of 2 km.
This results in multiple overlaps. I'd like to dissolve / merge overlapping buffers iteratively - the end result should be coordinate points that do not fall in other buffers.
A small sample of the dataset:
city        latitude    longitude
Eimerscheid 50.32347    6.28562
Herresbach  50.31878    6.25724
Buchholz    50.37366    6.31761
Berterath   50.34185    6.36569
Wereth      50.34612    6.23684
Merlscheid  50.35004    6.35369
Lanzerath   50.35751    6.33538
Hüllscheid  50.35154    6.35991
Holzheim    50.3506     6.29338
Afst        50.33713    6.37743
Honsfeld    50.38147    6.28045
Hünningen   50.39588    6.292
Manderfeld  50.33088    6.34126
Schönberg   50.28791    6.25646
Krewinkel   50.33139    6.38102
Weckerath   50.31921    6.3559
Medendorf   50.33362    6.28759


texts: What data does Esri use to create their US_RoofTop locator?

texts:
I'm creating address locators to be published on my local ArcGIS server instance and used by various applications. My server does not have access to the internet so I'm unable to use Esri's online locators.

The "US_RoofTop" locator from Esri's online service is providing me with extremely accurate results in many cases. I was wondering what datasets Esri uses to build this locator?

The locators that I create from TomTom's MultiNet or TIGER/Line aren't nearly as accurate.


texts:
I downloaded GeoExt to follow the Boundless tutorials.

Already have geoserver installed on my local machine running in Jetty that comes by default in the installer for Windows, with openlayers putting my pages in the www folder of geoserver and accessing the browser.

My question is where should I unzip the GeoExt?


texts: Selection anchor is missing in Arcmap/Aligning a shapefile to another shapefile

texts:
Features got accidently moved without me noticing it before saving the edits, now I need to align them with the shapefile that is still correct.

To do this I thought I could best use the anchor points combined with snapping. But to my surprise there is no anchor point when selecting a feature.

What can I do to make it reappear?


texts:
As the project requires, I built virtual raster catalog merging two raster DEM files. Because I don't want to use the whole surface of the new Virtual Raster, I went on to clip a desired rectangle. When I do this, QGIS is taking forever to complete the process (forever meaning it never completes it) and after a while, I have to close the whole program and restart it. I found this problem to be more often in the latest versions of QGIS (I'm using the latest, 2.14.2 version).
ps. I checked the newly created file while it was still processed and the file size was ridiculously large (I mean gigabytes, while in the past the output was with smaller file sizes).


texts: Adding link to road network to use in ArcGIS Network Analyst?

texts:
I have an existing road network in a shapefile.  I need to add two extra links/roads.

I added these as lines to the shapefile, making sure to 'split' the line in the original network to make a junction that the new line could 'snap' to.
However, when I try to build the network it doesn't work.

It works fine when I delete the new road so it must be something I am doing wrong with the new road.

Are there stages I am missing?

Do I need to fill in the attributes of the new road (length) etc., and what is the quickest way to do this if so?

The dataset has many attributes so if I need to fill them in for new links, is it possible to find out which ones are needed in order to make the network? (as a lot of information is probably not used).


texts: How can I export data from a feature layer in ArcGis Server?

texts:
I'm using a public ArcGis server with some data I would like to export to shape or some other format. I know I can make a program (I'm a developer) that could query the server for all the features on that layer, but I would like something cleaner.

Is there a easy way to export data from a feature layer in ArcGis Server to Shapefile using ArcMap or via web?


texts: Creating polygons based on overlapping buffers and classifiers using ArcMap

texts:
I have a shapefile with around 100 points, each representing 4 different types of habitat. My goal is to create polygons around areas of the same type of habitat. I've created 100 m circular buffers around each of the approximately 100 points. If buffers overlap and are the same type of habitat, I'd like to draw a polygon around all those buffers of the same type. If buffers overlap and are different types of habitat, I'd like to divide those polygons down the middle.
How can I go about doing this?
I'm using ArcMap 10.7.1.


texts:
I got the shapefiles in QGIS and transformed them to UTM NAD83 from WGS84, then tried to create a DXF of it so I could use it as an overlay in fieldgenius software for a topographic survey we're conducting. But the DXF created falls wayyyyy on the other side of the world compared to the partial survey I've already done in UTM NAD83. I tried using the DXF file back into QGIS and does the same.
It's my first time experimenting with it, does it lose it's coordinate system information? How can I bring back to right system?


texts: Subset by year in a raster stack, save individual raster stacks, & then loop into biovars function in R

texts:
I have raster bricks of monthly max temperature, min temperature, and precipitation for various time periods (e.g., from 2090-2100, in this example).
> tmax
class      : RasterBrick
dimensions : 3875, 8017, 31065875, 132  (nrow, ncol, ncell, nlayers)
resolution : 0.04490319, 0.04490319  (x, y)
extent     : -180.0393, 179.9495, -90.04088, 83.95898  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84
source     : Z:/CHELSAcmip5ts_tasmax_ACCESS1-3_rcp85_2090-2100.nc
names      : X2090.01.15, X2090.02.15, X2090.03.15, X2090.04.15, X2090.05.15, X2090.06.15, X2090.07.15, X2090.08.15, X2090.09.15, X2090.10.15, X2090.11.15, X2090.12.15, X2091.01.15, X2091.02.15, X2091.03.15, ...
Date       : 2090-01-15, 2100-12-15 (min, max)
varname    : air_temperature

I need to (a) create individual raster stacks consisting of 12 layers for each year in the period. I know I can do the following to subset and save the individual rasters:
sub_ras <- subset(tmax,  grep("X2090", names(tmax)))
writeRaster(sub_ras, file="tmax2090", format="GTiff")

But I am not sure how to loop this? I'll eventually need to do this for a raster brick of monthly data from 1970 to 2100.
Once I have my individual raster stacks for each year, I'll then need to read them in individually into the biovars function to create bioclim variables for each year. Shall I then use mapply to do this as follows:
pre = c("/path/pre2090.tif", "/path/pre2091.tif", ..., "/path/prec2100.tif")
tmax = c("/path/tmax2090.tif", "/path/tmax2091.tif", ..., "/path/tmax2100.tif")
tmin = c("/path/tmin2090.tif", "/path/tmin2091.tif", ..., "/path/tmin2100.tif")

output <- mapply(FUN = biovars, pre, tmin, tmax)

Will this give me a biovars raster for each year?
Or, does someone have a more elegant suggestion for this process?


texts:
How do I save a file in QGIS as gpkg?

I wish to use this file format because it supports column names larger than 10 characters.


texts: Auto-Create polygons from Geo-referenced PDF

texts:
Is it possible to automatically create polygons/features from a georeferenced PDF?

I'd like to geo-reference an expanded view of the below linked pdf, and then have each of the tracts created automatically in a separate shapefile. I know it would probably be too much to ask for to have the Tract numbers also added as attributes, so I'd need to add those later.

Map Example

I'm using ArcMap Desktop 10.1 Advanced License. I attempted to convert to polyline like crid suggested, and after a couple of hours, the process appeared to complete and then arcmap crashed.


texts: Using multiple If/Else if statements in Arcade Symbology Expression?

texts:
I am tasked with creating a multiple If/Else If statement in an Arcade Symbology Expression.

I have 16 date fields, 8 sets of a planned submittal date, and 8 sets of the actual submittal date.  So I need to symbolize when something is being submitted late, OR is past today's date.  However, if the last/final submittal field is on time or early, it shouldn't be marked late anymore.

I have tried a few variations, but this is the closest I have come to getting a correct output:

function switch(value){
    if (value){
        return false;
    } else {
        return true;
    }
}

if (switch(isEmpty($feature.ActualApproveSummary))) {
    if ($feature.ActualApproveSummary > $feature.PlannedApproveSummary) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualReviewPartialSummary))) {
    if ($feature.ActualReviewPartialSummary > $feature.PlannedReviewPartialSummary) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualTransmittalLetter))) {
    if ($feature.ActualTransmittalLetter > $feature.PlannedTransmittalLetter) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualePMUpload))) {
    if ($feature.ActualePMUpload > $feature.PlannedePMUpload) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualConfirmCorrections))) {
    if ($feature.ActualConfirmCorrections > $feature.PlannedConfirmCorrections) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualCorrections))) {
    if ($feature.ActualCorrections > $feature.PlannedCorrections) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualReviewOwnershipDocsMaps))) {
    if ($feature.ActualReviewOwnershipDocsMaps > $feature.PlannedReviewOwnershipDocsMaps) {
        return "Late"
    } else {
        return "On Time"
    }
} else if (switch(isEmpty($feature.ActualOwnershipDocsMaps))) {
    if ($feature.ActualOwnershipDocsMaps > NOW ){
        return "Late"
    } else {
        return "On Time"
    }
} else { return "Didn't Work"}

The code starts at the end/last date fields, and works backwards.  The code does correctly symbolize parcels that end on time, but it does not work on the last date field in the expression.

I have tried IIF and When expresions, but also didn't get it to work just right.


texts: Control of Output Raster Extent w/ Line Density Tool

texts:
In ArcGis 10, I am using the line density tool.

The output raster doesn't cover the whole of my study area.

How do I control the extent of the output raster?

One way to do it is to put in some dummy lines in the input shapefile.  Just use the editor to draw lines beyond the study area in the direction that you need the extent extended.  This is how I am doing it now, unless someone can offer a proper solution.


texts:
I have vectorial data that I have loaded in qgis setting as UTF-8. I was checking if the values of field in atribute table is standartized. So I am creating a script to do it. However, when I print list of field all alfa atributes values are printed so stranged. Look below:

BaixÃ£o Lagoa Grande
BaixÃ£o Mundo Novo
BaixÃ£o da Bandeira
BaixÃ£o da Panela
BaixÃ£o da Planta
BaixÃ£o da Serra
BaixÃ£o da Solta
BaixÃ£o das Queimadas
BaixÃ£o do Campestre
BaixÃ£o do FeijÃ£o
BaixÃ£o do Pontal
BaixÃ£o do Umbuzeiro
BaixÃ£o do Xique-Xique
BaixÃ£o dos Caboclos
Vereda da Espadeira
Vereda da espadeira

I encoded this values to 'latin' and they become well when I print one by one element of my list. For example: Baixão Lagoa Grande.

However I need one list with all of them. So I made this:

idx = l.fieldNameIndex('nome')
values = l.uniqueValues(idx)
lista_nome = []
for v in values:
    print str(v.encode(encoding='latin1'))
    lista_nome.append(str(v.encode(encoding='latin1')))
print lista_nome

The result has been all characters so messy again, like the firt print that I showed (for example: BaixÃ£o Lagoa Grande)

How to correct this characters?


texts:
I'm looking for open-source program like ArcPAD.
I have read all questions and answers, but i find nothing. I need the program for PDA (Dell axim x51v + GPS modul) and I want mapping points (trees or buildings), lines (roads) and polygons (forests).Then I want to do a simple web-mapping project. Thanks for sharing your knowledge.
Regards Brtko


texts:
Is there a limit on the maximum number of bands you can store in a postgis raster?

I cannot find documentation on this. As far as I can remember, a geotiff allows up to the max short integer (so about 32000) bands. Is it safe to assume PGRaster is the same?

All I can find is this page

http://trac.osgeo.org/postgis/wiki/WKTRaster/Documentation01

which seems to suggest that the max number of bands is equal to the limit of an unsigned int16 (65000 or so)...?

In any case, of course we dont need to use so many bands but we are looking at creating a raster with up to 100 different values for each cell, so I just want to be sure that the max number of bands is not something crazy like 3!


texts: Merging polygons that intersect by more than specified amount using PostGIS

texts:
I am working with a dataset that contains a subset of property boundaries in a local government area, thus my dataset is made up of several thousand properties but not all are touching. Since it is a subset, some of these properties are touching "side by side", some are touching "back to back", some are only touching "corner to corner" and some are not touching any other properties at all. What I need to do is merge (i.e. ST_Union) properties that are either touching "back to back" or "side to side" while leaving the isolated properties or ones only touching "corner to corner" alone. Basically I am looking to amalgamate properties on which development can be continuous. I am trying to accomplish this using Postgres and Postgis.

That way I thought I could go about this was to first buffer all the geometries by a small amount, such as 0.5 meters. Then I could perhaps run ST_Union() on the dataset where the intersection of two overlapping buffers is greater than 1 or 2 square metres. This is how I thought I could get around ST_Intersects returning true for properties touching "corner to corner" when I would actually want these left out. The greater the overlap, the more likely the properties are situation "side by side" or "back to back".

The issue with this is that when I run the queries they end up taking a really long time and a running this query once does not do the trick. If 3 properties are sitting "side by side", for instance, the query will create a union of the left two and right two, thus creating two overlapping polygons rather than one amalgamated polygon. I will have to run some kind of a loop I think.

Does anyone have an easier solution?

I haven't done loops in Postgres either and am not sure how to execture one.


texts: I want to convert a file from DXF to SVG and for that I am writing a python script. However, While converting from DXF to SVG there are certain features that are different such as xOffset, yOffset, scaleFactor etc. How can i find the difference between these files and use this to write the script.


texts: OpenStreetMap (OSM) Relation ID from Wikidata

texts:
I'm working on a map render application and I would need to have the relation ID of OpenStreetMap from the Wikidata ID in order to download the GeoJSON file.

I have made some search and found a good way, but not perfect:

Get Wikidata ID (eg:Q183)
Query the Wikidata API with the
ID(eg:https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&ids=Q183)
Get the relation ID from the field P402 :
(eg:entities[Q183].claims.P402[0].mainsnak.datavalue.value)
Query the OpenStreetMap Polygon API to get the JSON File
(eg:http://polygons.openstreetmap.fr/get_geojson.py?id=51477)

It works great, but for a lot of cities the Wikidata API (step 3) doesn't return the Relation ID, but on the OpenStreetMap page of the city the Wikidata ID is present, so there is the link.

I would like to know if there is a way to get the Relation ID from the Wikidata ID on the OpenStreetMap API?


texts:
We are using OpenLayers 3. Currently we are getting the layers details by sending a WMS URL similar to the below one:

https://xxx.xx.xx/xxxx/geoserver/pxs4gna/ows?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=Networks&TILED=true&WIDTH=512&HEIGHT=512&SRS=EPSG%3A31370&STYLES=&BBOX=142524.123046875%2C135162.07421875%2C143067.578125%2C135705.529296875

Every time we select a layer, a new url is formed. Now I want to create a single URL for the same.
Currently two URLS will be formed for layers "abc" and "def":

https://xxx.xx.xx/xxxx/geoserver/pxs4gna/ows?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=abc&TILED=true&WIDTH=512&HEIGHT=512&SRS=EPSG%3A31370&STYLES=&BBOX=142524.123046875%2C135162.07421875%2C143067.578125%2C135705.529296875

https://xxx.xx.xx/xxxx/geoserver/pxs4gna/ows?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=def&TILED=true&WIDTH=512&HEIGHT=512&SRS=EPSG%3A31370&STYLES=&BBOX=142524.123046875%2C135162.07421875%2C143067.578125%2C135705.529296875

My requirement is to create

https://xxx.xx.xx/xxxx/geoserver/pxs4gna/ows?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=abc,def&TILED=true&WIDTH=512&HEIGHT=512&SRS=EPSG%3A31370&STYLES=&BBOX=142524.123046875%2C135162.07421875%2C143067.578125%2C135705.529296875

The below function is used to triggered when a new function is called:

function addLayerintoMap(layerTitle,layerName,layerWmsUrl,layerVisibilty) {

     if (layerVisibilty =='false') {
         layerVisibilty=false;
     }else {
         layerVisibilty=true;
     }
     var tileGrid = new ol.tilegrid.TileGrid({
            extent: [16986,19114,295235,244940],
            resolutions: resolutionsDefined,
            tileSize: [512, 512]
          });
    //add layer into Map
    map.addLayer(new ol.layer.Tile({
        preload: Infinity,
        source: new ol.source.TileWMS({
                  url: layerWmsUrl,
                  params: {LAYERS: layerName ,'TILED': true,VERSION: '1.1.1'},
                  tileGrid: tileGrid
                }),
        name:layerTitle,
        visible:layerVisibilty
    }));
}


texts: Google Maps Markers inconsistent as they're drawn?

texts:
I've playing around with the google maps api and am puzzled at the following behavior.  If I use mPoint as the LatLng for my marker, the marker is rendered on a different point on the map as opposed to putting the same value directly into the properties of the marker.  Code chunk is as follows:

        var mPoint = [new google.maps.LatLng(38.991300,-76.936165)];
//        var GPoint = new google.maps.Marker({map:map,position:AVPoint});
  var marker = new google.maps.Marker({
    map: map,
    position: new google.maps.LatLng(38.991300,-76.936165),
    //position: new google.maps.LatLng(mPoint),
    draggable: true
  });

Why would this happen?


texts: Polygon to raster: Creating 1 raster for each polygon in feature class

texts:
I am currently trying to convert 1 feature class with many rows of polygons into several separate rasters; 1 for each polygon.

For this, i am trying to use Arcpy and the tool Polygon to raster, iterating through the feature class' rows:

 cursor10m = arcpy.da.SearchCursor(buff10m,
                          ["ORIG_FID", "SHAPE@", "RASTERVALU"])
 for row in cursor10m:
    arcpy.PolygonToRaster_conversion(row[1], row[2], "outraster"+str(row[0]))

When running the script like this, i get the error that the field "43.182" does not exist - 43.182 is the first value in the field "RASTERVALU". I have tried to replace "row[2]" with "RASTERVALU" but the same error happens (it says the field "RASTERVALU" does not exist). It is quite important that the RASTERVALU field value is transferred to the raster.

Do any of you know a smart workaround?