Re: [mapserver-users] Re: ODBC OGR MS SQL CONNECTION
ibrahimsaricicek wrote: I've changed like this CONNECTION OGRVRTDataSource OGRVRTLayer name='Araclar' SrcDataSourceODBC:webuser/webu...@mssql,AracView/SrcDataSource SrcSQLSELECT * FROM AracView/SrcSQL GeometryTypewkbPoint/GeometryType GeometryField encoding='PointFromColumns' x='LONGITUDE' y='LATITUDE'/GeometryField /OGRVRTLayer /OGRVRTDataSource And result; msDrawMap(): Image handling error. Failed to draw layer named 'Araclar'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `Araclar'. Parse error at EOF, not all elements have been closed, starting with SrcDataSource Is there a problem while using comma? Ibrahim, I vaguely recall that if you do not include a DATA statement declaring the layer you want to operate from OGR, then the connection string is parsed using a comma to identify the layer. So try your existing connection string, but add: DATA Araclar and see if that helps. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: ODBC OGR MS SQL CONNECTION
Hi all, Everything is ok now.. Works and fast enough.. Best Regards.. -- View this message in context: http://n2.nabble.com/ODBC-OGR-MS-SQL-CONNECTION-tp4824960p4829341.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to do that kind of querying using CGI (with Openlayers)
Thanks Richard... Could you send me a sample how to highlight the road using CGI/OL? Thanks On Mon, Mar 29, 2010 at 7:23 PM, Richard Greenwood richard.greenw...@gmail.com wrote: One approach is to use a very simple template to retrieve the min/max extent from MapServer. Then parse the extent in javascript and use that to set the OL extent. So basically you are making two calls to MapServer, one to get the extent and another one to highlight the road. The template for the extent would look something like [MINX] [MINY] [MAXX] [MAXY] Better check the documentation on that as I forget if it's MINX or something slightly different. Rich On Mon, Mar 29, 2010 at 2:02 PM, Paul james paulj...@gmail.com wrote: Hello guys... The application has a Search Window, with all Roads listed... The user will choose one road, so my map should highlight that road and zoom in (if possible)... I already did that using C# Mapscript, but I dont know how to do that using CGI/OL... Any ideas? Thanks Paul ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Adjacent letter problem
Dear all; This is my style and label definition; STYLE SYMBOL 'otopark_img' SIZE 30 END LABEL COLOR 0 0 0 FONT calibri-bold TYPE truetype SIZE 8 POSITION LC PARTIALS FALSE OUTLINECOLOR 255 255 255 ALIGN CENTER WRAP ' ' BUFFER 3 PRIORITY 10 ANTIALIAS TRUE END This is a sample of results; http://n2.nabble.com/file/n4830536/adjasent.jpg Why are some letters adjecent? How can I prevent this situation? Thanks in advance.. -- View this message in context: http://n2.nabble.com/Adjacent-letter-problem-tp4830536p4830536.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] ANGLE [attribute]
Thanks Daniel! I'm trying to get the database an angle to the text of a layer of type 'annotation', but is not working. The LABLEITEM (database) works, but not the angle. -- Daiane Daiane Azevedo de Fraga wrote: * Hello everyone! ** ** I wonder if ANGLE accepts an attribute that comes from a table in a ** database, eg Oracle Spatial? Either he accepts only one attribute of a DBF? ** * Yes, that should work for all connection types (but I didn't test oracle spatial specifically myself). Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] ANGLE [attribute]
ANGLE does work with Oracle Spatial. Mike -- Michael Smith RSGIS Center US Army Corps of Engineers On 3/30/10 7:56 PM, Daniel Morissette dmorisse...@mapgears.com wrote: Daiane Azevedo de Fraga wrote: Hello everyone! I wonder if ANGLE accepts an attribute that comes from a table in a database, eg Oracle Spatial? Either he accepts only one attribute of a DBF? Yes, that should work for all connection types (but I didn't test oracle spatial specifically myself). Daniel ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] ANGLE [attribute]
Are you using TrueType fonts for your label? My memory could be bad, but I believe that you can only do label rotation with TrueType fonts, not with the default bitmap fonts. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Daiane Azevedo de Fraga Sent: Wednesday, March 31, 2010 8:07 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] ANGLE [attribute] Thanks Daniel! I'm trying to get the database an angle to the text of a layer of type 'annotation', but is not working. The LABLEITEM (database) works, but not the angle. -- Daiane Daiane Azevedo de Fraga wrote: Hello everyone! I wonder if ANGLE accepts an attribute that comes from a table in a database, eg Oracle Spatial? Either he accepts only one attribute of a DBF? Yes, that should work for all connection types (but I didn't test oracle spatial specifically myself). Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: ANGLE [attribute]
That's a consolation! ;) Thanks for the info! Can be a detail... If I find out what's happening, I will publish here! Thank you! -- Daiane ANGLE does work with Oracle Spatial. Mike -- Michael Smith RSGIS Center US Army Corps of Engineers On 3/30/10 7:56 PM, Daniel Morissette dmorissette at mapgears.com http://lists.osgeo.org/mailman/listinfo/mapserver-users wrote: * Daiane Azevedo de Fraga wrote: ** Hello everyone! ** ** I wonder if ANGLE accepts an attribute that comes from a table in a ** database, eg Oracle Spatial? Either he accepts only one attribute of a DBF? ** ** ** Yes, that should work for all connection types (but I didn't test oracle ** spatial specifically myself). ** ** Daniel * ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] ANGLE [attribute]
Exactly! Thank you very much!! I was using a TrueType font (Arial), but the software that I use as the interface was changing to Bitmap, because I was not stating explicitly that it was TrueType. Another detail: using TrueType, it should be explicit FONT attribute. Thanks, thanks, thanks David! -- Daiane 2010/3/31 Fawcett, David (MPCA) david.fawc...@state.mn.us Are you using TrueType fonts for your label? My memory could be bad, but I believe that you can only do label rotation with TrueType fonts, not with the default bitmap fonts. David. *From:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Daiane Azevedo de Fraga *Sent:* Wednesday, March 31, 2010 8:07 AM *To:* mapserver-users@lists.osgeo.org *Subject:* [mapserver-users] ANGLE [attribute] Thanks Daniel! I'm trying to get the database an angle to the text of a layer of type 'annotation', but is not working. The LABLEITEM (database) works, but not the angle. -- Daiane Daiane Azevedo de Fraga wrote: * Hello everyone! ** ** I wonder if ANGLE accepts an attribute that comes from a table in a * * * * database, eg Oracle Spatial? Either he accepts only one attribute of a DBF? ** * Yes, that should work for all connection types (but I didn't test oracle spatial specifically myself). Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: ODBC OGR MS SQL CONNECTION
Hi Frank I have an OpenLayers / Mapserver system, where some of the data comes from a SQL-Server database via OGR. Trying to understand where a FILTER condition is applied. Here is a snippet from my Mapfile: LAYER # name of layer NAME apiariestm TYPE POINT UNITS METERS # actual data pointer CONNECTION ./apiariestm.ovf CONNECTIONTYPE OGR DATA apiariestm FILTER WHERE apiary_id = '%apiaryid%' STATUS ON Here is the OGR .ovf file: OGRVRTDataSource OGRVRTLayer name=apiariestm SrcDataSourceODBC:user/pas...@apiary/SrcDataSource SrcLayervw_ogr_apiary_layer/SrcLayer GeometryTypewkbPoint/GeometryType LayerSRSEPSG:2193/LayerSRS GeometryField encoding=PointFromColumns x=x_nztm y=y_nztm/ FIDapiary_id/FID /OGRVRTLayer /OGRVRTDataSource The SrcLayer is a view. Does the filter get applied at the Mapserver end, i.e. all the points in the map window get retrieved, and then the filter is applied, or does Mapserver send the filter through to OGR? Many thanks, Robert Sanson This message has been scanned for malware by SurfControl plc. www.surfcontrol.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: ODBC OGR MS SQL CONNECTION
Robert Sanson wrote: Hi Frank I have an OpenLayers / Mapserver system, where some of the data comes from a SQL-Server database via OGR. Trying to understand where a FILTER condition is applied. Here is a snippet from my Mapfile: LAYER # name of layer NAME apiariestm TYPE POINT UNITS METERS # actual data pointer CONNECTION ./apiariestm.ovf CONNECTIONTYPE OGR DATA apiariestm FILTER WHERE apiary_id = '%apiaryid%' STATUS ON Here is the OGR .ovf file: OGRVRTDataSource OGRVRTLayer name=apiariestm SrcDataSourceODBC:user/pas...@apiary/SrcDataSource SrcLayervw_ogr_apiary_layer/SrcLayer GeometryTypewkbPoint/GeometryType LayerSRSEPSG:2193/LayerSRS GeometryField encoding=PointFromColumns x=x_nztm y=y_nztm/ FIDapiary_id/FID /OGRVRTLayer /OGRVRTDataSource The SrcLayer is a view. Does the filter get applied at the Mapserver end, i.e. all the points in the map window get retrieved, and then the filter is applied, or does Mapserver send the filter through to OGR? Robert, A few (1-4) years ago we modified the OGR connection type to push the filter into OGR if the filter starts with WHERE . So in your case it should get pushed all the way through to SQL Server which is where you would want it. If you can run your map via shp2img you could do the following: set CPL_DEBUG=ON shp2img -m yourmap -o out.png and you should see a bunch GDAL/OGR debug output in the terminal, including (hopefully) the actual SQL statement issued against SQL Server. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Same name for GROUP and layer NAME ?
Hi, is it OK to have same layer NAME and GROUP in one mapfile, like in this example (mylay) ? LAYER CONNECTIONTYPE postgis STATUS ON NAME 'mylay' GROUP 'mylay' TYPE LINE LAYER CONNECTIONTYPE postgis STATUS ON NAME 'mylay2' GROUP 'mylay' TYPE LINE In my case (Mapserver 5.2.x) it is working well, but I am not sure if it is good practise and also if it is going to work in higher versions. Thanks -- Ivan signature.asc Description: This is a digitally signed message part. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users