Hi list,
I know how to union two polygons using Python's ogr.
feat = ogr.Feature(lyr.GetLayerDefn())
feat.SetGeometry(collection1.Union(collection2))
But I need to do this in Java or use a command line exe, and I am not familiar
with Java.
What is the Java function or a command line exe ?
T
Even Rouault-2 wrote
> The polygon of a cutline is reprojected into the coordinate system of
> the source image, so densification of its contour might have an effect
> indeed.
>
> Le 19/06/2021 à 22:27, Metabase Account a écrit :
>> I might be thinking of this incorrectly, but if they're done in
Correct, you must always densify a line to mimic the behaviour of great-circle,
loxodrome etc. in all spatial operations - depending on the definition of the
data CRS.
This is a necessity in all ”long navigation” use cases like aero and nautical.
Hälsningar
Andreas Oxenstierna
T-Kartor Geospat
On 6/19/2021 2:52 PM, Andrew Bell wrote:
The X and Y dimensions are assumed to lie on a
plane. All intersection points are also assumed to lie on the
same plane as the polygon. Z values are assigned after the fact.
On Sat, Jun 19, 2
The polygon of a cutline is reprojected into the coordinate system of
the source image, so densification of its contour might have an effect
indeed.
Le 19/06/2021 à 22:27, Metabase Account a écrit :
I might be thinking of this incorrectly, but if they're done in 2D
without any spatial consider
I might be thinking of this incorrectly, but if they're done in 2D without
any spatial consideration, inserting additional vertices in between
shouldn't have an effect on behavior right? However it does seem to have an
effect when using operations such as warp with the polygon as the cutline.
On S
These are done in 2D, without regard to the spatial reference.
On Sat, Jun 19, 2021, 11:31 AM Met Bas wrote:
> From my understanding, a square polygon feature would only consists of the
> 5
> vertices of the corners (with the last vertex being the same as the first
> to
> "close" the polygon).
>
>From my understanding, a square polygon feature would only consists of the 5
vertices of the corners (with the last vertex being the same as the first to
"close" the polygon).
If I do an operation depending on a polygon, for example intersections or
clipping a raster, how is the path between the
On mardi 17 juillet 2018 14:33:42 CEST Jon Morris wrote:
> Hello all,
>
> I'm having a problem with layer intersection and am not sure if I'm using
> the options correctly or if there is some functionality missing. I'm using
> GDAL 2.2.0 with Python 2.7.
>
> I've got a layer of UK postcodes and a
Hello all,
I'm having a problem with layer intersection and am not sure if I'm using the
options correctly or if there is some functionality missing. I'm using GDAL
2.2.0 with Python 2.7.
I've got a layer of UK postcodes and a layer of UK buildings; when I run
postcode_lyr.Intersection(buildin
Hello,
I have the a shapefile full of polygons, and* *I want to simplify them,
preserving the points they share.
ogr2ogr -simplify simplifies each polygon independently, so the borders
don't fit properly.
Is there a way to do this with GDAL? TopoJSON format(
https://github.com/mbostock/topojson),
Srikanth,
Use ogr2ogr with the option -nlt MULTILINESTRING
http://www.gdal.org/ogr2ogr.html
On Mon, Apr 9, 2012 at 10:15 AM, Srikanth wrote:
> Dear All,
>
> I would like to convert the polygon shape file to polyline shape file.
> Is there any routine for carrying out this operation ? Please gu
Dear All,
I would like to convert the polygon shape file to polyline shape file.
Is there any routine for carrying out this operation ? Please guide
me.
--
Regards,
Srikanth
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mail
On 11-05-08 08:28 AM, Gabriel Breahna wrote:
Hello,
I am receiving this error into the MS_ERRORFILE log file:
msDrawMap(): Image handling error. Failed to draw layer named 'danube'.
msOGRFileNextShape(): OGR error. IllegalArgumentException: Points of LinearRing
do not form a closed linestring
Th
Hello,
I am receiving this error into the MS_ERRORFILE log file:
msDrawMap(): Image handling error. Failed to draw layer named 'danube'.
msOGRFileNextShape(): OGR error. IllegalArgumentException: Points of
LinearRing do not form a closed linestring
The command:
$ ogrinfo 3R7D0421.000 DEPARE
fo
Thanks a lot. Didn't know that GetGeometryCount did that on polygons :-)
Cheers,
Simon
On Tue, Mar 8, 2011 at 11:51 AM, Even Rouault
wrote:
> Selon Mike Toews :
>
> > On 8 March 2011 23:22, Even Rouault
> wrote:
> > > Not exactly. In fact you have to use the Geometry.GetGeometryCount()
> that
Selon Mike Toews :
> On 8 March 2011 23:22, Even Rouault wrote:
> > Not exactly. In fact you have to use the Geometry.GetGeometryCount() that
> > returns 1 (the exterior ring) + the number of interior rings. So
> > polygon.GetGeometryCount() - 1 should return the number of interior rings
>
> I in
On 8 March 2011 23:22, Even Rouault wrote:
> Not exactly. In fact you have to use the Geometry.GetGeometryCount() that
> returns 1 (the exterior ring) + the number of interior rings. So
> polygon.GetGeometryCount() - 1 should return the number of interior rings
I initially thought so too, except
Selon Chaitanya kumar CH :
> I'm sorry. I now see that this method is not exposed in the python bindings.
Not exactly. In fact you have to use the Geometry.GetGeometryCount() that
returns 1 (the exterior ring) + the number of interior rings. So
polygon.GetGeometryCount() - 1 should return the num
You could use the `interiors` length in Shapely:
from osgeo import ogr
from shapely.wkb import loads
source = ogr.Open('my_polygons.shp')
layer = source.GetLayer()
feature = layer.GetNextFeature()
num = 0
while feature:
g = loads(feature.GetGeometryRef().ExportToWkb())
if g.geom_type == 'P
I'm sorry. I now see that this method is not exposed in the python bindings.
On Tue, Mar 8, 2011 at 2:59 PM, Chaitanya kumar CH
wrote:
> Simon,
>
> You can use the OGRPolygon::getNumInteriorRings() method to get the number
> of holes in an OGR polygon object.
>
> On Tue, Mar 8, 2011 at 2:27 PM, S
Simon,
You can use the OGRPolygon::getNumInteriorRings() method to get the number
of holes in an OGR polygon object.
On Tue, Mar 8, 2011 at 2:27 PM, Simon Lyngby Kokkendorff
wrote:
> Hi List,
>
> I am using ogr via the python bindings to construct various polygons.
> Here's just a simple quest
Hi List,
I am using ogr via the python bindings to construct various polygons.
Here's just a simple question, to which someone might have some input. Is
there anyway to determine the topology, i.e. the number of holes, of a
polygon without e.g. having to export to WKT and examining the output
st
On 11-03-04 05:02 AM, Alexandre Leclerc wrote:
Anybody can help me please ?
I feel that the SHPWriteObject() write a bad way in the file.
Do you think it could come from compiler ? I use Borland C++ 6
When I edit the file in text editor it seems good, the length of the file is
1904
But when
Alexandre,
Did you check the file before trying it with your application? What do you
get if you run "ogrinfo -al "?
On Fri, Mar 4, 2011 at 3:32 PM, Alexandre Leclerc wrote:
> Anybody can help me please ?
>
>
>
> I feel that the SHPWriteObject() write a bad way in the file.
>
>
>
> Do you think
Anybody can help me please ?
I feel that the SHPWriteObject() write a bad way in the file.
Do you think it could come from compiler ? I use Borland C++ 6
When I edit the file in text editor it seems good, the length of the file is
1904
But when I read file with SHPOpen() the psSHP
Alexandre,
Can you send your code as a .cpp file as an attachment?
Also, I think you should change the line
Buffer[size+1]='\0';
to
Buffer[size]='\0';
On Thu, Mar 3, 2011 at 6:34 PM, Alexandre Leclerc wrote:
> Hello I try to draw a polygon from shapefile on geoconcept.
>
>
>
> But the points tha
Sorry, I forgot to tell you that I used SHPReadOGRObject for read the
SHPObject.
put it at the beginning of the code of previous mail
SHPHandle hSHP = SHPOpen(chemin.c_str(),"rb");
SHPObject *psShape = SHPReadObject(hSHP,0);
OGRGeometry *poPoly = SHPReadOGRObject(hSHP, 0,psShape);
Hello I try to draw a polygon from shapefile on geoconcept.
But the points that I get are corrupted.
Strangely a shapefile with no prj, and one ring in WGS84 works.
Here I try with a prj with lambert 2 extend projection.
The shapefile contains 2 rings.
See my code below.
Rudi von Staden wrote:
Hi all,
I need to create a tool that will take a set of points (say in a csv
file) given in WGS84 lat/long, and work out the area of the outer hull
that encompasses the points. The points could be anywhere in Southern
Africa.
I was thinking to use the following approa
Hi all,
I need to create a tool that will take a set of points (say in a csv
file) given in WGS84 lat/long, and work out the area of the outer hull
that encompasses the points. The points could be anywhere in Southern
Africa.
I was thinking to use the following approach (using gdal/ogr and P
Lewis, Ambrose J. wrote:
Hi All:
I’m relatively new to GDAL/OGR, so please forgive a dumb question!
I have a grid file (DTED elevations) and a shapefile of polygons
(building locations and an APEX attribute representing their height).
I’d like to combine these together so that my new[x,y] =
Hi All:
I'm relatively new to GDAL/OGR, so please forgive a dumb question!
I have a grid file (DTED elevations) and a shapefile of polygons
(building locations and an APEX attribute representing their height).
I'd like to combine these together so that my new[x,y] = DTED
elevation[x,y] + buildin
33 matches
Mail list logo