MapWindow 4 - Desktop Application : MapWindow Discussion Forum
Are there any plans for a new release using the latest build? There are issues using the MapWindow application alongside the older ActiveX controls. Terry
Lastest MapWindow Build
Posted by: tposhea ()
Date: November 23, 2010 03:25PM

Are there any plans for a new release using the latest build? There are issues using the MapWindow application alongside the older ActiveX controls.

Terry

Options: ReplyQuote
Re: Lastest MapWindow Build
Posted by: tposhea ()
Date: November 25, 2010 01:34PM

You can get the monthly beta installers here:
[tinyurl.com]
[tinyurl.com]

RC2 for v4.8 is scheduled to be released around x-mas.

--
Paul

Options: ReplyQuote
Re: Lastest MapWindow Build
Posted by: tposhea ()
Date: November 26, 2010 01:48PM

Excellent, thanks!

Options: ReplyQuote
why shapefile field name are limiter to 10 chars ?
Posted by: vannak.chheang ()
Date: December 21, 2010 07:21AM

Hi all,

I am using 4.8 OCX with delphi 7.
When generating shapefile and populating fields , i noticed that all my field header name are truncated to 10 chars in the .dbf file.
Do we know why and how to change this limitation ?

Thanks and Best Regards

Options: ReplyQuote
Re: why shapefile field name are limiter to 10 chars ?
Posted by: Mark Gray ()
Date: December 21, 2010 07:33AM

This is an annoying limitation of the DBF format, which contains the table information for a shapefile. There is no way to change this limit and still write a shapefile that other software will be able to read.

Options: ReplyQuote
Re: why shapefile field name are limiter to 10 chars ?
Posted by: vannak.chheang ()
Date: December 22, 2010 03:20PM

Thanks Mark,

Perhaps we can define a new file that contains the header description and then adding a new property which refered to this file ans associate some simple methods to retrieve fieds headers ?
What do you think ?

Vannak

Options: ReplyQuote
Re: why shapefile field name are limiter to 10 chars ?
Posted by: pmeems ()
Date: December 28, 2010 05:40AM

It might be better to use another format like SpatiaLite or PostGIS.
One of the users has made a freeware plug-in that will use those databases to show the data.
You can find details here [almanacsoft.tk]

If you've got some funding we can add SpatiaLite and PostGIS support directly to the ocx making it dazzling fast ;)

Thanks,

Paul

--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group

Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.

---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS

Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl

*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn

Options: ReplyQuote
Re: Lastest MapWindow Build
Posted by: Phil ()
Date: January 04, 2011 01:39PM

tposhea Wrote:
-------------------------------------------------------
> You can get the monthly beta installers here:
> [tinyurl.com]
> [tinyurl.com]
>
> RC2 for v4.8 is scheduled to be released around
> x-mas.

This 4.8 build appears to be from Nov. 7. Is there anything newer that I can test?

Thanks.

-Phil

Options: ReplyQuote
Re: Lastest MapWindow Build
Posted by: Phil ()
Date: January 04, 2011 02:13PM

One obvious issue with the Nov. 7 build is that labels for layers that are turned off are still displayed.

Thanks.

-Phil

Options: ReplyQuote
Re: Lastest MapWindow Build
Posted by: pmeems ()
Date: January 06, 2011 08:30AM

Phil,

Not much has been changed since Nov. 7 so I didn't create a new installer.
You can however get the latest binaries from SVN, those are build every week.

Sergei is working hard on the symbology plug-in. Then most issues about the labeling will be fixed as well.
As soon as his version of the ocx is stable I'll create a new installer.
We're now scheduling for early February.

Thanks,

Paul

--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group

Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.

---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS

Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl

*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn

Options: ReplyQuote
Re: Lastest MapWindow Build
Posted by: Phil ()
Date: January 13, 2011 04:12PM

That sounds great. I look forward to testing the new build early in Feb.

Thanks.

-Phil

Options: ReplyQuote
Re: why shapefile field name are limiter to 10 chars ?
Posted by: vannak.chheang ()
Date: January 26, 2011 05:40AM

Hi Paul,

I don't want complexe solution so I just build a string list that contains the fields name and save them into text file with xxxx.shf extension.
Just when I open the shapefile i load the textfile in parallel and replace each fieldname.
Perhaps in the OCX you can add this workaround.

Regards

Vannak Chheang

Options: ReplyQuote
Re: why shapefile field name are limiter to 10 chars ?
Posted by: cclaudio1983 ()
Date: January 30, 2011 08:44AM

vannak.chheang Wrote:
-------------------------------------------------------
> Hi Paul,
>
> I don't want complexe solution so I just build a
> string list that contains the fields name and save
> them into text file with xxxx.shf extension.
> Just when I open the shapefile i load the textfile
> in parallel and replace each fieldname.
> Perhaps in the OCX you can add this workaround.
>
> Regards
>
> Vannak Chheang

Could you show me the code or describe it better? I'm also interested to that! Thanks

Options: ReplyQuote
Re: why shapefile field name are limiter to 10 chars ?
Posted by: vannak.chheang ()
Date: February 01, 2011 05:06AM

Hi ,

here are my sample codes extract from my project in Delphi :

1.To create the shape file and the textfile for fields headers

function TCTNForm.Build_PSC_ShapeFile(SrceName:string;SrcePt:TLonLatPOint;PSCPointList:TstringList;DLF,PSC,PSCCount:integer;EcNoAvg,EcNoMin,EcNoMax:double):string;
var ShF:ShapeFile;
shftype:shpFileType;
newshp:shape;
shfFields:Field;
newPt:MapWINGIS_TLB.Point;
sx,sy,tx,ty,ArowLen,ArowAngle,STDistance:double;
Ar1,Ar2,sr1,tr1:TLonLatPoint;
i,shpid,fldIdx,partidx,pind,shpIdx:integer;
PolyFName,shpFext:string;
shpHFields:TstringList; //used to save columns header
begin

PolyFName:=C:\TempData\PDSC.shp';
ShpFext:=RemoveFileExt(PolyFName)+'.shf';
shpHFields:=TstringList.Create;

shF:=coShapeFile.Create;
shftype:=SHP_POLYLINE;

shF.CreateNew(PolyFName,shftype);

ShF.StartEditingShapes(True,Nil);

fldIdx:=0;
shfFields:=coField.Create;
ShfFields.Name:='FDDCellSource';
ShfFields.type_:=STRING_FIELD;
shfFields.Width:=128;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('FDDCellSource'); //duplicate into stringlist

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='FDDCellTarget';
ShfFields.type_:=STRING_FIELD;
shfFields.Width:=128;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('FDDCellTarget');

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='PSC';
ShfFields.type_:=INTEGER_FIELD;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('PSC');

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='Dist(Km)';
ShfFields.type_:=DOUBLE_FIELD;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('Dist(Km)');

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='DetectCount';
ShfFields.type_:=DOUBLE_FIELD;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('DetectCount');

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='EcNoAvg';
ShfFields.type_:=DOUBLE_FIELD;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('EcNoAvg');

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='EcNoMin';
ShfFields.type_:=DOUBLE_FIELD;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('EcNoMin');

inc(fldIdx);
shfFields:=coField.Create;
ShfFields.Name:='EcNoMax';
ShfFields.type_:=DOUBLE_FIELD;
Shf.EditInsertField(ShfFields,fldidx,Nil);
shpHFields.Add('EcNoMax');



if PSCPointList.Count>0 then
for i:=0 to PSCPointList.Count-1 do
begin
///////here implement operations
....
....

end;

Shf.StopEditingShapes(True,True,Nil);
Shf.Close;

shpHFields.SaveToFile(ShpFext); //save the fileds headers to stringlist
shpHFields.clear;
FreeAndNil(shpHFields);

Result:=PolyFName;

end;

2.When displaying fields headers:
procedure TCTNForm.Display_Layer_Label(LayerId,FieldId:integer;Lcolor:Tcolor;tAlign:tkHJustification;WithName:Boolean);
var x,y:double;
shlabel:string;
SF:shapefile;
i,lhnd,flid:integer;
clabel:Tcolor;
XYList:TFastStringList;
ShpFext,XYStr:string;

xyidx,xyctr:integer;
shpHFields:TstringList;
begin
Map1.Cursor:=crhourGlass;
flid:=FieldId;
clabel:=Lcolor;
lhnd:=Map1.LayerHandle[layerid];
Map1.LayerFont(Lhnd,'Tahoma',6);
sf:=coShapeFile.Create;
sf:=ShapeFile(Map1.GetObject[lhnd]);

shpFext:=RemoveFileExt(sf.Filename)+'.shf'; //this is my fields header extension file



//loading textfile for fields headers
shpHFields:=TstringList.Create;
if FileExists(ShpFext)=True then shpHFields.LoadFromFile(ShpFext);

for i:=0 to SF.NumShapes-1 do
begin
//check the fields headers to display the from shapefile .dbf or my own
if shpHFields.Count=0 then
shlabel:=SF.Field[flid].Name+'='+VarToStr(SF.CellValue[flid,i]);

//this is non truncated field header
if ShpHFields.Count>0 then
shlabel:=ShpHFields[flid]+'='+VarToStr(SF.CellValue[flid,i]);

x:=sf.Shape.Center.x;
y:=sf.Shape.Center.y;


Map1.AddLabel(lhnd,shlabel,clabel, x, y,talign)

end;

if shpHFields.Count=0 then
LayerCtrlForm.UpdateLayerLayerLabelFlag(LayerId,True,Sf.Field[flid].Name);

if ShpHFields.Count>0 then
LayerCtrlForm.UpdateLayerLayerLabelFlag(LayerId,True,ShpHFields[flid]);

ShpHFields.Clear;
FreeAndNil(ShpHFields);

Map1.Cursor:=crDefault;

end;

Hope this can help you !
The best is that the OCX override this workaround to remove the limitation.

Options: ReplyQuote


Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: