Re: [mapserver-users] getExtent(c#) with Postgis data ...
Tamas, thank you. I have tried using Npgsql and mapscript_csharp and I can successfully connect to the database, but now I suppose I need .map files saved locally to get things working? Actually I am in the middle of choosing whether it is better to use SharpMap or Mapserver's C# libraries for building a desktop app? What are your (and everybody's else's) recommendations and suggestions about it? Thank you very much, Matej - Original Message - From: Tamas Szekeres To: Matej Cc: mapserver-users@lists.osgeo.org Sent: Tuesday, April 07, 2009 10:17 PM Subject: Re: [mapserver-users] getExtent(c#) with Postgis data ... Matej Yes it's definitely the case. You application should set a reference to the managed mapscript_csharp.dll assembly and it will implicitly load furher unmanaged dlls to provide the desired functionality. Best regards, Tamas 2009/4/7 Matej ma...@matnet.net Hi, this might not be directly connected but I am planning to build a client desktop app which should be able to connect to the PostGIS db that is running on the remote server and display objects from it / add new etc. Is this possible in C# with fwtools without the need to have the Mapserver running on every client computer? Thanks and sorry for interrupting, Matej - Original Message - From: Tamas Szekeres To: Paul james Cc: mapserver-users@lists.osgeo.org Sent: Tuesday, April 07, 2009 8:29 PM Subject: Re: [mapserver-users] getExtent(c#) with Postgis data ... Paul, You can refer to the ogrinfo C# sample application in the gdal source tree: http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs Best regards, Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.com wrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.com wrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.com wrote: Why don't? That function have already been exposed for layerObj with the following signature: public rectObj getExtent(void) Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
2009/4/8 Matej ma...@matnet.net Tamas, thank you. I have tried using Npgsql and mapscript_csharp and I can successfully connect to the database, but now I suppose I need .map files saved locally to get things working? Not necessarily. You could also build up a map object from scratch and not save it in the filesystem if not required. You could also not save the map image just draw the contents of the imageObj and read the contents directly into a GDI+ bitmap. Actually I am in the middle of choosing whether it is better to use SharpMap or Mapserver's C# libraries for building a desktop app? What are your (and everybody's else's) recommendations and suggestions about it? I've already used Mapserver's C# libraries to create various .NET desktop applications and it worked pretty well. You might however create an example just to make sure about all the aspects before making the final decision. I'm not sure about SharpMap, isn't that a pure ASP.NET project? Best regards, Tamas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.com wrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj* with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Thanks! But I resolved my problem using shapeObj, without OGR... My code: _layer.open(); shapeObj _shape = new shapeObj((int)_layer.type); _layer.getShape(_shape, -1, Convert.ToInt32(__id)); _map.extent.maxx = _shape.bounds.maxx +0.1; _map.extent.maxy = _shape.bounds.maxy + 0.1; _map.extent.minx = _shape.bounds.minx - 0.1; _map.extent.miny = _shape.bounds.miny - 0.1; On Tue, Apr 7, 2009 at 3:29 PM, Tamas Szekeres szeker...@gmail.com wrote: Paul, You can refer to the ogrinfo C# sample application in the gdal source tree: http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs Best regards, Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.comwrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj*with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Hi, this might not be directly connected but I am planning to build a client desktop app which should be able to connect to the PostGIS db that is running on the remote server and display objects from it / add new etc. Is this possible in C# with fwtools without the need to have the Mapserver running on every client computer? Thanks and sorry for interrupting, Matej - Original Message - From: Tamas Szekeres To: Paul james Cc: mapserver-users@lists.osgeo.org Sent: Tuesday, April 07, 2009 8:29 PM Subject: Re: [mapserver-users] getExtent(c#) with Postgis data ... Paul, You can refer to the ogrinfo C# sample application in the gdal source tree: http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs Best regards, Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.com wrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.com wrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.com wrote: Why don't? That function have already been exposed for layerObj with the following signature: public rectObj getExtent(void) Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
I tought you were looking for the layer extent not just the extent of a shape. Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks! But I resolved my problem using shapeObj, without OGR... My code: _layer.open(); shapeObj _shape = new shapeObj((int)_layer.type); _layer.getShape(_shape, -1, Convert.ToInt32(__id)); _map.extent.maxx = _shape.bounds.maxx +0.1; _map.extent.maxy = _shape.bounds.maxy + 0.1; _map.extent.minx = _shape.bounds.minx - 0.1; _map.extent.miny = _shape.bounds.miny - 0.1; On Tue, Apr 7, 2009 at 3:29 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, You can refer to the ogrinfo C# sample application in the gdal source tree: http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs Best regards, Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.comwrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj*with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Matej Yes it's definitely the case. You application should set a reference to the managed mapscript_csharp.dll assembly and it will implicitly load furher unmanaged dlls to provide the desired functionality. Best regards, Tamas 2009/4/7 Matej ma...@matnet.net Hi, this might not be directly connected but I am planning to build a client desktop app which should be able to connect to the PostGIS db that is running on the remote server and display objects from it / add new etc. Is this possible in C# with fwtools without the need to have the Mapserver running on every client computer? Thanks and sorry for interrupting, Matej - Original Message - *From:* Tamas Szekeres szeker...@gmail.com *To:* Paul james paulj...@gmail.com *Cc:* mapserver-users@lists.osgeo.org *Sent:* Tuesday, April 07, 2009 8:29 PM *Subject:* Re: [mapserver-users] getExtent(c#) with Postgis data ... Paul, You can refer to the ogrinfo C# sample application in the gdal source tree: http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs Best regards, Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.comwrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj*with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Paul, You can refer to the ogrinfo C# sample application in the gdal source tree: http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs Best regards, Tamas 2009/4/7 Paul james paulj...@gmail.com Thanks Tamas... But now I´m a little lost... Am I supposed to create a OGR layer? Do you have any sample how to get extent´s layer using OGR? P On Mon, Apr 6, 2009 at 6:30 PM, Tamas Szekeres szeker...@gmail.comwrote: Choose a package with the best match for your compiler and architecture from here: http://vbkto.dyndns.org:1280/sdk/index.html Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj*with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] getExtent(c#) with Postgis data ...
Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Why don't? That function have already been exposed for *layerObj* with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.com wrote: Why don't? That function have already been exposed for *layerObj* with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj* with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] getExtent(c#) with Postgis data ...
Where can I find ogr_csharp.dll ? Thanks Tamas! Paul On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.com wrote: Paul, Unfortunately this function is not implemented by the MapServer postgis driver, you might want to use the OGR C# API (ie. ogr_csharp.dll) for this purpose. Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com All value from getExtent (Postgis layer) is : 3.4028234663852886E+38 Is it a bug? On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Why don't? That function have already been exposed for *layerObj* with the following signature: *public rectObj getExtent(void)* Best regards, Tamas 2009/4/6 Paul james paulj...@gmail.com Hello, It seems that getExtent (c#) is not implemented... Any other solution to get extent of a layer using mapscript? Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users