Knowledge Base Search for: Recently modified first: KB10499 - Create new attributes for vector layers. New attribute fields can be added, and existing attributes modified or deleted, using the TatukGIS DK or desktop Editor. The changes can be saved (natively) in the format of the opened layer or to a connected SQL database. TatukGIS products support writing data (both the attributes and layer geometry) to a number of commonly used vector data formats and most SQL database layers. Modified: August 28, 2015 KB10482 - Build an in-memory layer and change colors in Visual C++. An important consideration is to perform the proper casting. The source code to do this: IXGIS_LayerVector ll ; IXGIS_ShapePoint shp ; IXGIS_Utils utl ; IXGIS_ParamsSectionVector prm ; IXGIS_ParamsMarker prmmrk ; utl.CreateDispatch( "TatukGIS_DK.XGIS_Utils" ) ; ll.CreateDispatch( "TatukGIS_DK.XGIS_LayerVector" ) ; gis.Add( ll ) ; // layer defaults ( ( (IXGIS_ParamsMarker)( (IXGIS_ParamsSectionVector)ll.get_Params() ).get_Marker() ) ).put_Color( RGB(0,255,255 ) ) ; shp = ll.CreateShape( g ... Modified: August 28, 2015 KB10481 - Increase speed of attribute query to localize a shape on the map. Consider converting the map layer from SHP or other file format into an SQL database layer and use the database tools to assign an index to the file being searched on. Remember that queries using the LIKE statement are always slow if the first few letters are not provided. For example, never use the search construction: "NAME LIKE '%gton'". Instead use: "NAME LIKE 'Wash%'" Modified: August 28, 2015 KB10908 - How to modify the existing coordinate system defitition. Suppose you have the EPSG:3021 coordinate system definition, which in WKT presents the datum as: DATUM[ "Rikets_koordinatsystem_1990"] but, for better ESRI interoperability, the user prefers the name D_RT_1990 In C# var dat = TGIS_Utils.CSDatumList.ByEPSG(6124); TGIS_Utils.CSDatumList.Fix(6124, "D_RT_1990", dat.Ellipsoid.EPSG, dat.Transform.EPSG); In Delphi var dat : TGIS_CSDatum ; begin dat := CSDatumList.ByEPSG(6124) ; CSDatumList.Fix( 6124, 'D_RT_1990', ... Modified: August 20, 2015 KB10331 - Create a polygon or other shape programmatically. Question from a customer: "Relating to my farming application I am using the DK to develop, I have difficulty making a shape (polygon) programmatically and introducing it into LayerSHP. My code is as follows: Create Layer: lb := TGIS_LayerVector.Create ; lb.Name := 'buffer' ; lb.AddField('Query',gisFieldTypeString,20,0); lb.AddField('Min',gisFieldTypeNumber,3,0); GIS.ADD( lb ) ; Create Shape: ... from a buffer ... Add shape: if Assigned( shp ) then begin shp.Params.Area.Color := ZonasCol ... Modified: August 06, 2015 KB10405 - Using XDK to build a custom layer. Question from a customer: ''Can I use ActiveX DK objects, methods, and properties in my application to take data from a proprietary data structure and build a layer which the DK can then work with as if the layer had originally been loaded from one of the DK-supported data sources?'' Answer: Generally, yes. All the layers are treated exactly the same way. Modified: August 05, 2015 KB10382 - Using an animation layer in the DK. The DK offers a map layer on which you can place objects (points) which can be moved around under program control with no screen refreshes. We refer to this as an in-memory layer (TGIS_LayerVector). Every shape in an in-memory layer is editable. The DK can write data to in-memory layers extremely fast. Follow this procedure: Screen caching turned on Cashing for the layer(s) holding the floating (moving) points turned off The layer(s) containing the moving points must be the top most layers. Be ... Modified: August 05, 2015 KB10359 - Using relative directories in the Internet Server. To specify the relative path to map to a physical directory, u se the method Server.MapPath. Modified: August 05, 2015 KB10375 - Update screen and retain map extent after each modification. To update the screen after making any modifications (vector edit, parameter change, etc.) and retain the same map extent after each update, there are two options: Update function – updates the screen, after first rebuilding a cache. Repaint function - updates the screen, but if there is something in cache, the cache will be used to repaint the screen. The use of the term "cache" here means a double-buffer for the output. Modified: August 05, 2015 KB10406 - A tool to create *.ttkgp project files. We offer the free TatukGIS Viewer application. The free Viewer (as well as the desktop TatukGIS Editor) is perfect for creating TatukGIS project files, including all visual layer properties for each layer of a multi-layer project. Using the DK toolkit, creating/saving of a project file is also simple. It is just a matter of calling the following DK functions, which will create a *.ttkgp project file that can accommodate all layer orientated and global properties supported by the DK. SaveProject Sav ... Modified: August 05, 2015 KB10386 - Modify the Params of points which have buffers. A buffer is an independent shape, so you must use Params of the buffer to change the appearance of the buffer. Modified: August 05, 2015 KB10380 - How Query and Render methods work in project files (*.ttkgp files). Use SQL syntax in any Query. In your example, the "Feature" field seems to be a text field. This means that the search term must be enclosed in ' marks. Therefore use: Query=Feature='Principal Highway' Modified: August 05, 2015 KB10379 - Method to keep a shape the same size regardless of the zoom scale. There is no easy way to do this. You would have to use Reset, AddPart, and AddPoint to reconstruct the shape on any given scale. Better is to use a symbol/icon for this purpose. Modified: August 05, 2015 KB10378 - Measurement units for Params.Labels.Width and Params.Marker.Size. If there is a " + " sign before the number, the label width or marker size is defined in TWIPS (1/1440 of an inch). If there is a " - " sign before the number, the label width or marker size is defined in pixels. Modified: August 05, 2015 KB10376 - Using the DK-ActiveX control to modify the layer extent. The Extent property is an object. The proper method to assign values is as follows: Dim GisUtils as New XGIS_Utils ll.Extent = GisUtils.GisExtent( 0, 0, 100, 100 ) Modified: August 05, 2015 KB10369 - Add a new field to a layer in a TatukGIS Project. An example of adding a new field to the layer: ll.AddField( 'name', gisFieldTypeString, 256, 0 ) ; and then shape.SetField( 'name', some text ) ; str := shape.GetField( 'name' Modified: August 05, 2015 KB10370 - Identify a point, line, or area in a shapefile. Identifying can be understood two different ways: as identifying by mouse click, then refer to the DK sample Locate in DK sample set #1, as identifying a shape type, refer to the DK ShapeType property, or you can also test in the following manor: if shape is TGIS_ShapePoint then ..... Modified: August 05, 2015 KB10372 - Location of the GISSamplesDataDir variable. This is stored in the TatukGIS.ini file location in the Windows directory. A call to INI is provided in GisSampleDataDir. Other files or directories can be stored to this file as well. Modified: August 05, 2015 KB10367 - Get pixel widths and pixel heights of JPEG image file. Refer to the DK properties BitWidth and BitHeight for the pixel width and height information. Refer to the DK properties Extent.ymax and Extent.xmin for the easting, northing, westing, and southing information. Modified: August 05, 2015 KB10363 - Anchor a text label to a fixed position where there is no specific vector. To make a label display on a map by itself without any visible vector object, simply associate the label with a point vector at this place on the map that is set to be fully transparent. Modified: August 05, 2015 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 Tech Support Q&A Knowledge Base Common Questions