[mapserver-users] mapserver MSVC2005 development package available to download (was mssql2008 binary test package available to download)

Tamas Szekeres szekerest at gmail.com
Thu Oct 23 05:16:27 PDT 2008


Here is my daily snapshot including the fast cgi support:

http://vbkto.dyndns.org:1280/tests/release-1400-20081023.zip


I've created a development package to compile mapserver from the sources:

http://vbkto.dyndns.org:1280/tests/release-1400-dev.zip

You can use the following steps to compile mapserver.

1. Extract the contents to a directory (for example
"C:\builds\release-1400-dev")
2. Open Microsoft Visual Studio 2005 Command Prompt
3. > cd C:\builds\release-1400-dev
4. > nmake -f makefile.vc ms MS_DIR=mapserver
BASE_DIR=C:\builds\release-1400-dev
5. > nmake -f makefile.vc ms-sql2008 MS_DIR=mapserver
BASE_DIR=C:\builds\release-1400-dev
5. > nmake -f makefile.vc ms-csharp MS_DIR=mapserver
BASE_DIR=C:\builds\release-1400-dev


This package is based on the development version of gdal and
mapserver, but you can download the stable version of gdal and
mapserver sources in the base directory if you require a stable
version build
In this case you must specify these directories for MS_DIR and
GDAL_DIR at the command like, like:

> nmake -f makefile.vc gdal GDAL_DIR=gdal-1-5 BASE_DIR=C:\builds\release-1400-dev
> nmake -f makefile.vc ms MSL_DIR=mapserver-5-2 BASE_DIR=C:\builds\release-1400-dev


If you require a corresponding package for the MSVC2003 based builds
let me know.

Best regards,

Tamas



2008/10/20 BrainDrain <paulborodaev at gmail.com>:
>
> Thank you very much, Tamas.
> getFeature works fine now.
>
> But can I ask you for one more favour. Could you compile with fastcgi
> support (ideally with all ms4w production release flags) or share 'your
> working buildkit' (this just will be great!, not only for me) because I
> still have problems with compiling ms4w(( but I need sql2008 support feature
> as soon as it possible for my work. I would be very appreciate.
>
> Tamas Szekeres wrote:
>>
>> Folks,
>>
>> Yes, I've run into the same issue when using the getFeature method
>> with the driver. Here is the corresponding ticket I've created:
>> http://trac.osgeo.org/mapserver/ticket/2795
>>
>> Attached the C# test case with this ticket:
>> http://trac.osgeo.org/mapserver/attachment/ticket/2795/Program.cs
>>
>>
>> I've fixed this issue in the SVN-trunk and the stable branch, here is
>> my daily snapsot of the binaries you can test with:
>> http://vbkto.dyndns.org:1280/tests/release-1400-20081018.zip
>>
>> If you encounter further problems with the driver don't hesitate to
>> file a ticket describing the issue.
>>
>> Just for a note: This driver doesn't make any character encodings with
>> the values retieved as plain byte arrays from MSSQL, however your
>> default database setting corresponds to the
>> 1251 codepage, so explicit character conversion may be required in C#,
>> like:
>>
>> byte[] bytes = Encoding.Convert(Encoding.Unicode, Encoding.Default,
>> Encoding.Unicode.GetBytes(shape.getValue(k)));
>> string str = Encoding.GetEncoding(1251).GetString(bytes);
>>
>>
>> Best regards,
>>
>> Tamas
>>
>>
>>
>> 2008/10/17 BrainDrain <paulborodaev at gmail.com>:
>>>
>>> hmm
>>>>>could you provide an example to this
>>> how can I help If I use mapscript?
>>>    [WebService(Namespace = "http://www.wem.volgadmin.ru/wemlib")]
>>>    [WebServiceBinding(ConformsTo = WsiProfiles.None)]
>>>    [ScriptService]
>>>    public class MapParser : System.Web.Services.WebService
>>>    {
>>>        [WebMethod(EnableSession = true)]
>>>        [ScriptMethod(UseHttpGet = true)]
>>>        public object RequestFeatureAttributes(object mapIndex, object
>>> layerIndex, int[] featureIndexes, string[] fieldNames, bool envelope)
>>>        {
>>>            mapObj map;
>>>            layerObj layer = null;
>>>            shapeObj shape;
>>>            int entryIndex = -1, i, j, len = featureIndexes.Length;
>>>            object[] res = new object[len];
>>>            Dictionary<string, object> valueBag, record;
>>>
>>>            if (Util.isNumeric(mapIndex.ToString(), NumberStyles.Integer))
>>>            {
>>>                mapIndex = (object)Convert.ToInt32(mapIndex);
>>>            }
>>>            if (Util.isNumeric(layerIndex.ToString(),
>>> NumberStyles.Integer))
>>>            {
>>>                layerIndex = (object)Convert.ToInt32(layerIndex);
>>>            }
>>>            KeyValuePair<string, object> entry =
>>> Util.getEntry((Dictionary<string, object>)Session["maps"],
>>> (mapIndex.GetType() == typeof(int)) ? mapIndex :
>>> Util.normalizePath((string)mapIndex), out entryIndex);
>>>            map = (mapObj)entry.Value;//.clone()
>>>            if (layerIndex.GetType() == typeof(int))
>>>            {
>>>                layer = map.getLayer((int)layerIndex);
>>>            }
>>>            else
>>>            {
>>>                if (layerIndex.GetType() == typeof(string))
>>>                {
>>>                    layer = map.getLayerByName((string)layerIndex);
>>>                }
>>>            }
>>>
>>>            layer.open();
>>>            object def;
>>>            List<int> fieldIndexes = new List<int>();
>>>            List<string> list = new List<string>();
>>>            if (fieldNames != null)
>>>            {
>>>                for (i = 0; i < layer.numitems; i++)
>>>                {
>>>                    if
>>> (((ICollection<string>)fieldNames).Contains(layer.getItem(i)))
>>>                    {
>>>                        fieldIndexes.Add(i);
>>>                    }
>>>                }
>>>            }
>>>
>>>            for (i = 0; i < len; i++)
>>>            {
>>>                try
>>>                {
>>>                    using (shape = layer.getFeature(featureIndexes[i],
>>> -1))
>>> //here exception occurs
>>>                    {
>>>
>>>                        string[] values;
>>>
>>>                        if (fieldNames != null)
>>>                        {
>>>                            if (fieldNames.Length > 0)
>>>                            {
>>>                                list.Clear();
>>>                                for (j = 0; j < fieldIndexes.Count; j++)
>>>                                {
>>>
>>> list.Add(shape.values[fieldIndexes[j]]);
>>>                                }
>>>                                values = list.ToArray();
>>>                            }
>>>                            else
>>>                            {
>>>                                values = new string[1] {
>>> featureIndexes[i].ToString() };
>>>                            }
>>>                        }
>>>                        else
>>>                        {
>>>                            values = shape.values;
>>>                        }
>>>                        valueBag = new Dictionary<string, object>();
>>>
>>>                        for (j = 0; j < values.Length; j++)
>>>                        {
>>>                            valueBag[j.ToString()] = values[j];
>>>
>>>                        }
>>>                        if (envelope)
>>>                        {
>>>                            record = new Dictionary<string, object>();
>>>                            if (len > 1)
>>>                            {
>>>                                record[featureIndexes[i].ToString()] =
>>> (object)valueBag;//?
>>>                            }
>>>                            else
>>>                            {
>>>                                record[entryIndex.ToString() + ' ' +
>>> layer.index.ToString() + ' ' + featureIndexes[i].ToString()] =
>>> (object)valueBag;//?
>>>                            }
>>>                            res[i] = record;
>>>                        }
>>>                        else
>>>                        {
>>>                            res[i] = valueBag;
>>>                        }
>>>                    }
>>>                }
>>>                catch { }
>>>            }
>>>            layer.close();
>>>            return (len > 1) ? ((envelope) ? new Dictionary<string,
>>> object>() { { entryIndex.ToString() + ' ' + layer.index.ToString(), res }
>>> }
>>> : (object)res) : res[0];
>>>        }
>>> }
>>>
>>> Again access violation exception after modifying mapfile.
>>> Sql profiler says that query batch (select convert(varchar(max),
>>> STATUS),convert(varchar(max), STAGE),convert(varchar(max), id),GEOM from
>>> dbo.Construct where id = 190748) completed successfully
>>>
>>>
>>> Tamas Szekeres wrote:
>>>>
>>>> 2008/10/16 BrainDrain <paulborodaev at gmail.com>:
>>>>> -without "WITH(INDEX..." in mapfile data section - mem corruption
>>>>> exception
>>>>> on "shape = layer.getFeature(featureIndexe, -1)" after successful
>>>>> execution
>>>>> of queryByPoint (querying the largest polygon in my geodb);
>>>>
>>>> I didn't encounter any memory corruption error here, could you provide
>>>> an example to this?
>>>> I've set up your database with IIS and apache with the following links:
>>>> http://vbkto.dyndns.org:1280/cgi-bin/mapserv.exe?mode=map&map=test2008.map
>>>> http://vbkto.dyndns.org:1080/cgi-bin/mapserv.exe?mode=map&map=test2008.map
>>>>
>>>>
>>>>> -with using "WITH(INDEX...":
>>>>> msMSSQL2008LayerGetShape(): Query error. Error executing MSSQL2008 SQL
>>>>> statement: select convert(varchar(max), STATUS),convert(varchar(max),
>>>>> STAGE),convert(varchar(max), id),GEOM from dbo.Construct
>>>>> WITH(INDEX(SIndx_Construct_geometry_geom)) where id = 190748
>>>>> -[Microsoft][ODBC SQL Server Driver][SQL Server]Query processor could
>>>>> not
>>>>> produce a query plan because of the hints defined in this query.
>>>>> Resubmit
>>>>> the query without specifying any hints and without using SET FORCEPLAN.
>>>>> When I'm trying to execute this select statement in man. studio - error
>>>>> message - the same.
>>>>> I think because where clause don't contains conditions related to
>>>>> spatial
>>>>> index used in 'WITH' hint.
>>>>
>>>> You're right, just looking into the code here is a possible solution:
>>>>
>>>> DATA "GEOM from dbo.Construct USING UNIQUE id USING SRID=0 USING INDEX
>>>> SIndx_Construct_geometry_geom"
>>>>
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Tamas
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/mssql2008-binary-test-package-available-to-download-tp19956347p20027820.html
>>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/mssql2008-binary-test-package-available-to-download-tp19956347p20065718.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the MapServer-users mailing list